diff options
Diffstat (limited to 'src/block/plugin_block_dht.c')
-rw-r--r-- | src/block/plugin_block_dht.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/block/plugin_block_dht.c b/src/block/plugin_block_dht.c index 1fe51e1a3..614628a40 100644 --- a/src/block/plugin_block_dht.c +++ b/src/block/plugin_block_dht.c | |||
@@ -49,14 +49,12 @@ | |||
49 | * @return characterization of result | 49 | * @return characterization of result |
50 | */ | 50 | */ |
51 | static enum GNUNET_BLOCK_EvaluationResult | 51 | static enum GNUNET_BLOCK_EvaluationResult |
52 | block_plugin_dht_evaluate (void *cls, | 52 | block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type, |
53 | enum GNUNET_BLOCK_Type type, | ||
54 | const GNUNET_HashCode * query, | 53 | const GNUNET_HashCode * query, |
55 | struct GNUNET_CONTAINER_BloomFilter **bf, | 54 | struct GNUNET_CONTAINER_BloomFilter **bf, |
56 | int32_t bf_mutator, | 55 | int32_t bf_mutator, const void *xquery, |
57 | const void *xquery, | 56 | size_t xquery_size, const void *reply_block, |
58 | size_t xquery_size, | 57 | size_t reply_block_size) |
59 | const void *reply_block, size_t reply_block_size) | ||
60 | { | 58 | { |
61 | switch (type) | 59 | switch (type) |
62 | { | 60 | { |
@@ -85,10 +83,9 @@ block_plugin_dht_evaluate (void *cls, | |||
85 | * (or if extracting a key from a block of this type does not work) | 83 | * (or if extracting a key from a block of this type does not work) |
86 | */ | 84 | */ |
87 | static int | 85 | static int |
88 | block_plugin_dht_get_key (void *cls, | 86 | block_plugin_dht_get_key (void *cls, enum GNUNET_BLOCK_Type type, |
89 | enum GNUNET_BLOCK_Type type, | 87 | const void *block, size_t block_size, |
90 | const void *block, | 88 | GNUNET_HashCode * key) |
91 | size_t block_size, GNUNET_HashCode * key) | ||
92 | { | 89 | { |
93 | const struct GNUNET_MessageHeader *msg; | 90 | const struct GNUNET_MessageHeader *msg; |
94 | const struct GNUNET_HELLO_Message *hello; | 91 | const struct GNUNET_HELLO_Message *hello; |
@@ -98,16 +95,14 @@ block_plugin_dht_get_key (void *cls, | |||
98 | return GNUNET_SYSERR; | 95 | return GNUNET_SYSERR; |
99 | if (block_size < sizeof (struct GNUNET_MessageHeader)) | 96 | if (block_size < sizeof (struct GNUNET_MessageHeader)) |
100 | { | 97 | { |
101 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, | 98 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "block-dht", |
102 | "block-dht", | ||
103 | _("Block not of type %u\n"), GNUNET_BLOCK_TYPE_DHT_HELLO); | 99 | _("Block not of type %u\n"), GNUNET_BLOCK_TYPE_DHT_HELLO); |
104 | return GNUNET_NO; | 100 | return GNUNET_NO; |
105 | } | 101 | } |
106 | msg = block; | 102 | msg = block; |
107 | if (block_size != ntohs (msg->size)) | 103 | if (block_size != ntohs (msg->size)) |
108 | { | 104 | { |
109 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, | 105 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "block-dht", |
110 | "block-dht", | ||
111 | _("Size mismatch for block\n"), | 106 | _("Size mismatch for block\n"), |
112 | GNUNET_BLOCK_TYPE_DHT_HELLO); | 107 | GNUNET_BLOCK_TYPE_DHT_HELLO); |
113 | return GNUNET_NO; | 108 | return GNUNET_NO; |
@@ -116,8 +111,7 @@ block_plugin_dht_get_key (void *cls, | |||
116 | pid = (struct GNUNET_PeerIdentity *) key; | 111 | pid = (struct GNUNET_PeerIdentity *) key; |
117 | if (GNUNET_OK != GNUNET_HELLO_get_id (hello, pid)) | 112 | if (GNUNET_OK != GNUNET_HELLO_get_id (hello, pid)) |
118 | { | 113 | { |
119 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, | 114 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "block-dht", |
120 | "block-dht", | ||
121 | _("Block of type %u is malformed\n"), | 115 | _("Block of type %u is malformed\n"), |
122 | GNUNET_BLOCK_TYPE_DHT_HELLO); | 116 | GNUNET_BLOCK_TYPE_DHT_HELLO); |
123 | return GNUNET_NO; | 117 | return GNUNET_NO; |