From ce43938102711364faf74972884862dc13a0d985 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 24 Nov 2011 12:15:04 +0000 Subject: [PATCH] changing API in anticipation of future implementation of 1369 --- src/fs/fs_download.c | 3 +++ src/include/gnunet_fs_service.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index e4e015e88..cc36cba1f 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c @@ -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 diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index 7bfb15ac0..f4a71dd46 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -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; /** -- 2.25.1