stuff
authorChristian Grothoff <christian@grothoff.org>
Sat, 15 May 2010 17:50:41 +0000 (17:50 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 15 May 2010 17:50:41 +0000 (17:50 +0000)
src/fs/fs.h
src/fs/gnunet-service-fs.c

index c0e2033358a730b7dcad5786de55e94e2ece29d7..9901cd173fb1ead5f91454a8ca70733f24a5f238 100644 (file)
 #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.
  */
index f0eb08751584965ab2d4f4b7641c60da56b48fe7..8bec62b084db9ca11a8373d1b77a8a4c1e86e30d 100644 (file)
@@ -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);