minor fixmes
authorChristian Grothoff <christian@grothoff.org>
Sun, 11 Jul 2010 12:48:34 +0000 (12:48 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 11 Jul 2010 12:48:34 +0000 (12:48 +0000)
TODO
contrib/defaults.conf
src/fs/gnunet-search.c
src/fs/gnunet-service-fs.c

diff --git a/TODO b/TODO
index bd22ce3b62b0d4047656ae9710b0b2b253bec336..914c78ee5541a71d467138825755ed61e5fe58a3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -18,7 +18,6 @@
   - implement performance tests
 * FS: [CG]
   - trust: do not charge when "idle" / load considerations (migration, routing)
-  - listing of learned namespaces
   - artificial delays
   - active reply route caching design & implementation of service; gap extension!
   - utilize in-line files in meta data always (including in search results or
@@ -52,7 +51,7 @@
     + download resume
     + publish resume
     + publish error
-  - implement new-pseudonym dialog
+  - implement new-pseudonym and advertise-pseudonym dialogs
   - namespace search
   - NS list in search dialog should use colors to offset our own namespaces from the others
   - double-clicking on NS list in search dialog should move 'root' to keyword line
index def529812b9381200efaf3e887e0b9f746e2c659..0e5d9ef11fd17fb268e9e47af6ffbff7b097a22f 100644 (file)
@@ -214,4 +214,6 @@ ACTIVEMIGRATION = YES
 UNIXPATH = /tmp/gnunet-service-fs.sock
 # DISABLE_SOCKET_FORWARDING = NO
 # DEBUG = YES
-
+MAX_PENDING_REQUESTS = 65536
+MIN_MIGRATION_DELAY = 1000
+EXPECTED_NEIGHBOUR_COUNT = 128
index 0289a8bd1d78ae2ba5ff98a0a0a2ab06777349e4..ab3f6b0c7d8a2e2b1d4a1eb81b455bc3f2cefc6c 100644 (file)
@@ -171,7 +171,7 @@ progress_cb (void *cls,
        GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result.meta, 
                                            &item_printer,
                                            NULL);
-      printf ("\n");
+      printf ("\n"); 
       fflush(stdout);
       GNUNET_free_non_null (filename);
       GNUNET_free (uri);
index 2157ff5f5e40174e5d84621c980094f5cb3deed3..9de8bca5c8538ee98850db2b34f5484a91018aa0 100644 (file)
@@ -56,7 +56,6 @@
  */
 #define TRUST_FLUSH_FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
 
-
 /**
  * Inverse of the probability that we will submit the same query
  * to the same peer again.  If the same peer already got the query
  */
 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 45)
 
-
-
 /**
  * Maximum number of requests (from other peers) that we're
  * willing to have pending at any given point in time.
- * FIXME: set from configuration.
  */
 static uint64_t max_pending_requests = (32 * 1024);
 
@@ -3669,14 +3665,34 @@ main_init (struct GNUNET_SCHEDULER_Handle *s,
      0 },
     {NULL, NULL, 0, 0}
   };
+  unsigned long long enc = 128;
 
   sched = s;
   cfg = c;
   stats = GNUNET_STATISTICS_create (sched, "fs", cfg);
-  min_migration_delay = GNUNET_TIME_UNIT_SECONDS; // FIXME: get from config
-  connected_peers = GNUNET_CONTAINER_multihashmap_create (128); // FIXME: get size from config
-  query_request_map = GNUNET_CONTAINER_multihashmap_create (128); // FIXME: get size from config
-  peer_request_map = GNUNET_CONTAINER_multihashmap_create (128); // FIXME: get size from config
+  min_migration_delay = GNUNET_TIME_UNIT_SECONDS;
+  if ( (GNUNET_OK !=
+       GNUNET_CONFIGURATION_get_value_number (cfg,
+                                              "fs",
+                                              "MAX_PENDING_REQUESTS",
+                                              &max_pending_requests)) ||
+       (GNUNET_OK !=
+       GNUNET_CONFIGURATION_get_value_number (cfg,
+                                              "fs",
+                                              "EXPECTED_NEIGHBOUR_COUNT",
+                                              &enc)) ||
+       (GNUNET_OK != 
+       GNUNET_CONFIGURATION_get_value_time (cfg,
+                                            "fs",
+                                            "MIN_MIGRATION_DELAY",
+                                            &min_migration_delay)) )
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                 _("Configuration fails to specify certain parameters, assuming default values."));
+    }
+  connected_peers = GNUNET_CONTAINER_multihashmap_create (enc); 
+  query_request_map = GNUNET_CONTAINER_multihashmap_create (max_pending_requests);
+  peer_request_map = GNUNET_CONTAINER_multihashmap_create (enc);
   requests_by_expiration_heap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); 
   core = GNUNET_CORE_connect (sched,
                              cfg,