diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-27 19:22:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-27 19:22:50 +0000 |
commit | d5770b6e1636cd96a3e5ded9af68e6e953a83c2c (patch) | |
tree | 94b4ebcba62d531865e680c9206ab738adfa3d00 | |
parent | 968c522ea9f43890b81815b2bf9fc13901257ffe (diff) | |
download | gnunet-d5770b6e1636cd96a3e5ded9af68e6e953a83c2c.tar.gz gnunet-d5770b6e1636cd96a3e5ded9af68e6e953a83c2c.zip |
-indent
-rw-r--r-- | src/gns/plugin_block_gns.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c index d8da01f5b..50ad01215 100644 --- a/src/gns/plugin_block_gns.c +++ b/src/gns/plugin_block_gns.c | |||
@@ -168,18 +168,20 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, | |||
168 | } | 168 | } |
169 | et.abs_value = exp; | 169 | et.abs_value = exp; |
170 | 170 | ||
171 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 171 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
172 | "Verifying signature of %d records for name %s with expiration of %u\n", | 172 | "Verifying signature of %d records for name %s with expiration of %u\n", |
173 | rd_count, name, et.abs_value); | 173 | rd_count, name, et.abs_value); |
174 | 174 | ||
175 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (&nrb->public_key, | 175 | if (GNUNET_OK != |
176 | et, | 176 | GNUNET_NAMESTORE_verify_signature (&nrb->public_key, |
177 | name, | 177 | et, |
178 | rd_count, | 178 | name, |
179 | rd, | 179 | rd_count, |
180 | &nrb->signature)) | 180 | rd, |
181 | &nrb->signature)) | ||
181 | { | 182 | { |
182 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Signature invalid for %s\n", name); | 183 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
184 | "Signature invalid for %s\n", name); | ||
183 | GNUNET_break_op (0); | 185 | GNUNET_break_op (0); |
184 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 186 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |
185 | } | 187 | } |
@@ -187,8 +189,8 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, | |||
187 | 189 | ||
188 | if (NULL != bf) | 190 | if (NULL != bf) |
189 | { | 191 | { |
190 | GNUNET_CRYPTO_hash(reply_block, reply_block_size, &chash); | 192 | GNUNET_CRYPTO_hash (reply_block, reply_block_size, &chash); |
191 | GNUNET_BLOCK_mingle_hash(&chash, bf_mutator, &mhash); | 193 | GNUNET_BLOCK_mingle_hash (&chash, bf_mutator, &mhash); |
192 | if (NULL != *bf) | 194 | if (NULL != *bf) |
193 | { | 195 | { |
194 | if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test(*bf, &mhash)) | 196 | if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test(*bf, &mhash)) |
@@ -221,13 +223,14 @@ block_plugin_gns_get_key (void *cls, enum GNUNET_BLOCK_Type type, | |||
221 | struct GNUNET_HashCode * key) | 223 | struct GNUNET_HashCode * key) |
222 | { | 224 | { |
223 | struct GNUNET_CRYPTO_ShortHashCode pkey_hash; | 225 | struct GNUNET_CRYPTO_ShortHashCode pkey_hash; |
224 | const struct GNSNameRecordBlock *nrb = (const struct GNSNameRecordBlock *)block; | 226 | const struct GNSNameRecordBlock *nrb = block; |
225 | const char *name; | 227 | const char *name; |
226 | 228 | ||
227 | if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD) | 229 | if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD) |
228 | return GNUNET_SYSERR; | 230 | return GNUNET_SYSERR; |
229 | name = (const char *) &nrb[1]; | 231 | name = (const char *) &nrb[1]; |
230 | if (NULL == memchr (name, '\0', block_size - sizeof (struct GNSNameRecordBlock))) | 232 | if (NULL == memchr (name, '\0', |
233 | block_size - sizeof (struct GNSNameRecordBlock))) | ||
231 | { | 234 | { |
232 | /* malformed, no 0-termination in name */ | 235 | /* malformed, no 0-termination in name */ |
233 | GNUNET_break_op (0); | 236 | GNUNET_break_op (0); |