changing API in anticipation of future implementation of 1369
authorChristian Grothoff <christian@grothoff.org>
Thu, 24 Nov 2011 12:15:04 +0000 (12:15 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 24 Nov 2011 12:15:04 +0000 (12:15 +0000)
src/fs/fs_download.c
src/include/gnunet_fs_service.h

index e4e015e8875efd5e7f465b824fa5eb9ff0c408c1..cc36cba1f29a701903a96b37a7f049e1de0aee06 100644 (file)
@@ -515,6 +515,7 @@ try_match_block (struct GNUNET_FS_DownloadContext *dc,
     pi.value.download.specifics.progress.offset = 0;
     pi.value.download.specifics.progress.data_len = dlen;
     pi.value.download.specifics.progress.depth = 0;
+    pi.value.download.specifics.progress.trust_offered = 0;
     GNUNET_FS_download_make_status_ (&pi, dc);
     if ((NULL != dc->filename) &&
         (0 !=
@@ -1070,6 +1071,7 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
   pi.value.download.specifics.progress.offset = dr->offset;
   pi.value.download.specifics.progress.data_len = prc->size;
   pi.value.download.specifics.progress.depth = dr->depth;
+  pi.value.download.specifics.progress.trust_offered = 0;
   GNUNET_FS_download_make_status_ (&pi, dc);
   GNUNET_assert (dc->completed <= dc->length);
   if (dr->depth == 0)
@@ -1673,6 +1675,7 @@ reconstruct_cb (void *cls, const struct ContentHashKey *chk, uint64_t offset,
       pi.value.download.specifics.progress.offset = offset;
       pi.value.download.specifics.progress.data_len = 0;
       pi.value.download.specifics.progress.depth = 0;
+      pi.value.download.specifics.progress.trust_offered = 0;
       GNUNET_FS_download_make_status_ (&pi, dc);
     }
     else
index 7bfb15ac0351d2cbd1a94e28e93c95c66ff389fd..f4a71dd469954dfd2b25fa3fe364ad5953cec4e5 100644 (file)
@@ -1036,6 +1036,11 @@ struct GNUNET_FS_ProgressInfo
           */
           unsigned int depth;
 
+         /**
+          * How much trust did we offer for downloading this block?
+          */
+         unsigned int trust_offered;
+
         } progress;
 
         /**