diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-19 17:15:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-19 17:15:51 +0000 |
commit | 1b9a6fa6063c79120be8e9cf4bd42863751f04db (patch) | |
tree | 0511a203fd1dc0ddb9536a930cb7595e27fa807f /src/fs/fs_api.c | |
parent | b10b45c398e1da19723c368d6ddd3641e2a97a79 (diff) |
improving results seen communication to consider which exact keywords a particular result has been seen for so far
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r-- | src/fs/fs_api.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index f1ba4a5b1d..cd854cf5ee 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c @@ -1793,7 +1793,10 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr) || (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->mandatory_missing)) || (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->optional_support)) || (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_success)) || - (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_trials))) + (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_trials)) || + (GNUNET_OK != GNUNET_BIO_write (wh, sr->keyword_bitmap, + (sr->uri->data.ksk.keywordCount + 7) / 8)) ) + { GNUNET_break (0); goto cleanup; @@ -2095,6 +2098,14 @@ deserialize_search_result (void *cls, const char *filename) GNUNET_break (0); goto cleanup; } + sr->keyword_bitmap = GNUNET_malloc ((sr->uri->data.ksk.keywordCount + 7) / 8); /* round up, count bits */ + if (GNUNET_OK != GNUNET_BIO_read (rh, "keyword-bitmap", + sr->keyword_bitmap, + (sr->uri->data.ksk.keywordCount + 7) / 8)) + { + GNUNET_break (0); + goto cleanup; + } GNUNET_free (uris); if (download != NULL) { |