From: Christian Grothoff Date: Fri, 25 Mar 2011 13:17:52 +0000 (+0000) Subject: handle indexed data correctly: X-Git-Tag: initial-import-from-subversion-38251~18906 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9b171e93182f1a07be94142abfd1766dc5ea04ca;p=oweals%2Fgnunet.git handle indexed data correctly: --- diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h index f04d063f7..c4a3d4bb9 100644 --- a/src/fs/gnunet-service-fs.h +++ b/src/fs/gnunet-service-fs.h @@ -33,7 +33,7 @@ #include "gnunet_block_lib.h" #include "fs.h" -#define DEBUG_FS GNUNET_NO +#define DEBUG_FS GNUNET_YES /** diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 8a14c4c00..ea8f3b80c 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c @@ -1080,7 +1080,9 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr, pr->llc_cont_cls = cont_cls; pr->qe = GNUNET_DATASTORE_get (GSF_dsh, &pr->public_data.query, - pr->public_data.type, + pr->public_data.type == GNUNET_BLOCK_TYPE_FS_DBLOCK + ? GNUNET_BLOCK_TYPE_ANY + : pr->public_data.type, 1 /* queue priority */, 1 /* max queue size */, GNUNET_TIME_UNIT_FOREVER_REL, diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index 44e2cc48b..45df96043 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2004, 2005, 2006, 2008, 2009 Christian Grothoff (and other contributing authors) + (C) 2004, 2005, 2006, 2008, 2009, 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -153,7 +153,7 @@ progress_cb (void *cls, printf ("Publishing complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); GAUGER ("FS", - "Publishing speed", + "Publishing speed (insertion)", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL), "kb/s"); fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); @@ -174,7 +174,7 @@ progress_cb (void *cls, printf ("Download complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); GAUGER ("FS", - "Local download speed", + "Local download speed (inserted)", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL), "kb/s"); GNUNET_SCHEDULER_add_now (&abort_download_task, diff --git a/src/fs/test_fs_download_indexed.c b/src/fs/test_fs_download_indexed.c index 1a88ad80e..33ca42a16 100644 --- a/src/fs/test_fs_download_indexed.c +++ b/src/fs/test_fs_download_indexed.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2004, 2005, 2006, 2008, 2009 Christian Grothoff (and other contributing authors) + (C) 2004, 2005, 2006, 2008, 2009, 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -28,6 +28,7 @@ #include "gnunet_util_lib.h" #include "gnunet_arm_service.h" #include "gnunet_fs_service.h" +#include #define VERBOSE GNUNET_NO @@ -151,6 +152,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_COMPLETED: printf ("Publishing complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); + GAUGER ("FS", + "Publishing speed (indexing)", + (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL), + "kb/s"); fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); start = GNUNET_TIME_absolute_get (); download = GNUNET_FS_download_start (fs, @@ -168,6 +173,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: printf ("Download complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); + GAUGER ("FS", + "Local download speed (indexed)", + (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL), + "kb/s"); GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); break;