aboutsummaryrefslogtreecommitdiff
path: root/src/dns/plugin_block_dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/plugin_block_dns.c')
-rw-r--r--src/dns/plugin_block_dns.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index a596beb28..0531a8a5f 100644
--- a/src/dns/plugin_block_dns.c
+++ b/src/dns/plugin_block_dns.c
@@ -46,7 +46,6 @@
46 * 46 *
47 * @param ctx block context in which the block group is created 47 * @param ctx block context in which the block group is created
48 * @param type type of the block for which we are creating the group 48 * @param type type of the block for which we are creating the group
49 * @param nonce random value used to seed the group creation
50 * @param raw_data optional serialized prior state of the group, NULL if unavailable/fresh 49 * @param raw_data optional serialized prior state of the group, NULL if unavailable/fresh
51 * @param raw_data_size number of bytes in @a raw_data, 0 if unavailable/fresh 50 * @param raw_data_size number of bytes in @a raw_data, 0 if unavailable/fresh
52 * @param va variable arguments specific to @a type 51 * @param va variable arguments specific to @a type
@@ -56,7 +55,6 @@
56static struct GNUNET_BLOCK_Group * 55static struct GNUNET_BLOCK_Group *
57block_plugin_dns_create_group (void *cls, 56block_plugin_dns_create_group (void *cls,
58 enum GNUNET_BLOCK_Type type, 57 enum GNUNET_BLOCK_Type type,
59 uint32_t nonce,
60 const void *raw_data, 58 const void *raw_data,
61 size_t raw_data_size, 59 size_t raw_data_size,
62 va_list va) 60 va_list va)
@@ -83,7 +81,6 @@ block_plugin_dns_create_group (void *cls,
83 bf_size, 81 bf_size,
84 BLOOMFILTER_K, 82 BLOOMFILTER_K,
85 type, 83 type,
86 nonce,
87 raw_data, 84 raw_data,
88 raw_data_size); 85 raw_data_size);
89} 86}
@@ -102,19 +99,19 @@ block_plugin_dns_create_group (void *cls,
102 */ 99 */
103static enum GNUNET_GenericReturnValue 100static enum GNUNET_GenericReturnValue
104block_plugin_dns_check_query (void *cls, 101block_plugin_dns_check_query (void *cls,
105 enum GNUNET_BLOCK_Type type, 102 enum GNUNET_BLOCK_Type type,
106 const struct GNUNET_HashCode *query, 103 const struct GNUNET_HashCode *query,
107 const void *xquery, 104 const void *xquery,
108 size_t xquery_size) 105 size_t xquery_size)
109{ 106{
110 switch (type) 107 switch (type)
111 { 108 {
112 case GNUNET_BLOCK_TYPE_DNS: 109 case GNUNET_BLOCK_TYPE_DNS:
113 if (0 != xquery_size) 110 if (0 != xquery_size)
114 { 111 {
115 GNUNET_break_op (0); 112 GNUNET_break_op (0);
116 return GNUNET_NO; 113 return GNUNET_NO;
117 } 114 }
118 return GNUNET_OK; 115 return GNUNET_OK;
119 default: 116 default:
120 GNUNET_break (0); 117 GNUNET_break (0);
@@ -158,7 +155,7 @@ block_plugin_dns_check_block (void *cls,
158 return GNUNET_NO; 155 return GNUNET_NO;
159 } 156 }
160 if (GNUNET_TIME_absolute_is_past ( 157 if (GNUNET_TIME_absolute_is_past (
161 GNUNET_TIME_absolute_ntoh (ad->expiration_time))) 158 GNUNET_TIME_absolute_ntoh (ad->expiration_time)))
162 { 159 {
163 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 160 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
164 "DNS advertisement has expired\n"); 161 "DNS advertisement has expired\n");
@@ -199,14 +196,14 @@ block_plugin_dns_check_block (void *cls,
199 */ 196 */
200static enum GNUNET_BLOCK_ReplyEvaluationResult 197static enum GNUNET_BLOCK_ReplyEvaluationResult
201block_plugin_dns_check_reply ( 198block_plugin_dns_check_reply (
202 void *cls, 199 void *cls,
203 enum GNUNET_BLOCK_Type type, 200 enum GNUNET_BLOCK_Type type,
204 struct GNUNET_BLOCK_Group *group, 201 struct GNUNET_BLOCK_Group *group,
205 const struct GNUNET_HashCode *query, 202 const struct GNUNET_HashCode *query,
206 const void *xquery, 203 const void *xquery,
207 size_t xquery_size, 204 size_t xquery_size,
208 const void *reply_block, 205 const void *reply_block,
209 size_t reply_block_size) 206 size_t reply_block_size)
210{ 207{
211 struct GNUNET_HashCode phash; 208 struct GNUNET_HashCode phash;
212 209