aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_to_name.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-19 22:17:25 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-19 22:17:25 +0000
commit808ef8ab410b486c5cca7515389f608e965d53b1 (patch)
tree2a9476225227e3e550d95294db1c1b676bd23264 /src/namestore/test_namestore_api_zone_to_name.c
parent50114769c42140782b3955e416d61837fe570d0b (diff)
downloadgnunet-808ef8ab410b486c5cca7515389f608e965d53b1.tar.gz
gnunet-808ef8ab410b486c5cca7515389f608e965d53b1.zip
-fixing testcases with new expiration code
Diffstat (limited to 'src/namestore/test_namestore_api_zone_to_name.c')
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index e5db28165..cd722ab8a 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -165,6 +165,8 @@ static void
165run (void *cls, 165run (void *cls,
166 const struct GNUNET_CONFIGURATION_Handle *cfg) 166 const struct GNUNET_CONFIGURATION_Handle *cfg)
167{ 167{
168 struct GNUNET_TIME_Absolute et;
169
168 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); 170 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL);
169 GNUNET_asprintf(&s_name, "dummy"); 171 GNUNET_asprintf(&s_name, "dummy");
170 /* load privat key */ 172 /* load privat key */
@@ -184,7 +186,7 @@ run (void *cls,
184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value)); 186 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value));
185 187
186 struct GNUNET_NAMESTORE_RecordData rd; 188 struct GNUNET_NAMESTORE_RecordData rd;
187 rd.expiration = GNUNET_TIME_absolute_get(); 189 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value;
188 rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; 190 rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
189 rd.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode); 191 rd.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode);
190 rd.data = GNUNET_malloc(sizeof (struct GNUNET_CRYPTO_ShortHashCode)); 192 rd.data = GNUNET_malloc(sizeof (struct GNUNET_CRYPTO_ShortHashCode));
@@ -193,7 +195,8 @@ run (void *cls,
193 GNUNET_break (NULL != nsh); 195 GNUNET_break (NULL != nsh);
194 196
195 expire = GNUNET_TIME_absolute_get (); 197 expire = GNUNET_TIME_absolute_get ();
196 s_signature = GNUNET_NAMESTORE_create_signature(privkey, rd.expiration, s_name, &rd, 1); 198 et.abs_value = rd.expiration_time;
199 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, &rd, 1);
197 GNUNET_NAMESTORE_record_put(nsh, &pubkey, s_name, expire, 1, &rd, s_signature, put_cont, NULL); 200 GNUNET_NAMESTORE_record_put(nsh, &pubkey, s_name, expire, 1, &rd, s_signature, put_cont, NULL);
198 201
199 GNUNET_free ((void *) rd.data); 202 GNUNET_free ((void *) rd.data);