diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-07-11 12:48:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-07-11 12:48:34 +0000 |
commit | 280cdde9cbaafea16e4a07b112fe6e2c7a915c83 (patch) | |
tree | d0da58091ff698112bad6c1c9939ce47a765fe51 /src/fs | |
parent | 099105f159a2030d4f10b7d01525a84bb29afd3a (diff) | |
download | gnunet-280cdde9cbaafea16e4a07b112fe6e2c7a915c83.tar.gz gnunet-280cdde9cbaafea16e4a07b112fe6e2c7a915c83.zip |
minor fixmes
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-search.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs.c | 32 |
2 files changed, 25 insertions, 9 deletions
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 0289a8bd1..ab3f6b0c7 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -171,7 +171,7 @@ progress_cb (void *cls, | |||
171 | GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result.meta, | 171 | GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result.meta, |
172 | &item_printer, | 172 | &item_printer, |
173 | NULL); | 173 | NULL); |
174 | printf ("\n"); | 174 | printf ("\n"); |
175 | fflush(stdout); | 175 | fflush(stdout); |
176 | GNUNET_free_non_null (filename); | 176 | GNUNET_free_non_null (filename); |
177 | GNUNET_free (uri); | 177 | GNUNET_free (uri); |
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 2157ff5f5..9de8bca5c 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -56,7 +56,6 @@ | |||
56 | */ | 56 | */ |
57 | #define TRUST_FLUSH_FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) | 57 | #define TRUST_FLUSH_FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) |
58 | 58 | ||
59 | |||
60 | /** | 59 | /** |
61 | * Inverse of the probability that we will submit the same query | 60 | * Inverse of the probability that we will submit the same query |
62 | * to the same peer again. If the same peer already got the query | 61 | * to the same peer again. If the same peer already got the query |
@@ -75,12 +74,9 @@ | |||
75 | */ | 74 | */ |
76 | #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 45) | 75 | #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 45) |
77 | 76 | ||
78 | |||
79 | |||
80 | /** | 77 | /** |
81 | * Maximum number of requests (from other peers) that we're | 78 | * Maximum number of requests (from other peers) that we're |
82 | * willing to have pending at any given point in time. | 79 | * willing to have pending at any given point in time. |
83 | * FIXME: set from configuration. | ||
84 | */ | 80 | */ |
85 | static uint64_t max_pending_requests = (32 * 1024); | 81 | static uint64_t max_pending_requests = (32 * 1024); |
86 | 82 | ||
@@ -3669,14 +3665,34 @@ main_init (struct GNUNET_SCHEDULER_Handle *s, | |||
3669 | 0 }, | 3665 | 0 }, |
3670 | {NULL, NULL, 0, 0} | 3666 | {NULL, NULL, 0, 0} |
3671 | }; | 3667 | }; |
3668 | unsigned long long enc = 128; | ||
3672 | 3669 | ||
3673 | sched = s; | 3670 | sched = s; |
3674 | cfg = c; | 3671 | cfg = c; |
3675 | stats = GNUNET_STATISTICS_create (sched, "fs", cfg); | 3672 | stats = GNUNET_STATISTICS_create (sched, "fs", cfg); |
3676 | min_migration_delay = GNUNET_TIME_UNIT_SECONDS; // FIXME: get from config | 3673 | min_migration_delay = GNUNET_TIME_UNIT_SECONDS; |
3677 | connected_peers = GNUNET_CONTAINER_multihashmap_create (128); // FIXME: get size from config | 3674 | if ( (GNUNET_OK != |
3678 | query_request_map = GNUNET_CONTAINER_multihashmap_create (128); // FIXME: get size from config | 3675 | GNUNET_CONFIGURATION_get_value_number (cfg, |
3679 | peer_request_map = GNUNET_CONTAINER_multihashmap_create (128); // FIXME: get size from config | 3676 | "fs", |
3677 | "MAX_PENDING_REQUESTS", | ||
3678 | &max_pending_requests)) || | ||
3679 | (GNUNET_OK != | ||
3680 | GNUNET_CONFIGURATION_get_value_number (cfg, | ||
3681 | "fs", | ||
3682 | "EXPECTED_NEIGHBOUR_COUNT", | ||
3683 | &enc)) || | ||
3684 | (GNUNET_OK != | ||
3685 | GNUNET_CONFIGURATION_get_value_time (cfg, | ||
3686 | "fs", | ||
3687 | "MIN_MIGRATION_DELAY", | ||
3688 | &min_migration_delay)) ) | ||
3689 | { | ||
3690 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
3691 | _("Configuration fails to specify certain parameters, assuming default values.")); | ||
3692 | } | ||
3693 | connected_peers = GNUNET_CONTAINER_multihashmap_create (enc); | ||
3694 | query_request_map = GNUNET_CONTAINER_multihashmap_create (max_pending_requests); | ||
3695 | peer_request_map = GNUNET_CONTAINER_multihashmap_create (enc); | ||
3680 | requests_by_expiration_heap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); | 3696 | requests_by_expiration_heap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); |
3681 | core = GNUNET_CORE_connect (sched, | 3697 | core = GNUNET_CORE_connect (sched, |
3682 | cfg, | 3698 | cfg, |