[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26367 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26367 - gnunet/src/dht |
Date: |
Fri, 8 Mar 2013 16:51:04 +0100 |
Author: bartpolot
Date: 2013-03-08 16:51:04 +0100 (Fri, 08 Mar 2013)
New Revision: 26367
Modified:
gnunet/src/dht/gnunet-service-dht_datacache.c
gnunet/src/dht/gnunet-service-dht_neighbours.c
Log:
- more verbosity in DEBUG
Modified: gnunet/src/dht/gnunet-service-dht_datacache.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_datacache.c 2013-03-08 15:49:02 UTC
(rev 26366)
+++ gnunet/src/dht/gnunet-service-dht_datacache.c 2013-03-08 15:51:04 UTC
(rev 26367)
@@ -58,6 +58,8 @@
enum GNUNET_BLOCK_Type type, size_t data_size,
const void *data)
{
+ int r;
+
if (NULL == datacache)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -73,9 +75,11 @@
GNUNET_STATISTICS_update (GDS_stats,
gettext_noop ("# ITEMS stored in datacache"), 1,
GNUNET_NO);
- (void) GNUNET_DATACACHE_put (datacache, key,
- data_size, data, type,
- expiration, put_path_length, put_path);
+ r = GNUNET_DATACACHE_put (datacache, key, data_size, data, type, expiration,
+ put_path_length, put_path);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "DATACACHE PUT for key %s [%u] completed (%d) after %u hops\n",
+ GNUNET_h2s (key), data_size, r, put_path_length);
}
@@ -220,6 +224,7 @@
uint32_t reply_bf_mutator)
{
struct GetRequestContext ctx;
+ unsigned int r;
if (datacache == NULL)
return GNUNET_BLOCK_EVALUATION_REQUEST_VALID;
@@ -232,8 +237,11 @@
ctx.xquery_size = xquery_size;
ctx.reply_bf = reply_bf;
ctx.reply_bf_mutator = reply_bf_mutator;
- (void) GNUNET_DATACACHE_get (datacache, key, type, &datacache_get_iterator,
- &ctx);
+ r = GNUNET_DATACACHE_get (datacache, key, type, &datacache_get_iterator,
+ &ctx);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "DATACACHE GET for key %s completed (%d). %u resoutlf found.\n",
+ GNUNET_h2s (key), ctx.eval, r);
return ctx.eval;
}
Modified: gnunet/src/dht/gnunet-service-dht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_neighbours.c 2013-03-08 15:49:02 UTC
(rev 26366)
+++ gnunet/src/dht/gnunet-service-dht_neighbours.c 2013-03-08 15:51:04 UTC
(rev 26367)
@@ -1875,9 +1875,12 @@
char *tmp;
tmp = GNUNET_strdup (GNUNET_i2s (&my_identity));
- LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "XDHT GET %s: %s->%s (%u)\n",
+ LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "XDHT GET %s: %s->%s (%u,
%u=>%u)\n",
GNUNET_h2s (&get->key), GNUNET_i2s (peer), tmp,
- ntohl(get->hop_count));
+ ntohl(get->hop_count),
+ GNUNET_CRYPTO_hash_matching_bits (&peer->hashPubKey,
&get->key),
+ GNUNET_CRYPTO_hash_matching_bits (&my_identity.hashPubKey,
&get->key)
+ );
GNUNET_free (tmp);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26367 - gnunet/src/dht,
gnunet <=