From: Martin Schanzenbach Date: Wed, 20 Jun 2012 08:53:37 +0000 (+0000) Subject: -fixed record flags in tests. proper expiration from NS missing X-Git-Tag: initial-import-from-subversion-38251~12952 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c78a35aa3fac06477752d6e6f07587a53df2d66a;p=oweals%2Fgnunet.git -fixed record flags in tests. proper expiration from NS missing --- diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 8d82fa8ad..16d6126cb 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -3140,9 +3140,9 @@ process_delegation_result_ns (void* cls, &process_pkey_revocation_result_ns, rh); return; - + } - + /** * no answers found */ diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c index f033811ee..f1888c71a 100644 --- a/src/gns/plugin_block_gns.c +++ b/src/gns/plugin_block_gns.c @@ -145,7 +145,6 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Data invalid (%d bytes, %d records)\n", rd_len, rd_count); - GNUNET_break_op (0); return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; } @@ -180,7 +179,6 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, &nrb->signature)) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Signature invalid for name %s\n"); - GNUNET_break_op (0); return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; } } diff --git a/src/gns/test_gns_cname_lookup.c b/src/gns/test_gns_cname_lookup.c index 3e79f5d13..ed04fbcd0 100644 --- a/src/gns/test_gns_cname_lookup.c +++ b/src/gns/test_gns_cname_lookup.c @@ -269,6 +269,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct in_addr); rd.data = web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, diff --git a/src/gns/test_gns_dht_threepeer.c b/src/gns/test_gns_dht_threepeer.c index 3cd565e8e..cfb8a3b4c 100644 --- a/src/gns/test_gns_dht_threepeer.c +++ b/src/gns/test_gns_dht_threepeer.c @@ -327,6 +327,7 @@ daemon_started (void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct in_addr); rd.data = web; rd.record_type = GNUNET_GNS_RECORD_TYPE_A; + rd.flags = 0; GNUNET_NAMESTORE_record_create (ns, key, "www", &rd, NULL, NULL); @@ -367,6 +368,7 @@ daemon_started (void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &dave_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (ns, key, "buddy", &rd, ns_create_cont, ns); @@ -400,6 +402,7 @@ daemon_started (void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (ns, key, "bob", &rd, ns_create_cont, ns); diff --git a/src/gns/test_gns_max_queries.c b/src/gns/test_gns_max_queries.c index 9ac24a3f6..5486dfb2c 100644 --- a/src/gns/test_gns_max_queries.c +++ b/src/gns/test_gns_max_queries.c @@ -278,6 +278,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct in_addr); rd.data = web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, diff --git a/src/gns/test_gns_ns_lookup.c b/src/gns/test_gns_ns_lookup.c index 146c5777f..a46b45fc9 100644 --- a/src/gns/test_gns_ns_lookup.c +++ b/src/gns/test_gns_ns_lookup.c @@ -323,6 +323,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct in_addr); rd.data = ns; rd.record_type = GNUNET_DNSPARSER_TYPE_A; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c index e12c010f1..cedf3930d 100644 --- a/src/gns/test_gns_pseu_shorten.c +++ b/src/gns/test_gns_pseu_shorten.c @@ -293,6 +293,7 @@ put_pseu_dht(void *cls, int success) rd.data_size = strlen(TEST_PSEU_ALICE)+1; rd.data = TEST_PSEU_ALICE; rd.record_type = GNUNET_GNS_RECORD_PSEU; + rd.flags = 0; sig = GNUNET_NAMESTORE_create_signature(alice_key, GNUNET_TIME_UNIT_FOREVER_ABS, @@ -374,7 +375,8 @@ put_www_dht(void *cls, int success) rd.data_size = sizeof(struct in_addr); rd.data = web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; - + rd.flags = 0; + sig = GNUNET_NAMESTORE_create_signature(alice_key, GNUNET_TIME_UNIT_FOREVER_ABS, TEST_RECORD_NAME, @@ -451,7 +453,8 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg) rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &alice_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; - + rd.flags = 0; + sig = GNUNET_NAMESTORE_create_signature(bob_key, GNUNET_TIME_UNIT_FOREVER_ABS, TEST_AUTHORITY_ALICE, @@ -519,7 +522,8 @@ fin_init_zone (void *cls, int32_t success, const char *emsg) rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; - + rd.flags = 0; + GNUNET_NAMESTORE_record_create (namestore_handle, our_key, TEST_AUTHORITY_BOB, @@ -538,6 +542,7 @@ cont_init_zone (void *cls, int32_t success, const char *emsg) rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &short_zone; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, priv_key, @@ -633,6 +638,7 @@ do_lookup (void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &priv_zone; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, our_key, diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c index b055ef3e3..dd5c294e4 100644 --- a/src/gns/test_gns_revocation.c +++ b/src/gns/test_gns_revocation.c @@ -234,6 +234,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c index c8066fb0c..189cb7de2 100644 --- a/src/gns/test_gns_simple_delegated_lookup.c +++ b/src/gns/test_gns_simple_delegated_lookup.c @@ -249,6 +249,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, diff --git a/src/gns/test_gns_simple_get_authority.c b/src/gns/test_gns_simple_get_authority.c index 76a4c4534..307e2cf78 100644 --- a/src/gns/test_gns_simple_get_authority.c +++ b/src/gns/test_gns_simple_get_authority.c @@ -244,6 +244,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; /* put bob into our zone */ GNUNET_NAMESTORE_record_create (namestore_handle, diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c index bd6501b24..631130ea6 100644 --- a/src/gns/test_gns_simple_lookup.c +++ b/src/gns/test_gns_simple_lookup.c @@ -227,6 +227,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct in_addr); rd.data = web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c index 38026fdcc..294329e60 100644 --- a/src/gns/test_gns_simple_mx_lookup.c +++ b/src/gns/test_gns_simple_mx_lookup.c @@ -268,6 +268,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c index 8dd813f6d..c4e196b60 100644 --- a/src/gns/test_gns_simple_shorten.c +++ b/src/gns/test_gns_simple_shorten.c @@ -244,6 +244,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; /* put bob into our zone */ GNUNET_NAMESTORE_record_create (namestore_handle, diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c index 3c54a149d..3a0496404 100644 --- a/src/gns/test_gns_simple_zkey_lookup.c +++ b/src/gns/test_gns_simple_zkey_lookup.c @@ -251,6 +251,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; + rd.flags = 0; GNUNET_NAMESTORE_record_create (namestore_handle, alice_key,