aboutsummaryrefslogtreecommitdiff
path: root/src/dht/plugin_block_dht.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 21:03:31 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 21:03:31 +0000
commit6d5b099541c60303b664547f18f4aaa864e33d68 (patch)
tree3169f571d3f66ec23ab540d17c012f00103688f2 /src/dht/plugin_block_dht.c
parenta0ba5b741b56036bd35bd9ba88164324b2ff7ada (diff)
downloadgnunet-6d5b099541c60303b664547f18f4aaa864e33d68.tar.gz
gnunet-6d5b099541c60303b664547f18f4aaa864e33d68.zip
-getting core, nse, testbed, ats-tool and peerinfo-tool to compile again (part of #3047)
Diffstat (limited to 'src/dht/plugin_block_dht.c')
-rw-r--r--src/dht/plugin_block_dht.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c
index ac4732cff..a21167fb0 100644
--- a/src/dht/plugin_block_dht.c
+++ b/src/dht/plugin_block_dht.c
@@ -42,11 +42,11 @@
42 * @param type block type 42 * @param type block type
43 * @param query original query (hash) 43 * @param query original query (hash)
44 * @param bf pointer to bloom filter associated with query; possibly updated (!) 44 * @param bf pointer to bloom filter associated with query; possibly updated (!)
45 * @param bf_mutator mutation value for bf 45 * @param bf_mutator mutation value for @a bf
46 * @param xquery extended query data (can be NULL, depending on type) 46 * @param xquery extended query data (can be NULL, depending on type)
47 * @param xquery_size number of bytes in xquery 47 * @param xquery_size number of bytes in @a xquery
48 * @param reply_block response to validate 48 * @param reply_block response to validate
49 * @param reply_block_size number of bytes in reply block 49 * @param reply_block_size number of bytes in @a reply_block
50 * @return characterization of result 50 * @return characterization of result
51 */ 51 */
52static enum GNUNET_BLOCK_EvaluationResult 52static enum GNUNET_BLOCK_EvaluationResult
@@ -61,6 +61,7 @@ block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
61 const struct GNUNET_HELLO_Message *hello; 61 const struct GNUNET_HELLO_Message *hello;
62 struct GNUNET_PeerIdentity pid; 62 struct GNUNET_PeerIdentity pid;
63 const struct GNUNET_MessageHeader *msg; 63 const struct GNUNET_MessageHeader *msg;
64 struct GNUNET_HashCode phash;
64 65
65 if (type != GNUNET_BLOCK_TYPE_DHT_HELLO) 66 if (type != GNUNET_BLOCK_TYPE_DHT_HELLO)
66 return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED; 67 return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
@@ -90,7 +91,8 @@ block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
90 } 91 }
91 if (NULL != bf) 92 if (NULL != bf)
92 { 93 {
93 GNUNET_BLOCK_mingle_hash (&pid.hashPubKey, bf_mutator, &mhash); 94 GNUNET_CRYPTO_hash (&pid, sizeof (pid), &phash);
95 GNUNET_BLOCK_mingle_hash (&phash, bf_mutator, &mhash);
94 if (NULL != *bf) 96 if (NULL != *bf)
95 { 97 {
96 if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf, &mhash)) 98 if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf, &mhash))
@@ -114,9 +116,9 @@ block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
114 * @param cls closure 116 * @param cls closure
115 * @param type block type 117 * @param type block type
116 * @param block block to get the key for 118 * @param block block to get the key for
117 * @param block_size number of bytes in block 119 * @param block_size number of bytes @a block
118 * @param key set to the key (query) for the given block 120 * @param key set to the key (query) for the given block
119 * @return GNUNET_OK on success, GNUNET_SYSERR if type not supported 121 * @return #GNUNET_OK on success, #GNUNET_SYSERR if type not supported
120 * (or if extracting a key from a block of this type does not work) 122 * (or if extracting a key from a block of this type does not work)
121 */ 123 */
122static int 124static int