aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-22 14:53:11 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-22 14:53:11 +0100
commit0244c0d86cd86e4cc90e0c112c6edeafdfb558c2 (patch)
treeb534b32562883064a09d856f700995a2f1b5cc42 /src/dht/gnunet-service-dht_neighbours.c
parent7184623654f81c1ba557f8fa95a3086342b4af6b (diff)
downloadgnunet-0244c0d86cd86e4cc90e0c112c6edeafdfb558c2.tar.gz
gnunet-0244c0d86cd86e4cc90e0c112c6edeafdfb558c2.zip
strcmp instead of memcmp
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 346925032..bb6285730 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1665,10 +1665,13 @@ handle_dht_p2p_put (void *cls,
1665 if (GNUNET_YES == log_route_details_stderr) 1665 if (GNUNET_YES == log_route_details_stderr)
1666 { 1666 {
1667 char *tmp; 1667 char *tmp;
1668 char *pp;
1668 1669
1670 pp = GNUNET_STRINGS_pp2s (put_path,
1671 putlen);
1669 tmp = GNUNET_strdup (GNUNET_i2s (&my_identity)); 1672 tmp = GNUNET_strdup (GNUNET_i2s (&my_identity));
1670 LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, 1673 LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
1671 "R5N PUT %s: %s->%s (%u, %u=>%u)\n", 1674 "R5N PUT %s: %s->%s (%u, %u=>%u, PP: %s)\n",
1672 GNUNET_h2s (&put->key), 1675 GNUNET_h2s (&put->key),
1673 GNUNET_i2s (peer->id), 1676 GNUNET_i2s (peer->id),
1674 tmp, 1677 tmp,
@@ -1676,8 +1679,9 @@ handle_dht_p2p_put (void *cls,
1676 GNUNET_CRYPTO_hash_matching_bits (&peer->phash, 1679 GNUNET_CRYPTO_hash_matching_bits (&peer->phash,
1677 &put->key), 1680 &put->key),
1678 GNUNET_CRYPTO_hash_matching_bits (&my_identity_hash, 1681 GNUNET_CRYPTO_hash_matching_bits (&my_identity_hash,
1679 &put->key) 1682 &put->key),
1680 ); 1683 pp);
1684 GNUNET_free (pp);
1681 GNUNET_free (tmp); 1685 GNUNET_free (tmp);
1682 } 1686 }
1683 switch (GNUNET_BLOCK_get_key 1687 switch (GNUNET_BLOCK_get_key
@@ -1965,6 +1969,15 @@ handle_local_result (void *cls,
1965 const void *data, 1969 const void *data,
1966 size_t data_size) 1970 size_t data_size)
1967{ 1971{
1972 char *pp;
1973
1974 pp = GNUNET_STRINGS_pp2s (put_path,
1975 put_path_length);
1976 LOG (GNUNET_ERROR_TYPE_DEBUG,
1977 "Found local result for %s (PP: %s)\n",
1978 GNUNET_h2s (key),
1979 pp);
1980 GNUNET_free (pp);
1968 // FIXME: we can probably do better here by 1981 // FIXME: we can probably do better here by
1969 // passing the peer that did the query in the closure... 1982 // passing the peer that did the query in the closure...
1970 GDS_ROUTING_process (NULL, 1983 GDS_ROUTING_process (NULL,
@@ -2243,14 +2256,23 @@ handle_dht_p2p_result (void *cls,
2243 if (GNUNET_YES == log_route_details_stderr) 2256 if (GNUNET_YES == log_route_details_stderr)
2244 { 2257 {
2245 char *tmp; 2258 char *tmp;
2259 char *pp;
2260 char *gp;
2246 2261
2262 gp = GNUNET_STRINGS_pp2s (get_path,
2263 get_path_length);
2264 pp = GNUNET_STRINGS_pp2s (put_path,
2265 put_path_length);
2247 tmp = GNUNET_strdup (GNUNET_i2s (&my_identity)); 2266 tmp = GNUNET_strdup (GNUNET_i2s (&my_identity));
2248 LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, 2267 LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
2249 "R5N RESULT %s: %s->%s (%u)\n", 2268 "R5N RESULT %s: %s->%s (GP: %s, PP: %s)\n",
2250 GNUNET_h2s (&prm->key), 2269 GNUNET_h2s (&prm->key),
2251 GNUNET_i2s (peer->id), 2270 GNUNET_i2s (peer->id),
2252 tmp, 2271 tmp,
2253 get_path_length + 1); 2272 gp,
2273 pp);
2274 GNUNET_free (gp);
2275 GNUNET_free (pp);
2254 GNUNET_free (tmp); 2276 GNUNET_free (tmp);
2255 } 2277 }
2256 /* if we got a HELLO, consider it for our own routing table */ 2278 /* if we got a HELLO, consider it for our own routing table */