summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dht/plugin_block_dht.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c
index 9ff67fa4e..5b6841a98 100644
--- a/src/dht/plugin_block_dht.c
+++ b/src/dht/plugin_block_dht.c
@@ -254,14 +254,23 @@ block_plugin_dht_check_reply (
}
case GNUNET_BLOCK_TYPE_DHT_URL_HELLO:
{
- struct GNUNET_HashCode phash;
+ struct GNUNET_HELLO_Builder *b;
+ struct GNUNET_PeerIdentity pid;
+ struct GNUNET_HashCode h_pid;
- GNUNET_CRYPTO_hash (reply_block,
- reply_block_size,
- &phash);
+ b = GNUNET_HELLO_builder_from_block (reply_block,
+ reply_block_size);
+ GNUNET_assert (NULL != b);
+ GNUNET_HELLO_builder_iterate (b,
+ &pid,
+ NULL, NULL);
+ GNUNET_CRYPTO_hash (&pid,
+ sizeof (pid),
+ &h_pid);
+ GNUNET_HELLO_builder_free (b);
if (GNUNET_YES ==
GNUNET_BLOCK_GROUP_bf_test_and_set (group,
- &phash))
+ &h_pid))
return GNUNET_BLOCK_REPLY_OK_DUPLICATE;
return GNUNET_BLOCK_REPLY_OK_MORE;
}