diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-03 19:00:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-03 19:00:56 +0000 |
commit | c09c2682f8853a3775eed00265f4ba00f9f224ac (patch) | |
tree | 35d69ab3e298f85f1345e2e8fe3c0e8439e83080 /src/gns | |
parent | 3497cf2a8e182972cf217e38f9c762f7df4cec2f (diff) | |
download | gnunet-c09c2682f8853a3775eed00265f4ba00f9f224ac.tar.gz gnunet-c09c2682f8853a3775eed00265f4ba00f9f224ac.zip |
-introduce #define for + in GADS
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 12 | ||||
-rw-r--r-- | src/gns/test_gns_dht_three_peers.c | 2 | ||||
-rw-r--r-- | src/gns/test_gns_pseu_shorten.c | 16 | ||||
-rw-r--r-- | src/gns/test_gns_revocation.c | 2 | ||||
-rw-r--r-- | src/gns/test_gns_simple_mx_lookup.c | 4 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 9d77cf902..76534a10e 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -433,7 +433,7 @@ process_auth_discovery_dht_result (void* cls, | |||
433 | { | 433 | { |
434 | for (i=0; i < num_records; i++) | 434 | for (i=0; i < num_records; i++) |
435 | { | 435 | { |
436 | if ((strcmp (name, "+") == 0) && | 436 | if ((strcmp (name, GNUNET_GNS_MASTERZONE_STR) == 0) && |
437 | (rd[i].record_type == GNUNET_GNS_RECORD_PSEU)) | 437 | (rd[i].record_type == GNUNET_GNS_RECORD_PSEU)) |
438 | { | 438 | { |
439 | /* found pseu */ | 439 | /* found pseu */ |
@@ -549,7 +549,7 @@ process_zone_to_name_discover (void *cls, | |||
549 | { | 549 | { |
550 | gph->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, | 550 | gph->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, |
551 | &gph->auth->zone, | 551 | &gph->auth->zone, |
552 | "+", | 552 | GNUNET_GNS_MASTERZONE_STR, |
553 | GNUNET_GNS_RECORD_PSEU, | 553 | GNUNET_GNS_RECORD_PSEU, |
554 | &process_auth_discovery_ns_result, | 554 | &process_auth_discovery_ns_result, |
555 | gph); | 555 | gph); |
@@ -2303,7 +2303,7 @@ process_delegation_result_dht (void* cls, | |||
2303 | /* Check for key revocation and delegate */ | 2303 | /* Check for key revocation and delegate */ |
2304 | rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, | 2304 | rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, |
2305 | &rh->authority, | 2305 | &rh->authority, |
2306 | "+", | 2306 | GNUNET_GNS_MASTERZONE_STR, |
2307 | GNUNET_GNS_RECORD_REV, | 2307 | GNUNET_GNS_RECORD_REV, |
2308 | &process_pkey_revocation_result_ns, | 2308 | &process_pkey_revocation_result_ns, |
2309 | rh); | 2309 | rh); |
@@ -2444,7 +2444,7 @@ finish_lookup (struct ResolverHandle *rh, | |||
2444 | 2444 | ||
2445 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 2445 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
2446 | "GNS_POSTPROCESS: Postprocessing\n"); | 2446 | "GNS_POSTPROCESS: Postprocessing\n"); |
2447 | if (0 == strcmp(rh->name, "+")) | 2447 | if (0 == strcmp(rh->name, GNUNET_GNS_MASTERZONE_STR)) |
2448 | repl_string = rlh->name; | 2448 | repl_string = rlh->name; |
2449 | else | 2449 | else |
2450 | repl_string = rlh->name+strlen(rh->name)+1; | 2450 | repl_string = rlh->name+strlen(rh->name)+1; |
@@ -2604,7 +2604,7 @@ handle_record_ns (void* cls, struct ResolverHandle *rh, | |||
2604 | check_dht = GNUNET_NO; | 2604 | check_dht = GNUNET_NO; |
2605 | } | 2605 | } |
2606 | 2606 | ||
2607 | if ((0 != strcmp (rh->name, "+")) && (GNUNET_YES == is_srv (rh->name))) | 2607 | if ((0 != strcmp (rh->name, GNUNET_GNS_MASTERZONE_STR)) && (GNUNET_YES == is_srv (rh->name))) |
2608 | check_dht = GNUNET_NO; | 2608 | check_dht = GNUNET_NO; |
2609 | 2609 | ||
2610 | if (GNUNET_YES == rh->only_cached) | 2610 | if (GNUNET_YES == rh->only_cached) |
@@ -3226,7 +3226,7 @@ process_delegation_result_ns (void* cls, | |||
3226 | /* Check for key revocation and delegate */ | 3226 | /* Check for key revocation and delegate */ |
3227 | rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, | 3227 | rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, |
3228 | &rh->authority, | 3228 | &rh->authority, |
3229 | "+", | 3229 | GNUNET_GNS_MASTERZONE_STR, |
3230 | GNUNET_GNS_RECORD_REV, | 3230 | GNUNET_GNS_RECORD_REV, |
3231 | &process_pkey_revocation_result_ns, | 3231 | &process_pkey_revocation_result_ns, |
3232 | rh); | 3232 | rh); |
diff --git a/src/gns/test_gns_dht_three_peers.c b/src/gns/test_gns_dht_three_peers.c index 2a109559f..59d826cf9 100644 --- a/src/gns/test_gns_dht_three_peers.c +++ b/src/gns/test_gns_dht_three_peers.c | |||
@@ -343,7 +343,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
343 | rd.record_type = GNUNET_GNS_RECORD_PSEU; | 343 | rd.record_type = GNUNET_GNS_RECORD_PSEU; |
344 | 344 | ||
345 | 345 | ||
346 | GNUNET_NAMESTORE_record_create (nh[0], key, "+", &rd, &cont_ns, nh[0]); | 346 | GNUNET_NAMESTORE_record_create (nh[0], key, GNUNET_GNS_MASTERZONE_STR, &rd, &cont_ns, nh[0]); |
347 | 347 | ||
348 | GNUNET_CRYPTO_rsa_key_free(key); | 348 | GNUNET_CRYPTO_rsa_key_free(key); |
349 | GNUNET_free(keyfile); | 349 | GNUNET_free(keyfile); |
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c index 74f41398d..c7d8cfc0f 100644 --- a/src/gns/test_gns_pseu_shorten.c +++ b/src/gns/test_gns_pseu_shorten.c | |||
@@ -279,27 +279,27 @@ put_pseu_dht (void *cls, int success) | |||
279 | 279 | ||
280 | sig = GNUNET_NAMESTORE_create_signature(alice_key, | 280 | sig = GNUNET_NAMESTORE_create_signature(alice_key, |
281 | GNUNET_TIME_UNIT_FOREVER_ABS, | 281 | GNUNET_TIME_UNIT_FOREVER_ABS, |
282 | "+", | 282 | GNUNET_GNS_MASTERZONE_STR, |
283 | &rd, 1); | 283 | &rd, 1); |
284 | 284 | ||
285 | GNUNET_assert (NULL != sig); | 285 | GNUNET_assert (NULL != sig); |
286 | 286 | ||
287 | GNUNET_break (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&alice_pkey, | 287 | GNUNET_break (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&alice_pkey, |
288 | GNUNET_TIME_UNIT_FOREVER_ABS, | 288 | GNUNET_TIME_UNIT_FOREVER_ABS, |
289 | "+", | 289 | GNUNET_GNS_MASTERZONE_STR, |
290 | 1, | 290 | 1, |
291 | &rd, | 291 | &rd, |
292 | sig)); | 292 | sig)); |
293 | rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd); | 293 | rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd); |
294 | nrb = GNUNET_malloc(rd_payload_length + strlen("+") + 1 | 294 | nrb = GNUNET_malloc(rd_payload_length + strlen(GNUNET_GNS_MASTERZONE_STR) + 1 |
295 | + sizeof(struct GNSNameRecordBlock)); | 295 | + sizeof(struct GNSNameRecordBlock)); |
296 | nrb->signature = *sig; | 296 | nrb->signature = *sig; |
297 | nrb->public_key = alice_pkey; | 297 | nrb->public_key = alice_pkey; |
298 | nrb->rd_count = htonl(1); | 298 | nrb->rd_count = htonl(1); |
299 | memset(&nrb[1], 0, strlen("+") + 1); | 299 | memset(&nrb[1], 0, strlen(GNUNET_GNS_MASTERZONE_STR) + 1); |
300 | strcpy((char*)&nrb[1], "+"); | 300 | strcpy((char*)&nrb[1], GNUNET_GNS_MASTERZONE_STR); |
301 | nrb_data = (char*)&nrb[1]; | 301 | nrb_data = (char*)&nrb[1]; |
302 | nrb_data += strlen("+") + 1; | 302 | nrb_data += strlen(GNUNET_GNS_MASTERZONE_STR) + 1; |
303 | 303 | ||
304 | if (-1 == GNUNET_NAMESTORE_records_serialize (1, | 304 | if (-1 == GNUNET_NAMESTORE_records_serialize (1, |
305 | &rd, | 305 | &rd, |
@@ -316,7 +316,7 @@ put_pseu_dht (void *cls, int success) | |||
316 | end_badly_now (); | 316 | end_badly_now (); |
317 | return; | 317 | return; |
318 | } | 318 | } |
319 | GNUNET_CRYPTO_short_hash("+", strlen("+"), &name_hash); | 319 | GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash); |
320 | GNUNET_CRYPTO_short_hash(&alice_pkey, | 320 | GNUNET_CRYPTO_short_hash(&alice_pkey, |
321 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 321 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), |
322 | &zone_hash); | 322 | &zone_hash); |
@@ -326,7 +326,7 @@ put_pseu_dht (void *cls, int success) | |||
326 | GNUNET_CRYPTO_hash_xor(&zone_hash_double, &name_hash_double, &xor_hash); | 326 | GNUNET_CRYPTO_hash_xor(&zone_hash_double, &name_hash_double, &xor_hash); |
327 | 327 | ||
328 | rd_payload_length += sizeof(struct GNSNameRecordBlock) + | 328 | rd_payload_length += sizeof(struct GNSNameRecordBlock) + |
329 | strlen("+") + 1; | 329 | strlen(GNUNET_GNS_MASTERZONE_STR) + 1; |
330 | 330 | ||
331 | GNUNET_DHT_put (dht_handle, &xor_hash, | 331 | GNUNET_DHT_put (dht_handle, &xor_hash, |
332 | 0, | 332 | 0, |
diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c index 691d8c124..a6bbd9ad1 100644 --- a/src/gns/test_gns_revocation.c +++ b/src/gns/test_gns_revocation.c | |||
@@ -257,7 +257,7 @@ do_check (void *cls, | |||
257 | 257 | ||
258 | GNUNET_NAMESTORE_record_create (namestore_handle, | 258 | GNUNET_NAMESTORE_record_create (namestore_handle, |
259 | bob_key, | 259 | bob_key, |
260 | "+", | 260 | GNUNET_GNS_MASTERZONE_STR, |
261 | &rd, | 261 | &rd, |
262 | &commence_testing, | 262 | &commence_testing, |
263 | NULL); | 263 | NULL); |
diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c index 812a157db..d2ca08c75 100644 --- a/src/gns/test_gns_simple_mx_lookup.c +++ b/src/gns/test_gns_simple_mx_lookup.c | |||
@@ -265,12 +265,12 @@ do_check (void *cls, | |||
265 | rd.record_type = GNUNET_GNS_RECORD_MX; | 265 | rd.record_type = GNUNET_GNS_RECORD_MX; |
266 | sig = GNUNET_NAMESTORE_create_signature(bob_key, | 266 | sig = GNUNET_NAMESTORE_create_signature(bob_key, |
267 | GNUNET_TIME_UNIT_FOREVER_ABS, | 267 | GNUNET_TIME_UNIT_FOREVER_ABS, |
268 | "+", | 268 | GNUNET_GNS_MASTERZONE_STR, |
269 | &rd, 1); | 269 | &rd, 1); |
270 | et.abs_value = rd.expiration_time; | 270 | et.abs_value = rd.expiration_time; |
271 | GNUNET_NAMESTORE_record_put (namestore_handle, | 271 | GNUNET_NAMESTORE_record_put (namestore_handle, |
272 | &bob_pkey, | 272 | &bob_pkey, |
273 | "+", | 273 | GNUNET_GNS_MASTERZONE_STR, |
274 | et, | 274 | et, |
275 | 1, | 275 | 1, |
276 | &rd, | 276 | &rd, |