From 6ad3e6f4977721c38ecaf0602f8cb67cbd6cf949 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 9 Sep 2010 11:43:12 +0000 Subject: [PATCH] fix present check for on-demand blocks --- src/datastore/gnunet-service-datastore.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index 01778b1b7..3e9e2e480 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -1038,10 +1038,12 @@ check_present (void *cls, GNUNET_free (pc); return GNUNET_SYSERR; } - if ( (size == ntohl(dm->size)) && - (0 == memcmp (&dm[1], - data, - size)) ) + if ( (GNUNET_BLOCK_TYPE_DBLOCK == type) || + (GNUNET_BLOCK_TYPE_IBLOCK == type) || + ( (size == ntohl(dm->size)) && + (0 == memcmp (&dm[1], + data, + size)) ) ) { pc->is_present = GNUNET_YES; plugin->api->next_request (next_cls, GNUNET_YES); -- 2.25.1