From bde779e2145a9888ada3c0a52f78c4095b8c7ed2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 19 Jun 2012 22:23:33 +0000 Subject: [PATCH] -fixing some testcase builds --- src/gns/test_gns_dht_delegated_lookup.c | 6 +++--- src/gns/test_gns_simple_delegated_lookup.c | 7 ++++--- src/gns/test_gns_simple_get_authority.c | 2 +- src/gns/test_gns_simple_lookup.c | 2 +- src/gns/test_gns_simple_mx_lookup.c | 10 ++++++---- src/gns/test_gns_simple_shorten.c | 2 +- src/gns/test_gns_simple_zkey_lookup.c | 4 ++-- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/gns/test_gns_dht_delegated_lookup.c b/src/gns/test_gns_dht_delegated_lookup.c index 07fa9f246..e7f2ea060 100644 --- a/src/gns/test_gns_dht_delegated_lookup.c +++ b/src/gns/test_gns_dht_delegated_lookup.c @@ -213,7 +213,7 @@ put_dht(void *cls, int32_t success, const char *emsg) char* ip = TEST_IP; struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); rd.data_size = sizeof(struct in_addr); rd.data = web; @@ -258,7 +258,7 @@ put_dht(void *cls, int32_t success, const char *emsg) GNUNET_BLOCK_TYPE_GNS_NAMERECORD, rd_payload_length, (char*)nrb, - rd.expiration, + GNUNET_TIME_UNIT_FOREVER_ABS, DHT_OPERATION_TIMEOUT, NULL, NULL); @@ -317,7 +317,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); struct GNUNET_NAMESTORE_RecordData rd; - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); rd.data = &bob_hash; rd.record_type = GNUNET_GNS_RECORD_PKEY; diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c index 9e5226285..c8066fb0c 100644 --- a/src/gns/test_gns_simple_delegated_lookup.c +++ b/src/gns/test_gns_simple_delegated_lookup.c @@ -208,6 +208,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_CRYPTO_ShortHashCode bob_hash; struct GNUNET_CRYPTO_RsaSignature *sig; char* alice_keyfile; + struct GNUNET_TIME_Absolute et; cfg = _cfg; @@ -240,7 +241,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_NAMESTORE_RecordData rd; char* ip = TEST_IP; struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); @@ -263,11 +264,11 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_TIME_UNIT_FOREVER_ABS, TEST_RECORD_NAME, &rd, 1); - + et.abs_value = rd.expiration_time; GNUNET_NAMESTORE_record_put (namestore_handle, &bob_pkey, TEST_RECORD_NAME, - rd.expiration, + et, 1, &rd, sig, diff --git a/src/gns/test_gns_simple_get_authority.c b/src/gns/test_gns_simple_get_authority.c index dbecb7dfd..76a4c4534 100644 --- a/src/gns/test_gns_simple_get_authority.c +++ b/src/gns/test_gns_simple_get_authority.c @@ -236,7 +236,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_NAMESTORE_RecordData rd; char* ip = TEST_IP; struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c index a1d6b02ae..bd6501b24 100644 --- a/src/gns/test_gns_simple_lookup.c +++ b/src/gns/test_gns_simple_lookup.c @@ -222,7 +222,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_NAMESTORE_RecordData rd; char* ip = TEST_IP; struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); rd.data_size = sizeof(struct in_addr); rd.data = web; diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c index c6ec1d684..38026fdcc 100644 --- a/src/gns/test_gns_simple_mx_lookup.c +++ b/src/gns/test_gns_simple_mx_lookup.c @@ -225,6 +225,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_CRYPTO_ShortHashCode bob_hash; struct GNUNET_CRYPTO_RsaSignature *sig; char* alice_keyfile; + struct GNUNET_TIME_Absolute et; cfg = _cfg; @@ -259,7 +260,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, struct in_addr *mail = GNUNET_malloc(sizeof(struct in_addr)); char *mx_record; uint16_t mx_preference = 1; - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, mail)); GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); @@ -282,11 +283,11 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_TIME_UNIT_FOREVER_ABS, TEST_RECORD_NAME, &rd, 1); - + et.abs_value = rd.expiration_time; GNUNET_NAMESTORE_record_put (namestore_handle, &bob_pkey, TEST_RECORD_NAME, - rd.expiration, + et, 1, &rd, sig, @@ -303,10 +304,11 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_TIME_UNIT_FOREVER_ABS, "+", &rd, 1); + et.abs_value = rd.expiration_time; GNUNET_NAMESTORE_record_put (namestore_handle, &bob_pkey, "+", - rd.expiration, + et, 1, &rd, sig, diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c index 53717932f..8dd813f6d 100644 --- a/src/gns/test_gns_simple_shorten.c +++ b/src/gns/test_gns_simple_shorten.c @@ -236,7 +236,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_NAMESTORE_RecordData rd; char* ip = TEST_IP; struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c index b6d02cf3f..3c54a149d 100644 --- a/src/gns/test_gns_simple_zkey_lookup.c +++ b/src/gns/test_gns_simple_zkey_lookup.c @@ -243,7 +243,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, struct GNUNET_NAMESTORE_RecordData rd; char* ip = TEST_IP; struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - rd.expiration = GNUNET_TIME_UNIT_FOREVER_ABS; + rd.expiration_time = UINT64_MAX; GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); @@ -270,7 +270,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_NAMESTORE_record_put (namestore_handle, &bob_pkey, TEST_RECORD_NAME, - rd.expiration, + GNUNET_TIME_UNIT_FOREVER_ABS, 1, &rd, sig, -- 2.25.1