From: Christian Grothoff Date: Sat, 15 May 2010 17:50:41 +0000 (+0000) Subject: stuff X-Git-Tag: initial-import-from-subversion-38251~21693 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9b913265537544514be1bdfef8770b8c614c759f;p=oweals%2Fgnunet.git stuff --- diff --git a/src/fs/fs.h b/src/fs/fs.h index c0e203335..9901cd173 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h @@ -31,6 +31,11 @@ #include "gnunet_fs_service.h" #include "gnunet_block_lib.h" +/** + * Maximum size of the datastore queue for P2P operations. + */ +#define MAX_DATASTORE_QUEUE 16 + /** * Size of the individual blocks used for file-sharing. */ diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index f0eb08751..8bec62b08 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -2111,7 +2111,7 @@ handle_p2p_put (void *cls, 0, &query, dsize, &put[1], type, prq.priority, 1 /* anonymity */, expiration, - 0, 64 /* FIXME: use define */, + 1 + prq.priority, MAX_DATASTORE_QUEUE, GNUNET_CONSTANTS_SERVICE_TIMEOUT, &put_migration_continuation, NULL); @@ -2323,7 +2323,12 @@ process_local_reply (void *cls, &query)) { GNUNET_break (0); - /* FIXME: consider removing the block? */ + GNUNET_DATASTORE_remove (dsh, + key, + size, data, + -1, -1, + GNUNET_TIME_UNIT_FOREVER_REL, + NULL, NULL); GNUNET_DATASTORE_get_next (dsh, GNUNET_YES); return; } @@ -2671,8 +2676,8 @@ handle_p2p_get (void *cls, pr->qe = GNUNET_DATASTORE_get (dsh, &gm->query, type, - (unsigned int) preference, 64 /* FIXME */, - + pr->priority + 1, + MAX_DATASTORE_QUEUE, timeout, &process_local_reply, pr);