diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-03-08 15:51:04 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-03-08 15:51:04 +0000 |
commit | 3b064f6599baeb97031095d47fff52b42f609edc (patch) | |
tree | 25828cbf8d0304cb400c4e42336c428c22803172 /src/dht/gnunet-service-dht_datacache.c | |
parent | 0f64d704e6776161345bec1f9137a3ee1df4d6fa (diff) | |
download | gnunet-3b064f6599baeb97031095d47fff52b42f609edc.tar.gz gnunet-3b064f6599baeb97031095d47fff52b42f609edc.zip |
- more verbosity in DEBUG
Diffstat (limited to 'src/dht/gnunet-service-dht_datacache.c')
-rw-r--r-- | src/dht/gnunet-service-dht_datacache.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c index 87c93f559..2b9c18542 100644 --- a/src/dht/gnunet-service-dht_datacache.c +++ b/src/dht/gnunet-service-dht_datacache.c | |||
@@ -58,6 +58,8 @@ GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration, | |||
58 | enum GNUNET_BLOCK_Type type, size_t data_size, | 58 | enum GNUNET_BLOCK_Type type, size_t data_size, |
59 | const void *data) | 59 | const void *data) |
60 | { | 60 | { |
61 | int r; | ||
62 | |||
61 | if (NULL == datacache) | 63 | if (NULL == datacache) |
62 | { | 64 | { |
63 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 65 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -73,9 +75,11 @@ GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration, | |||
73 | GNUNET_STATISTICS_update (GDS_stats, | 75 | GNUNET_STATISTICS_update (GDS_stats, |
74 | gettext_noop ("# ITEMS stored in datacache"), 1, | 76 | gettext_noop ("# ITEMS stored in datacache"), 1, |
75 | GNUNET_NO); | 77 | GNUNET_NO); |
76 | (void) GNUNET_DATACACHE_put (datacache, key, | 78 | r = GNUNET_DATACACHE_put (datacache, key, data_size, data, type, expiration, |
77 | data_size, data, type, | 79 | put_path_length, put_path); |
78 | expiration, put_path_length, put_path); | 80 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
81 | "DATACACHE PUT for key %s [%u] completed (%d) after %u hops\n", | ||
82 | GNUNET_h2s (key), data_size, r, put_path_length); | ||
79 | } | 83 | } |
80 | 84 | ||
81 | 85 | ||
@@ -220,6 +224,7 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key, | |||
220 | uint32_t reply_bf_mutator) | 224 | uint32_t reply_bf_mutator) |
221 | { | 225 | { |
222 | struct GetRequestContext ctx; | 226 | struct GetRequestContext ctx; |
227 | unsigned int r; | ||
223 | 228 | ||
224 | if (datacache == NULL) | 229 | if (datacache == NULL) |
225 | return GNUNET_BLOCK_EVALUATION_REQUEST_VALID; | 230 | return GNUNET_BLOCK_EVALUATION_REQUEST_VALID; |
@@ -232,8 +237,11 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key, | |||
232 | ctx.xquery_size = xquery_size; | 237 | ctx.xquery_size = xquery_size; |
233 | ctx.reply_bf = reply_bf; | 238 | ctx.reply_bf = reply_bf; |
234 | ctx.reply_bf_mutator = reply_bf_mutator; | 239 | ctx.reply_bf_mutator = reply_bf_mutator; |
235 | (void) GNUNET_DATACACHE_get (datacache, key, type, &datacache_get_iterator, | 240 | r = GNUNET_DATACACHE_get (datacache, key, type, &datacache_get_iterator, |
236 | &ctx); | 241 | &ctx); |
242 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
243 | "DATACACHE GET for key %s completed (%d). %u resoutlf found.\n", | ||
244 | GNUNET_h2s (key), ctx.eval, r); | ||
237 | return ctx.eval; | 245 | return ctx.eval; |
238 | } | 246 | } |
239 | 247 | ||