aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs/fs.h5
-rw-r--r--src/fs/gnunet-service-fs.c13
2 files changed, 14 insertions, 4 deletions
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
@@ -32,6 +32,11 @@
32#include "gnunet_block_lib.h" 32#include "gnunet_block_lib.h"
33 33
34/** 34/**
35 * Maximum size of the datastore queue for P2P operations.
36 */
37#define MAX_DATASTORE_QUEUE 16
38
39/**
35 * Size of the individual blocks used for file-sharing. 40 * Size of the individual blocks used for file-sharing.
36 */ 41 */
37#define DBLOCK_SIZE (32*1024) 42#define DBLOCK_SIZE (32*1024)
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,
2111 0, &query, dsize, &put[1], 2111 0, &query, dsize, &put[1],
2112 type, prq.priority, 1 /* anonymity */, 2112 type, prq.priority, 1 /* anonymity */,
2113 expiration, 2113 expiration,
2114 0, 64 /* FIXME: use define */, 2114 1 + prq.priority, MAX_DATASTORE_QUEUE,
2115 GNUNET_CONSTANTS_SERVICE_TIMEOUT, 2115 GNUNET_CONSTANTS_SERVICE_TIMEOUT,
2116 &put_migration_continuation, 2116 &put_migration_continuation,
2117 NULL); 2117 NULL);
@@ -2323,7 +2323,12 @@ process_local_reply (void *cls,
2323 &query)) 2323 &query))
2324 { 2324 {
2325 GNUNET_break (0); 2325 GNUNET_break (0);
2326 /* FIXME: consider removing the block? */ 2326 GNUNET_DATASTORE_remove (dsh,
2327 key,
2328 size, data,
2329 -1, -1,
2330 GNUNET_TIME_UNIT_FOREVER_REL,
2331 NULL, NULL);
2327 GNUNET_DATASTORE_get_next (dsh, GNUNET_YES); 2332 GNUNET_DATASTORE_get_next (dsh, GNUNET_YES);
2328 return; 2333 return;
2329 } 2334 }
@@ -2671,8 +2676,8 @@ handle_p2p_get (void *cls,
2671 pr->qe = GNUNET_DATASTORE_get (dsh, 2676 pr->qe = GNUNET_DATASTORE_get (dsh,
2672 &gm->query, 2677 &gm->query,
2673 type, 2678 type,
2674 (unsigned int) preference, 64 /* FIXME */, 2679 pr->priority + 1,
2675 2680 MAX_DATASTORE_QUEUE,
2676 timeout, 2681 timeout,
2677 &process_local_reply, 2682 &process_local_reply,
2678 pr); 2683 pr);