aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_search.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-04 22:04:00 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-04 22:04:00 +0000
commit0663125e0f41ee120736944ef153074f6251b957 (patch)
tree975543b6194c87b076547f63d8c344b87e21e75a /src/fs/fs_search.c
parent4b78e6983509f2078c4f52888187436c0a7b6aeb (diff)
downloadgnunet-0663125e0f41ee120736944ef153074f6251b957.tar.gz
gnunet-0663125e0f41ee120736944ef153074f6251b957.zip
bugfixes, more tests
Diffstat (limited to 'src/fs/fs_search.c')
-rw-r--r--src/fs/fs_search.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index c4994b6a6..ce4af43fc 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -24,7 +24,9 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 * 25 *
26 * TODO: 26 * TODO:
27 * - handle namespace advertisements (can wait; might already work!?) 27 * - handle namespace advertisements (NBlocks, see FIXME;
28 * note that we currently use KBLOCK instead of ANY when
29 * searching => NBLOCKS would not fit! FIX this as well!)
28 * - add support for pushing "already seen" information 30 * - add support for pushing "already seen" information
29 * to FS service for bloomfilter (can wait) 31 * to FS service for bloomfilter (can wait)
30 * - handle availability probes (can wait) 32 * - handle availability probes (can wait)
@@ -382,8 +384,11 @@ process_kblock (struct GNUNET_FS_SearchContext *sc,
382 return; 384 return;
383 } 385 }
384 j = eos - pt + 1; 386 j = eos - pt + 1;
385 meta = GNUNET_CONTAINER_meta_data_deserialize (&pt[j], 387 if (sizeof (pt) == j)
386 sizeof (pt) - j); 388 meta = GNUNET_CONTAINER_meta_data_create ();
389 else
390 meta = GNUNET_CONTAINER_meta_data_deserialize (&pt[j],
391 sizeof (pt) - j);
387 if (meta == NULL) 392 if (meta == NULL)
388 { 393 {
389 GNUNET_break_op (0); /* kblock malformed */ 394 GNUNET_break_op (0); /* kblock malformed */
@@ -529,6 +534,9 @@ process_result (struct GNUNET_FS_SearchContext *sc,
529 } 534 }
530 process_sblock (sc, data, size); 535 process_sblock (sc, data, size);
531 break; 536 break;
537 case GNUNET_DATASTORE_BLOCKTYPE_NBLOCK:
538 GNUNET_break (0); // FIXME: not implemented!
539 break;
532 case GNUNET_DATASTORE_BLOCKTYPE_ANY: 540 case GNUNET_DATASTORE_BLOCKTYPE_ANY:
533 case GNUNET_DATASTORE_BLOCKTYPE_DBLOCK: 541 case GNUNET_DATASTORE_BLOCKTYPE_DBLOCK:
534 case GNUNET_DATASTORE_BLOCKTYPE_ONDEMAND: 542 case GNUNET_DATASTORE_BLOCKTYPE_ONDEMAND: