gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20354 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r20354 - gnunet/src/fs
Date: Wed, 7 Mar 2012 20:15:01 +0100

Author: grothoff
Date: 2012-03-07 20:15:01 +0100 (Wed, 07 Mar 2012)
New Revision: 20354

Modified:
   gnunet/src/fs/fs_download.c
Log:
-better interpretation of instant downloads from local database / existing block

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2012-03-07 19:09:47 UTC (rev 20353)
+++ gnunet/src/fs/fs_download.c 2012-03-07 19:15:01 UTC (rev 20354)
@@ -183,6 +183,9 @@
    */
   int do_store;
 
+  /**
+   * When did we last transmit the request?
+   */
   struct GNUNET_TIME_Absolute last_transmission;
 
 };
@@ -937,7 +940,8 @@
   struct ContentHashKey *chkarr;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Received block `%s' matching pending request at depth %u and 
offset %llu/%llu\n",
+              "Received %u byte block `%s' matching pending request at depth 
%u and offset %llu/%llu\n",
+             (unsigned int) prc->size,
               GNUNET_h2s (key), dr->depth, (unsigned long long) dr->offset,
               (unsigned long long) GNUNET_ntohll (dc->uri->data.
                                                   chk.file_length));
@@ -1063,11 +1067,11 @@
   pi.value.download.specifics.progress.depth = dr->depth;
   pi.value.download.specifics.progress.trust_offered = 0;
   if (prc->last_transmission.abs_value != 
GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
-    pi.value.download.specifics.progress.block_download_duration =
-        GNUNET_TIME_absolute_get_duration (prc->last_transmission);
+    pi.value.download.specifics.progress.block_download_duration 
+      = GNUNET_TIME_absolute_get_duration (prc->last_transmission);
   else
-    pi.value.download.specifics.progress.block_download_duration.rel_value = 
-        GNUNET_TIME_UNIT_FOREVER_REL.rel_value;
+    pi.value.download.specifics.progress.block_download_duration
+      = GNUNET_TIME_UNIT_ZERO; /* found locally */
   GNUNET_FS_download_make_status_ (&pi, dc);
   if (dr->depth == 0)
     propagate_up (dr);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]