aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r--src/fs/gnunet-service-fs.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 7f2230747..9b8a14052 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -47,7 +47,7 @@
47#include "gnunet-service-fs_indexing.h" 47#include "gnunet-service-fs_indexing.h"
48#include "fs.h" 48#include "fs.h"
49 49
50#define DEBUG_FS 2 50#define DEBUG_FS GNUNET_NO
51 51
52/** 52/**
53 * Maximum number of outgoing messages we queue per peer. 53 * Maximum number of outgoing messages we queue per peer.
@@ -1188,8 +1188,10 @@ transmit_query_continuation (void *cls,
1188 1188
1189 if (tpid == 0) 1189 if (tpid == 0)
1190 { 1190 {
1191#if DEBUG_FS
1191 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1192 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1192 "Transmission of request failed, will try again later.\n"); 1193 "Transmission of request failed, will try again later.\n");
1194#endif
1193 if (pr->task == GNUNET_SCHEDULER_NO_TASK) 1195 if (pr->task == GNUNET_SCHEDULER_NO_TASK)
1194 pr->task = GNUNET_SCHEDULER_add_delayed (sched, 1196 pr->task = GNUNET_SCHEDULER_add_delayed (sched,
1195 get_processing_delay (), 1197 get_processing_delay (),
@@ -1863,14 +1865,18 @@ process_reply (void *cls,
1863 gettext_noop ("# duplicate replies discarded (bloomfilter)"), 1865 gettext_noop ("# duplicate replies discarded (bloomfilter)"),
1864 1, 1866 1,
1865 GNUNET_NO); 1867 GNUNET_NO);
1868#if DEBUG_FS
1866 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1869 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1867 "Duplicate response `%s', discarding.\n", 1870 "Duplicate response `%s', discarding.\n",
1868 GNUNET_h2s (&mhash)); 1871 GNUNET_h2s (&mhash));
1872#endif
1869 return GNUNET_YES; /* duplicate */ 1873 return GNUNET_YES; /* duplicate */
1870 } 1874 }
1875#if DEBUG_FS
1871 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1876 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1872 "New response `%s', adding to filter.\n", 1877 "New response `%s', adding to filter.\n",
1873 GNUNET_h2s (&mhash)); 1878 GNUNET_h2s (&mhash));
1879#endif
1874 GNUNET_CONTAINER_bloomfilter_add (pr->bf, 1880 GNUNET_CONTAINER_bloomfilter_add (pr->bf,
1875 &mhash); 1881 &mhash);
1876 } 1882 }
@@ -1970,9 +1976,11 @@ process_reply (void *cls,
1970 } 1976 }
1971 if (GNUNET_YES == do_remove) 1977 if (GNUNET_YES == do_remove)
1972 { 1978 {
1979#if DEBUG_FS
1973 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1980 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1974 "Removing request `%s' from request map (has been satisfied)\n", 1981 "Removing request `%s' from request map (has been satisfied)\n",
1975 GNUNET_h2s (key)); 1982 GNUNET_h2s (key));
1983#endif
1976 GNUNET_break (GNUNET_YES == 1984 GNUNET_break (GNUNET_YES ==
1977 GNUNET_CONTAINER_multihashmap_remove (query_request_map, 1985 GNUNET_CONTAINER_multihashmap_remove (query_request_map,
1978 key, 1986 key,
@@ -2210,10 +2218,12 @@ process_local_reply (void *cls,
2210 pr); 2218 pr);
2211 return; 2219 return;
2212 } 2220 }
2221#if DEBUG_FS
2213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2222 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2214 "New local response to `%s' of type %u.\n", 2223 "New local response to `%s' of type %u.\n",
2215 GNUNET_h2s (key), 2224 GNUNET_h2s (key),
2216 type); 2225 type);
2226#endif
2217 if (type == GNUNET_DATASTORE_BLOCKTYPE_ONDEMAND) 2227 if (type == GNUNET_DATASTORE_BLOCKTYPE_ONDEMAND)
2218 { 2228 {
2219#if DEBUG_FS 2229#if DEBUG_FS
@@ -2274,10 +2284,14 @@ process_local_reply (void *cls,
2274 pr->bf_size, 2284 pr->bf_size,
2275 BLOOMFILTER_K); 2285 BLOOMFILTER_K);
2276 } 2286 }
2287#if DEBUG_FS
2277 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2288 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2278 "New local response `%s', adding to filter.\n", 2289 "New local response `%s', adding to filter.\n",
2279 GNUNET_h2s (&mhash)); 2290 GNUNET_h2s (&mhash));
2291#endif
2280#if 0 2292#if 0
2293 /* this would break stuff since we will check the bf later
2294 again (and would then discard the reply!) */
2281 GNUNET_CONTAINER_bloomfilter_add (pr->bf, 2295 GNUNET_CONTAINER_bloomfilter_add (pr->bf,
2282 &mhash); 2296 &mhash);
2283#endif 2297#endif