From 5a3caf73608d411566cce83fd470a8c758d935a5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 1 Jul 2013 14:00:50 +0000 Subject: [PATCH] -fix build issue, function was renamed --- src/gns/test_gns_cname_lookup.c | 60 ++++++++++----------- src/gns/test_gns_dht_delegated_lookup.c | 12 ++--- src/gns/test_gns_dht_three_peers.c | 17 ++++-- src/gns/test_gns_max_queries.c | 24 ++++----- src/gns/test_gns_ns_lookup.c | 63 +++++++--------------- src/gns/test_gns_pseu_shorten.c | 36 ++++++------- src/gns/test_gns_revocation.c | 24 ++++----- src/gns/test_gns_simple_delegated_lookup.c | 12 ++--- src/gns/test_gns_simple_get_authority.c | 20 +++---- src/gns/test_gns_simple_lookup.c | 12 ++--- src/gns/test_gns_simple_mx_lookup.c | 12 ++--- src/gns/test_gns_simple_shorten.c | 25 ++++----- src/gns/test_gns_simple_srv_lookup.c | 12 ++--- src/gns/test_gns_simple_zkey_lookup.c | 12 ++--- 14 files changed, 163 insertions(+), 178 deletions(-) diff --git a/src/gns/test_gns_cname_lookup.c b/src/gns/test_gns_cname_lookup.c index 4d15175e1..323adf385 100644 --- a/src/gns/test_gns_cname_lookup.c +++ b/src/gns/test_gns_cname_lookup.c @@ -378,57 +378,57 @@ do_check (void *cls, rd.record_type = GNUNET_DNSPARSER_TYPE_A; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME_SERVER, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME_SERVER, + 1, &rd, + NULL, + NULL); rd.data_size = strlen (TEST_RECORD_CNAME_PLUS); rd.data = TEST_RECORD_CNAME_PLUS; rd.record_type = GNUNET_GNS_RECORD_CNAME; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME_PLUS, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME_PLUS, + 1, &rd, + NULL, + NULL); rd.data_size = strlen (TEST_RECORD_CNAME_ZKEY); rd.data = TEST_RECORD_CNAME_ZKEY; rd.record_type = GNUNET_GNS_RECORD_CNAME; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME_ZKEY, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME_ZKEY, + 1, &rd, + NULL, + NULL); rd.data_size = strlen (TEST_RECORD_CNAME_DNS); rd.data = TEST_RECORD_CNAME_DNS; rd.record_type = GNUNET_GNS_RECORD_CNAME; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME_DNS, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME_DNS, + 1, &rd, + NULL, + NULL); GNUNET_assert(1 == inet_pton (AF_INET, TEST_IP_ZKEY, &web)); rd.data_size = sizeof(struct in_addr); rd.data = &web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; - GNUNET_NAMESTORE_record_create (namestore_handle, - bob_key, - TEST_RECORD_NAME_PLUS, - &rd, - &commence_testing, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + bob_key, + TEST_RECORD_NAME_PLUS, + 1, &rd, + &commence_testing, + NULL); GNUNET_CRYPTO_ecc_key_free(alice_key); GNUNET_CRYPTO_ecc_key_free(bob_key); } diff --git a/src/gns/test_gns_dht_delegated_lookup.c b/src/gns/test_gns_dht_delegated_lookup.c index ded45ecb0..e743e0fd3 100644 --- a/src/gns/test_gns_dht_delegated_lookup.c +++ b/src/gns/test_gns_dht_delegated_lookup.c @@ -346,12 +346,12 @@ do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - &put_dht, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + &put_dht, + NULL); } diff --git a/src/gns/test_gns_dht_three_peers.c b/src/gns/test_gns_dht_three_peers.c index 227ca4606..58edb9cc5 100644 --- a/src/gns/test_gns_dht_three_peers.c +++ b/src/gns/test_gns_dht_three_peers.c @@ -353,14 +353,19 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) rd.record_type = GNUNET_GNS_RECORD_A; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (nh[0], key, "www", &rd, NULL, NULL); + GNUNET_NAMESTORE_record_put_by_authority (nh[0], key, "www", + 1, &rd, + NULL, NULL); rd.data_size = strlen(TEST_DAVE_PSEU); rd.data = TEST_DAVE_PSEU; rd.record_type = GNUNET_GNS_RECORD_PSEU; - GNUNET_NAMESTORE_record_create (nh[0], key, GNUNET_GNS_MASTERZONE_STR, &rd, &cont_ns, nh[0]); + GNUNET_NAMESTORE_record_put_by_authority (nh[0], key, + GNUNET_GNS_MASTERZONE_STR, + 1, &rd, + &cont_ns, nh[0]); GNUNET_CRYPTO_ecc_key_free(key); GNUNET_free(keyfile); @@ -416,7 +421,9 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg) rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (nh[1], key, "buddy", &rd, &cont_ns, nh[1]); + GNUNET_NAMESTORE_record_put_by_authority (nh[1], key, "buddy", + 1, &rd, + &cont_ns, nh[1]); GNUNET_CRYPTO_ecc_key_free(key); GNUNET_free(keyfile); @@ -466,7 +473,9 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg) rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (nh[2], key, "bob", &rd, &cont_ns, nh[2]); + GNUNET_NAMESTORE_record_put_by_authority (nh[2], key, "bob", + 1, &rd, + &cont_ns, nh[2]); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice gns\n"); gh = GNUNET_GNS_connect (cfg_handles[2]); diff --git a/src/gns/test_gns_max_queries.c b/src/gns/test_gns_max_queries.c index 16084eb4b..82273798f 100644 --- a/src/gns/test_gns_max_queries.c +++ b/src/gns/test_gns_max_queries.c @@ -310,24 +310,24 @@ do_check (void *cls, rd.record_type = GNUNET_DNSPARSER_TYPE_A; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME, + 1, &rd, + NULL, + NULL); GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - &commence_testing, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + &commence_testing, + NULL); GNUNET_CRYPTO_ecc_key_free(alice_key); GNUNET_CRYPTO_ecc_key_free(bob_key); diff --git a/src/gns/test_gns_ns_lookup.c b/src/gns/test_gns_ns_lookup.c index e0803b848..e62d34e9a 100644 --- a/src/gns/test_gns_ns_lookup.c +++ b/src/gns/test_gns_ns_lookup.c @@ -548,37 +548,6 @@ commence_testing (void *cls, int32_t success, const char *emsg) } -/** - * Function called once we've created the first NS record, - * create the second one. - * - * @param cls closure, unused - * @param success GNUNET_OK on success - * @param emsg error message, NULL on success - */ -static void -create_next_record (void *cls, - int32_t success, - const char *emsg) -{ - struct GNUNET_NAMESTORE_RecordData rd; - - qe = NULL; - if (NULL != emsg) - FPRINTF (stderr, "Failed to create record: %s\n", emsg); - GNUNET_assert (GNUNET_YES == success); - rd.data_size = strlen (TEST_RECORD_NS); - rd.data = TEST_RECORD_NS; - rd.record_type = GNUNET_GNS_RECORD_NS; - qe = GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME, - &rd, - &commence_testing, - NULL); -} - - /** * Peer is ready, run the actual test. Begins by storing * a record in the namestore. @@ -594,7 +563,7 @@ do_check (void *cls, { struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; char* alice_keyfile; - struct GNUNET_NAMESTORE_RecordData rd; + struct GNUNET_NAMESTORE_RecordData rd[2]; struct in_addr ns; cfg = ccfg; @@ -627,19 +596,25 @@ do_check (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating NS records\n"); - rd.expiration_time = UINT64_MAX; + rd[0].expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, TEST_IP_NS, &ns)); - rd.data_size = sizeof (struct in_addr); - rd.data = &ns; - rd.record_type = GNUNET_DNSPARSER_TYPE_A; - rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - - qe = GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME, - &rd, - &create_next_record, - NULL); + rd[0].data_size = sizeof (struct in_addr); + rd[0].data = &ns; + rd[0].record_type = GNUNET_DNSPARSER_TYPE_A; + rd[0].flags = GNUNET_NAMESTORE_RF_AUTHORITY; + + rd[1].expiration_time = UINT64_MAX; + rd[1].data_size = strlen (TEST_RECORD_NS); + rd[1].data = TEST_RECORD_NS; + rd[1].record_type = GNUNET_GNS_RECORD_NS; + rd[1].flags = GNUNET_NAMESTORE_RF_AUTHORITY; + + qe = GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME, + 2, rd, + &commence_testing, + NULL); } diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c index a104d38fc..62e94dfcb 100644 --- a/src/gns/test_gns_pseu_shorten.c +++ b/src/gns/test_gns_pseu_shorten.c @@ -523,12 +523,12 @@ fin_init_zone (void *cls, int32_t success, const char *emsg) rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - our_key, - TEST_AUTHORITY_BOB, - &rd, - &put_pkey_dht, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + our_key, + TEST_AUTHORITY_BOB, + 1, &rd, + &put_pkey_dht, + NULL); } @@ -543,12 +543,12 @@ cont_init_zone (void *cls, int32_t success, const char *emsg) rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - priv_key, - TEST_SHORTEN_ZONE, - &rd, - &fin_init_zone, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + priv_key, + TEST_SHORTEN_ZONE, + 1, &rd, + &fin_init_zone, + NULL); } @@ -638,12 +638,12 @@ do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - our_key, - TEST_PRIVATE_ZONE, - &rd, - &cont_init_zone, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + our_key, + TEST_PRIVATE_ZONE, + 1, &rd, + &cont_init_zone, + NULL); } diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c index 540f58a35..c491db4aa 100644 --- a/src/gns/test_gns_revocation.c +++ b/src/gns/test_gns_revocation.c @@ -228,12 +228,12 @@ do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + NULL, + NULL); rd.data_size = sizeof(struct in_addr); rd.data = web; @@ -255,12 +255,12 @@ do_check (void *cls, rd.data_size = 0; rd.record_type = GNUNET_GNS_RECORD_REV; - GNUNET_NAMESTORE_record_create (namestore_handle, - bob_key, - GNUNET_GNS_MASTERZONE_STR, - &rd, - &commence_testing, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + bob_key, + GNUNET_GNS_MASTERZONE_STR, + 1, &rd, + &commence_testing, + NULL); GNUNET_free (alice_keyfile); GNUNET_free (web); GNUNET_free (sig); diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c index f2610c167..4804de6f8 100644 --- a/src/gns/test_gns_simple_delegated_lookup.c +++ b/src/gns/test_gns_simple_delegated_lookup.c @@ -234,12 +234,12 @@ do_check (void *cls, rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + NULL, + NULL); rd.data_size = sizeof(struct in_addr); rd.data = &web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; diff --git a/src/gns/test_gns_simple_get_authority.c b/src/gns/test_gns_simple_get_authority.c index 300e7be5b..7a25e7ca1 100644 --- a/src/gns/test_gns_simple_get_authority.c +++ b/src/gns/test_gns_simple_get_authority.c @@ -235,12 +235,12 @@ void do_check (void *cls, rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; /* put bob into our zone */ - GNUNET_NAMESTORE_record_create (namestore_handle, - our_key, - TEST_AUTHORITY_BOB, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + our_key, + TEST_AUTHORITY_BOB, + 1, &rd, + NULL, + NULL); /* put alice into bobs zone */ GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash); @@ -249,10 +249,10 @@ void do_check (void *cls, &rd, 1); GNUNET_NAMESTORE_record_put (namestore_handle, - &bob_pkey, - TEST_AUTHORITY_ALICE, - GNUNET_TIME_UNIT_FOREVER_ABS, - 1, + &bob_pkey, + TEST_AUTHORITY_ALICE, + GNUNET_TIME_UNIT_FOREVER_ABS, + 1, &rd, sig, NULL, diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c index ff325a464..a7c3348fd 100644 --- a/src/gns/test_gns_simple_lookup.c +++ b/src/gns/test_gns_simple_lookup.c @@ -260,12 +260,12 @@ do_check (void *cls, rd.data = &web; rd.record_type = GNUNET_DNSPARSER_TYPE_A; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - nsqe = GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_RECORD_NAME, - &rd, - &commence_testing, - NULL); + nsqe = GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_RECORD_NAME, + 1, &rd, + &commence_testing, + NULL); GNUNET_CRYPTO_ecc_key_free (alice_key); } diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c index f928a3913..f3cfaac27 100644 --- a/src/gns/test_gns_simple_mx_lookup.c +++ b/src/gns/test_gns_simple_mx_lookup.c @@ -231,12 +231,12 @@ do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + NULL, + NULL); rd.data_size = sizeof(struct in_addr); rd.data = mail; diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c index 9b61a41c8..600cb0733 100644 --- a/src/gns/test_gns_simple_shorten.c +++ b/src/gns/test_gns_simple_shorten.c @@ -260,12 +260,13 @@ void do_check (void *cls, rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; /* put bob into our zone */ - GNUNET_NAMESTORE_record_create (namestore_handle, - our_key, - TEST_AUTHORITY_BOB, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + our_key, + TEST_AUTHORITY_BOB, + 1, + &rd, + NULL, + NULL); /* put alice into bobs zone */ GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash); @@ -310,12 +311,12 @@ void do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; GNUNET_free(sig); - GNUNET_NAMESTORE_record_create (namestore_handle, - our_key, - TEST_ALICE_PSEU, - &rd, - &commence_testing, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + our_key, + TEST_ALICE_PSEU, + 1, &rd, + &commence_testing, + NULL); GNUNET_free(web); GNUNET_CRYPTO_ecc_key_free(our_key); diff --git a/src/gns/test_gns_simple_srv_lookup.c b/src/gns/test_gns_simple_srv_lookup.c index c0208639d..3b1cd46a0 100644 --- a/src/gns/test_gns_simple_srv_lookup.c +++ b/src/gns/test_gns_simple_srv_lookup.c @@ -237,12 +237,12 @@ do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + NULL, + NULL); rd.data_size = sizeof (struct in_addr); rd.data = sipserver; diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c index 923664b77..311282535 100644 --- a/src/gns/test_gns_simple_zkey_lookup.c +++ b/src/gns/test_gns_simple_zkey_lookup.c @@ -246,12 +246,12 @@ do_check (void *cls, rd.record_type = GNUNET_GNS_RECORD_PKEY; rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - TEST_AUTHORITY_NAME, - &rd, - NULL, - NULL); + GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, + alice_key, + TEST_AUTHORITY_NAME, + 1, &rd, + NULL, + NULL); rd.data_size = sizeof(struct in_addr); rd.data = web; -- 2.25.1