aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-07 12:45:04 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-07 12:45:04 +0000
commitab3c2a6c36e4f0f78ccd082b731262d637d819d3 (patch)
treec7cede937bba981ae118ba4112be5d05ec5a7a73 /src
parentcf9c46282c0a339cb08c145340f22f31be6519da (diff)
downloadgnunet-ab3c2a6c36e4f0f78ccd082b731262d637d819d3.tar.gz
gnunet-ab3c2a6c36e4f0f78ccd082b731262d637d819d3.zip
namestore api change: include block expiration time in record create
Diffstat (limited to 'src')
-rw-r--r--src/gns/gnunet-gns-fcfsd.c1
-rw-r--r--src/gns/namestore_stub_api.c1
-rw-r--r--src/gns/test_gns_dht_delegated_lookup.c1
-rw-r--r--src/gns/test_gns_simple_delegated_lookup.c1
-rw-r--r--src/gns/test_gns_simple_lookup.c1
-rw-r--r--src/gns/test_gns_twopeer.c3
-rw-r--r--src/include/gnunet_namestore_service.h12
-rw-r--r--src/namestore/gnunet-namestore.c38
-rw-r--r--src/namestore/gnunet-service-namestore.c13
-rw-r--r--src/namestore/namestore_api.c3
-rw-r--r--src/namestore/test_namestore_api.conf2
-rw-r--r--src/namestore/test_namestore_api_create.c4
-rw-r--r--src/namestore/test_namestore_api_create_update.c8
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c4
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c4
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c6
16 files changed, 77 insertions, 25 deletions
diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c
index f931a3680..c93e3c285 100644
--- a/src/gns/gnunet-gns-fcfsd.c
+++ b/src/gns/gnunet-gns-fcfsd.c
@@ -392,6 +392,7 @@ lookup_result_processor (void *cls,
392 r.flags = htonl (GNUNET_NAMESTORE_RF_AUTHORITY); 392 r.flags = htonl (GNUNET_NAMESTORE_RF_AUTHORITY);
393 request->qe = GNUNET_NAMESTORE_record_create (ns, 393 request->qe = GNUNET_NAMESTORE_record_create (ns,
394 fcfs_zone_pkey, 394 fcfs_zone_pkey,
395 GNUNET_TIME_absolute_get_forever(),
395 request->domain_name, 396 request->domain_name,
396 &r, 397 &r,
397 &put_continuation, 398 &put_continuation,
diff --git a/src/gns/namestore_stub_api.c b/src/gns/namestore_stub_api.c
index d067bca54..d17c5bdca 100644
--- a/src/gns/namestore_stub_api.c
+++ b/src/gns/namestore_stub_api.c
@@ -227,6 +227,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary
227struct GNUNET_NAMESTORE_QueueEntry * 227struct GNUNET_NAMESTORE_QueueEntry *
228GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, 228GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
229 const struct GNUNET_CRYPTO_RsaPrivateKey *key, 229 const struct GNUNET_CRYPTO_RsaPrivateKey *key,
230 const struct GNUNET_TIME_Absolute expire,
230 const char *name, 231 const char *name,
231 const struct GNUNET_NAMESTORE_RecordData *rd, 232 const struct GNUNET_NAMESTORE_RecordData *rd,
232 GNUNET_NAMESTORE_ContinuationWithStatus cont, 233 GNUNET_NAMESTORE_ContinuationWithStatus cont,
diff --git a/src/gns/test_gns_dht_delegated_lookup.c b/src/gns/test_gns_dht_delegated_lookup.c
index 83fdf1873..493cb7311 100644
--- a/src/gns/test_gns_dht_delegated_lookup.c
+++ b/src/gns/test_gns_dht_delegated_lookup.c
@@ -302,6 +302,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
302 302
303 GNUNET_NAMESTORE_record_create (namestore_handle, 303 GNUNET_NAMESTORE_record_create (namestore_handle,
304 alice_key, 304 alice_key,
305 GNUNET_TIME_absolute_get_forever(),
305 TEST_AUTHORITY_NAME, 306 TEST_AUTHORITY_NAME,
306 &rd, 307 &rd,
307 &put_dht, 308 &put_dht,
diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c
index 059d08c06..0ccf872ed 100644
--- a/src/gns/test_gns_simple_delegated_lookup.c
+++ b/src/gns/test_gns_simple_delegated_lookup.c
@@ -226,6 +226,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
226 226
227 GNUNET_NAMESTORE_record_create (namestore_handle, 227 GNUNET_NAMESTORE_record_create (namestore_handle,
228 alice_key, 228 alice_key,
229 GNUNET_TIME_absolute_get_forever(),
229 TEST_AUTHORITY_NAME, 230 TEST_AUTHORITY_NAME,
230 &rd, 231 &rd,
231 NULL, 232 NULL,
diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c
index d75ff2d28..2b8e0ae88 100644
--- a/src/gns/test_gns_simple_lookup.c
+++ b/src/gns/test_gns_simple_lookup.c
@@ -214,6 +214,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
214 214
215 GNUNET_NAMESTORE_record_create (namestore_handle, 215 GNUNET_NAMESTORE_record_create (namestore_handle,
216 alice_key, 216 alice_key,
217 GNUNET_TIME_absolute_get_forever(),
217 TEST_RECORD_NAME, 218 TEST_RECORD_NAME,
218 &rd, 219 &rd,
219 &finish_testing, 220 &finish_testing,
diff --git a/src/gns/test_gns_twopeer.c b/src/gns/test_gns_twopeer.c
index 8ebb9611b..d8988f34c 100644
--- a/src/gns/test_gns_twopeer.c
+++ b/src/gns/test_gns_twopeer.c
@@ -437,6 +437,7 @@ run (void *cls, char *const *args, const char *cfgfile,
437 437
438 GNUNET_NAMESTORE_record_create (namestore_handle, 438 GNUNET_NAMESTORE_record_create (namestore_handle,
439 alice_key, 439 alice_key,
440 GNUNET_TIME_absolute_get_forever(),
440 "bob", 441 "bob",
441 &rd, 442 &rd,
442 NULL, 443 NULL,
@@ -445,6 +446,7 @@ run (void *cls, char *const *args, const char *cfgfile,
445 rd.data = &alice_pkey; 446 rd.data = &alice_pkey;
446 GNUNET_NAMESTORE_record_create (namestore_handle, 447 GNUNET_NAMESTORE_record_create (namestore_handle,
447 bob_key, 448 bob_key,
449 GNUNET_TIME_absolute_get_forever(),
448 "alice", 450 "alice",
449 &rd, 451 &rd,
450 NULL, 452 NULL,
@@ -460,6 +462,7 @@ run (void *cls, char *const *args, const char *cfgfile,
460 462
461 GNUNET_NAMESTORE_record_create (namestore_handle, 463 GNUNET_NAMESTORE_record_create (namestore_handle,
462 bob_key, 464 bob_key,
465 GNUNET_TIME_absolute_get_forever(),
463 "www", 466 "www",
464 &rd, 467 &rd,
465 NULL, 468 NULL,
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index f2f314bfc..497d57136 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -227,6 +227,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary
227 * 227 *
228 * @param h handle to the namestore 228 * @param h handle to the namestore
229 * @param pkey private key of the zone 229 * @param pkey private key of the zone
230 * @param expire block expiration time
230 * @param name name that is being mapped (at most 255 characters long) 231 * @param name name that is being mapped (at most 255 characters long)
231 * @param rd record data to store 232 * @param rd record data to store
232 * @param cont continuation to call when done 233 * @param cont continuation to call when done
@@ -235,11 +236,12 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary
235 */ 236 */
236struct GNUNET_NAMESTORE_QueueEntry * 237struct GNUNET_NAMESTORE_QueueEntry *
237GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, 238GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
238 const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, 239 const struct GNUNET_CRYPTO_RsaPrivateKey *pkey,
239 const char *name, 240 const struct GNUNET_TIME_Absolute expire,
240 const struct GNUNET_NAMESTORE_RecordData *rd, 241 const char *name,
241 GNUNET_NAMESTORE_ContinuationWithStatus cont, 242 const struct GNUNET_NAMESTORE_RecordData *rd,
242 void *cont_cls); 243 GNUNET_NAMESTORE_ContinuationWithStatus cont,
244 void *cont_cls);
243 245
244 246
245/** 247/**
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index f48d1c23d..9829eaaa4 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -103,7 +103,11 @@ static char *typestring;
103 * Desired expiration time. 103 * Desired expiration time.
104 */ 104 */
105static char *expirationstring; 105static char *expirationstring;
106 106
107/**
108 * Desired block expiration time.
109 */
110static char *blockexpirationstring;
107 111
108/** 112/**
109 * Task run on shutdown. Cleans up everything. 113 * Task run on shutdown. Cleans up everything.
@@ -257,6 +261,7 @@ run (void *cls, char *const *args, const char *cfgfile,
257 void *data = NULL; 261 void *data = NULL;
258 size_t data_size = 0; 262 size_t data_size = 0;
259 struct GNUNET_TIME_Relative etime; 263 struct GNUNET_TIME_Relative etime;
264 struct GNUNET_TIME_Relative btime;
260 struct GNUNET_NAMESTORE_RecordData rd; 265 struct GNUNET_NAMESTORE_RecordData rd;
261 266
262 if (NULL == keyfile) 267 if (NULL == keyfile)
@@ -354,6 +359,27 @@ run (void *cls, char *const *args, const char *cfgfile,
354 GNUNET_SCHEDULER_shutdown (); 359 GNUNET_SCHEDULER_shutdown ();
355 return; 360 return;
356 } 361 }
362 if (NULL != blockexpirationstring)
363 {
364 if (GNUNET_OK !=
365 GNUNET_STRINGS_fancy_time_to_relative (blockexpirationstring,
366 &btime))
367 {
368 fprintf (stderr,
369 _("Invalid time format `%s'\n"),
370 blockexpirationstring);
371 GNUNET_SCHEDULER_shutdown ();
372 return;
373 }
374 } else if (add | del)
375 {
376 fprintf (stderr,
377 _("Missing option `%s' for operation `%s'\n"),
378 "-b", _("add/del"));
379 GNUNET_SCHEDULER_shutdown ();
380 return;
381 }
382
357 if (add) 383 if (add)
358 { 384 {
359 if (NULL == name) 385 if (NULL == name)
@@ -371,6 +397,7 @@ run (void *cls, char *const *args, const char *cfgfile,
371 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always... 397 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always...
372 add_qe = GNUNET_NAMESTORE_record_create (ns, 398 add_qe = GNUNET_NAMESTORE_record_create (ns,
373 zone_pkey, 399 zone_pkey,
400 GNUNET_TIME_relative_to_absolute (btime),
374 name, 401 name,
375 &rd, 402 &rd,
376 &add_continuation, 403 &add_continuation,
@@ -391,7 +418,7 @@ run (void *cls, char *const *args, const char *cfgfile,
391 rd.record_type = type; 418 rd.record_type = type;
392 rd.expiration = GNUNET_TIME_relative_to_absolute (etime); 419 rd.expiration = GNUNET_TIME_relative_to_absolute (etime);
393 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always... 420 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always...
394 del_qe = GNUNET_NAMESTORE_record_create (ns, 421 del_qe = GNUNET_NAMESTORE_record_remove (ns,
395 zone_pkey, 422 zone_pkey,
396 name, 423 name,
397 &rd, 424 &rd,
@@ -423,7 +450,10 @@ main (int argc, char *const *argv)
423 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 450 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
424 {'a', "add", NULL, 451 {'a', "add", NULL,
425 gettext_noop ("add record"), 0, 452 gettext_noop ("add record"), 0,
426 &GNUNET_GETOPT_set_one, &add}, 453 &GNUNET_GETOPT_set_one, &add},
454 {'b', "name-expiration", "TIME",
455 gettext_noop ("expiration time for name to use (for adding only)"), 1,
456 &GNUNET_GETOPT_set_string, &blockexpirationstring},
427 {'d', "delete", NULL, 457 {'d', "delete", NULL,
428 gettext_noop ("delete record"), 0, 458 gettext_noop ("delete record"), 0,
429 &GNUNET_GETOPT_set_one, &del}, 459 &GNUNET_GETOPT_set_one, &del},
@@ -431,7 +461,7 @@ main (int argc, char *const *argv)
431 gettext_noop ("display records"), 0, 461 gettext_noop ("display records"), 0,
432 &GNUNET_GETOPT_set_one, &list}, 462 &GNUNET_GETOPT_set_one, &list},
433 {'e', "expiration", "TIME", 463 {'e', "expiration", "TIME",
434 gettext_noop ("expiration time to use (for adding only)"), 1, 464 gettext_noop ("expiration time for record to use (for adding only)"), 1,
435 &GNUNET_GETOPT_set_string, &expirationstring}, 465 &GNUNET_GETOPT_set_string, &expirationstring},
436 {'n', "name", "NAME", 466 {'n', "name", "NAME",
437 gettext_noop ("name of the record to add/delete/display"), 1, 467 gettext_noop ("name of the record to add/delete/display"), 1,
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index c92f39a59..67c7e6e57 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -170,6 +170,7 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client)
170 GNUNET_free (no); 170 GNUNET_free (no);
171 } 171 }
172 172
173
173 GNUNET_SERVER_client_drop(nc->client); 174 GNUNET_SERVER_client_drop(nc->client);
174 GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc); 175 GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc);
175 GNUNET_free (nc); 176 GNUNET_free (nc);
@@ -543,6 +544,7 @@ handle_create_record_it (void *cls,
543 struct CreateRecordContext * crc = cls; 544 struct CreateRecordContext * crc = cls;
544 struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL; 545 struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL;
545 struct GNUNET_NAMESTORE_RecordData *rd_new = NULL; 546 struct GNUNET_NAMESTORE_RecordData *rd_new = NULL;
547 struct GNUNET_TIME_Absolute block_expiration;
546 int res; 548 int res;
547 int exist = GNUNET_SYSERR; 549 int exist = GNUNET_SYSERR;
548 int update = GNUNET_NO; 550 int update = GNUNET_NO;
@@ -609,11 +611,16 @@ handle_create_record_it (void *cls,
609 } 611 }
610 } 612 }
611 613
614 block_expiration = GNUNET_TIME_absolute_max(crc->expire, expire);
615 if (block_expiration.abs_value != expire.abs_value)
616 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Updated block expiration time\n");
617
618
612 /* Database operation */ 619 /* Database operation */
613 GNUNET_assert ((rd_new != NULL) && (rd_count_new > 0)); 620 GNUNET_assert ((rd_new != NULL) && (rd_count_new > 0));
614 res = GSN_database->put_records(GSN_database->cls, 621 res = GSN_database->put_records(GSN_database->cls,
615 (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *) crc->pubkey, 622 (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *) crc->pubkey,
616 crc->expire, 623 block_expiration,
617 crc->name, 624 crc->name,
618 rd_count_new, rd_new, 625 rd_count_new, rd_new,
619 signature_new); 626 signature_new);
@@ -729,6 +736,7 @@ static void handle_record_create (void *cls,
729 } 736 }
730 737
731 struct GNUNET_NAMESTORE_RecordData rd[rd_count]; 738 struct GNUNET_NAMESTORE_RecordData rd[rd_count];
739
732 res = GNUNET_NAMESTORE_records_deserialize(rd_ser_len, rd_ser, rd_count, rd); 740 res = GNUNET_NAMESTORE_records_deserialize(rd_ser_len, rd_ser, rd_count, rd);
733 if ((res != GNUNET_OK) || (rd_count != 1)) 741 if ((res != GNUNET_OK) || (rd_count != 1))
734 { 742 {
@@ -742,6 +750,8 @@ static void handle_record_create (void *cls,
742 GNUNET_CRYPTO_rsa_key_get_public(pkey, &pub); 750 GNUNET_CRYPTO_rsa_key_get_public(pkey, &pub);
743 GNUNET_CRYPTO_hash (&pub, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &pubkey_hash); 751 GNUNET_CRYPTO_hash (&pub, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &pubkey_hash);
744 752
753 crc.expire = GNUNET_TIME_absolute_ntoh(rp_msg->expire);
754 crc.res = GNUNET_SYSERR;
745 crc.pkey = pkey; 755 crc.pkey = pkey;
746 crc.pubkey = &pub; 756 crc.pubkey = &pub;
747 crc.rd = rd; 757 crc.rd = rd;
@@ -1289,7 +1299,6 @@ static void handle_iteration_start (void *cls,
1289 1299
1290 GNUNET_CONTAINER_DLL_insert (nc->op_head, nc->op_tail, zi); 1300 GNUNET_CONTAINER_DLL_insert (nc->op_head, nc->op_tail, zi);
1291 1301
1292
1293 res = GSN_database->iterate_records (GSN_database->cls, zone_tmp , NULL, zi->offset , &zone_iteration_proc, zi); 1302 res = GSN_database->iterate_records (GSN_database->cls, zone_tmp , NULL, zi->offset , &zone_iteration_proc, zi);
1294 GNUNET_SERVER_receive_done (client, GNUNET_OK); 1303 GNUNET_SERVER_receive_done (client, GNUNET_OK);
1295} 1304}
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 87894cee3..9cdc70454 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -1095,6 +1095,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary
1095 * 1095 *
1096 * @param h handle to the namestore 1096 * @param h handle to the namestore
1097 * @param pkey private key of the zone 1097 * @param pkey private key of the zone
1098 * @param expire block expiration time
1098 * @param name name that is being mapped (at most 255 characters long) 1099 * @param name name that is being mapped (at most 255 characters long)
1099 * @param rd record data to store 1100 * @param rd record data to store
1100 * @param cont continuation to call when done 1101 * @param cont continuation to call when done
@@ -1104,6 +1105,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary
1104struct GNUNET_NAMESTORE_QueueEntry * 1105struct GNUNET_NAMESTORE_QueueEntry *
1105GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, 1106GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
1106 const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, 1107 const struct GNUNET_CRYPTO_RsaPrivateKey *pkey,
1108 const struct GNUNET_TIME_Absolute expire,
1107 const char *name, 1109 const char *name,
1108 const struct GNUNET_NAMESTORE_RecordData *rd, 1110 const struct GNUNET_NAMESTORE_RecordData *rd,
1109 GNUNET_NAMESTORE_ContinuationWithStatus cont, 1111 GNUNET_NAMESTORE_ContinuationWithStatus cont,
@@ -1169,6 +1171,7 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
1169 msg->rd_count = htons (1); 1171 msg->rd_count = htons (1);
1170 msg->rd_len = htons (rd_ser_len); 1172 msg->rd_len = htons (rd_ser_len);
1171 msg->pkey_len = htons (key_len); 1173 msg->pkey_len = htons (key_len);
1174 msg->expire = GNUNET_TIME_absolute_hton(expire);
1172 memcpy (pkey_tmp, pkey_enc, key_len); 1175 memcpy (pkey_tmp, pkey_enc, key_len);
1173 memcpy (name_tmp, name, name_len); 1176 memcpy (name_tmp, name, name_len);
1174 memcpy (rd_tmp, rd_ser, rd_ser_len); 1177 memcpy (rd_tmp, rd_ser, rd_ser_len);
diff --git a/src/namestore/test_namestore_api.conf b/src/namestore/test_namestore_api.conf
index f4cd32dbd..a1ddd10e4 100644
--- a/src/namestore/test_namestore_api.conf
+++ b/src/namestore/test_namestore_api.conf
@@ -4,7 +4,7 @@ DEFAULTSERVICES = namestore
4UNIXPATH = /tmp/gnunet-p1-service-arm.sock 4UNIXPATH = /tmp/gnunet-p1-service-arm.sock
5 5
6[namestore] 6[namestore]
7#PREFIX = valgrind --leak-check=full 7#PREFIX = valgrind --leak-check=full --track-origins=yes
8AUTOSTART = YES 8AUTOSTART = YES
9UNIXPATH = /tmp/gnunet-service-namestore.sock 9UNIXPATH = /tmp/gnunet-service-namestore.sock
10UNIX_MATCH_UID = YES 10UNIX_MATCH_UID = YES
diff --git a/src/namestore/test_namestore_api_create.c b/src/namestore/test_namestore_api_create.c
index a2e1366c8..6cbf617cf 100644
--- a/src/namestore/test_namestore_api_create.c
+++ b/src/namestore/test_namestore_api_create.c
@@ -301,7 +301,7 @@ void name_lookup_initial_proc (void *cls,
301 s_second_record->data_size = TEST_CREATE_RECORD_DATALEN; 301 s_second_record->data_size = TEST_CREATE_RECORD_DATALEN;
302 memset ((char *) s_second_record->data, TEST_CREATE_RECORD_DATA, TEST_CREATE_RECORD_DATALEN); 302 memset ((char *) s_second_record->data, TEST_CREATE_RECORD_DATA, TEST_CREATE_RECORD_DATALEN);
303 303
304 GNUNET_NAMESTORE_record_create (nsh, privkey, name, s_second_record, &create_second_cont, name); 304 GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), name, s_second_record, &create_second_cont, name);
305 305
306 } 306 }
307 else 307 else
@@ -430,7 +430,7 @@ run (void *cls, char *const *args, const char *cfgfile,
430 GNUNET_break (s_name != NULL); 430 GNUNET_break (s_name != NULL);
431 431
432 /* create initial record */ 432 /* create initial record */
433 GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_first_cont, s_name); 433 GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_first_cont, s_name);
434} 434}
435 435
436static int 436static int
diff --git a/src/namestore/test_namestore_api_create_update.c b/src/namestore/test_namestore_api_create_update.c
index ca2cde10c..f209b22c2 100644
--- a/src/namestore/test_namestore_api_create_update.c
+++ b/src/namestore/test_namestore_api_create_update.c
@@ -301,7 +301,7 @@ void name_lookup_initial_proc (void *cls,
301 s_second_record->data_size = TEST_CREATE_RECORD_DATALEN; 301 s_second_record->data_size = TEST_CREATE_RECORD_DATALEN;
302 memset ((char *) s_second_record->data, TEST_CREATE_RECORD_DATA, TEST_CREATE_RECORD_DATALEN); 302 memset ((char *) s_second_record->data, TEST_CREATE_RECORD_DATA, TEST_CREATE_RECORD_DATALEN);
303 303
304 GNUNET_NAMESTORE_record_create (nsh, privkey, name, s_second_record, &create_second_cont, name); 304 GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), name, s_second_record, &create_second_cont, name);
305 305
306 } 306 }
307 else 307 else
@@ -349,7 +349,7 @@ create_identical_cont (void *cls, int32_t success, const char *emsg)
349 { 349 {
350 res = 0; 350 res = 0;
351 s_first_record->expiration = GNUNET_TIME_absolute_get (); 351 s_first_record->expiration = GNUNET_TIME_absolute_get ();
352 GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_updated_cont, s_name); 352 GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_updated_cont, s_name);
353 } 353 }
354 else 354 else
355 { 355 {
@@ -369,7 +369,7 @@ create_first_cont (void *cls, int32_t success, const char *emsg)
369 { 369 {
370 res = 0; 370 res = 0;
371 /* check if record was created correct */ 371 /* check if record was created correct */
372 GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_identical_cont, s_name); 372 GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_identical_cont, s_name);
373 } 373 }
374 else 374 else
375 { 375 {
@@ -474,7 +474,7 @@ run (void *cls, char *const *args, const char *cfgfile,
474 GNUNET_break (s_name != NULL); 474 GNUNET_break (s_name != NULL);
475 475
476 /* create initial record */ 476 /* create initial record */
477 GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_first_cont, s_name); 477 GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_first_cont, s_name);
478} 478}
479 479
480static int 480static int
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index 92e8e7988..ed4424210 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -409,7 +409,7 @@ run (void *cls, char *const *args, const char *cfgfile,
409 GNUNET_asprintf(&s_name_1, "dummy1"); 409 GNUNET_asprintf(&s_name_1, "dummy1");
410 s_rd_1 = create_record(1); 410 s_rd_1 = create_record(1);
411 sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1); 411 sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1);
412 GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_1, s_rd_1, &put_cont, NULL); 412 GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_1, s_rd_1, &put_cont, NULL);
413 413
414 414
415 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); 415 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n");
@@ -417,7 +417,7 @@ run (void *cls, char *const *args, const char *cfgfile,
417 s_rd_2 = create_record(1); 417 s_rd_2 = create_record(1);
418 418
419 sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); 419 sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1);
420 GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); 420 GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_2, s_rd_2, &put_cont, NULL);
421 421
422 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); 422 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n");
423 /* name in different zone */ 423 /* name in different zone */
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 7cdcea42a..74a607335 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -390,7 +390,7 @@ run (void *cls, char *const *args, const char *cfgfile,
390 GNUNET_asprintf(&s_name_1, "dummy1"); 390 GNUNET_asprintf(&s_name_1, "dummy1");
391 s_rd_1 = create_record(1); 391 s_rd_1 = create_record(1);
392 sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1); 392 sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1);
393 GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_1, s_rd_1, &put_cont, NULL); 393 GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_1, s_rd_1, &put_cont, NULL);
394 394
395 395
396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); 396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n");
@@ -398,7 +398,7 @@ run (void *cls, char *const *args, const char *cfgfile,
398 s_rd_2 = create_record(1); 398 s_rd_2 = create_record(1);
399 399
400 sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); 400 sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1);
401 GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); 401 GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_2, s_rd_2, &put_cont, NULL);
402 402
403 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); 403 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n");
404 /* name in different zone */ 404 /* name in different zone */
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 36a08d7db..0b4917855 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -28,7 +28,7 @@
28 28
29#define VERBOSE GNUNET_NO 29#define VERBOSE GNUNET_NO
30 30
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) 31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)
32 32
33static struct GNUNET_NAMESTORE_Handle * nsh; 33static struct GNUNET_NAMESTORE_Handle * nsh;
34 34
@@ -430,7 +430,7 @@ run (void *cls, char *const *args, const char *cfgfile,
430 GNUNET_asprintf(&s_name_1, "dummy1"); 430 GNUNET_asprintf(&s_name_1, "dummy1");
431 s_rd_1 = create_record(1); 431 s_rd_1 = create_record(1);
432 sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1); 432 sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1);
433 GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_1, s_rd_1, &put_cont, NULL); 433 GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_1, s_rd_1, &put_cont, NULL);
434 434
435 435
436 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); 436 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n");
@@ -438,7 +438,7 @@ run (void *cls, char *const *args, const char *cfgfile,
438 s_rd_2 = create_record(1); 438 s_rd_2 = create_record(1);
439 439
440 sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); 440 sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1);
441 GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); 441 GNUNET_NAMESTORE_record_create(nsh, privkey,GNUNET_TIME_absolute_get_forever(), s_name_2, s_rd_2, &put_cont, NULL);
442 442
443 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); 443 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n");
444 /* name in different zone */ 444 /* name in different zone */