From: Matthias Wachs Date: Wed, 7 Mar 2012 14:17:19 +0000 (+0000) Subject: - reverting api change X-Git-Tag: initial-import-from-subversion-38251~14377 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3363469a42ac6f4b1245c0fe160a98f40845b748;p=oweals%2Fgnunet.git - reverting api change --- diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c index c93e3c285..f931a3680 100644 --- a/src/gns/gnunet-gns-fcfsd.c +++ b/src/gns/gnunet-gns-fcfsd.c @@ -392,7 +392,6 @@ lookup_result_processor (void *cls, r.flags = htonl (GNUNET_NAMESTORE_RF_AUTHORITY); request->qe = GNUNET_NAMESTORE_record_create (ns, fcfs_zone_pkey, - GNUNET_TIME_absolute_get_forever(), request->domain_name, &r, &put_continuation, diff --git a/src/gns/namestore_stub_api.c b/src/gns/namestore_stub_api.c index d17c5bdca..d067bca54 100644 --- a/src/gns/namestore_stub_api.c +++ b/src/gns/namestore_stub_api.c @@ -227,7 +227,6 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary struct GNUNET_NAMESTORE_QueueEntry * GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_CRYPTO_RsaPrivateKey *key, - const struct GNUNET_TIME_Absolute expire, const char *name, const struct GNUNET_NAMESTORE_RecordData *rd, 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 493cb7311..83fdf1873 100644 --- a/src/gns/test_gns_dht_delegated_lookup.c +++ b/src/gns/test_gns_dht_delegated_lookup.c @@ -302,7 +302,6 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, - GNUNET_TIME_absolute_get_forever(), TEST_AUTHORITY_NAME, &rd, &put_dht, diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c index 0ccf872ed..059d08c06 100644 --- a/src/gns/test_gns_simple_delegated_lookup.c +++ b/src/gns/test_gns_simple_delegated_lookup.c @@ -226,7 +226,6 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, - GNUNET_TIME_absolute_get_forever(), TEST_AUTHORITY_NAME, &rd, NULL, diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c index 2b8e0ae88..d75ff2d28 100644 --- a/src/gns/test_gns_simple_lookup.c +++ b/src/gns/test_gns_simple_lookup.c @@ -214,7 +214,6 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id, GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, - GNUNET_TIME_absolute_get_forever(), TEST_RECORD_NAME, &rd, &finish_testing, diff --git a/src/gns/test_gns_twopeer.c b/src/gns/test_gns_twopeer.c index d8988f34c..8ebb9611b 100644 --- a/src/gns/test_gns_twopeer.c +++ b/src/gns/test_gns_twopeer.c @@ -437,7 +437,6 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_NAMESTORE_record_create (namestore_handle, alice_key, - GNUNET_TIME_absolute_get_forever(), "bob", &rd, NULL, @@ -446,7 +445,6 @@ run (void *cls, char *const *args, const char *cfgfile, rd.data = &alice_pkey; GNUNET_NAMESTORE_record_create (namestore_handle, bob_key, - GNUNET_TIME_absolute_get_forever(), "alice", &rd, NULL, @@ -462,7 +460,6 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_NAMESTORE_record_create (namestore_handle, bob_key, - GNUNET_TIME_absolute_get_forever(), "www", &rd, NULL, diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index 497d57136..29c70a179 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h @@ -237,7 +237,6 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary struct GNUNET_NAMESTORE_QueueEntry * GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, - const struct GNUNET_TIME_Absolute expire, const char *name, const struct GNUNET_NAMESTORE_RecordData *rd, GNUNET_NAMESTORE_ContinuationWithStatus cont, diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 9829eaaa4..4f7dc161b 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c @@ -104,10 +104,6 @@ static char *typestring; */ static char *expirationstring; -/** - * Desired block expiration time. - */ -static char *blockexpirationstring; /** * Task run on shutdown. Cleans up everything. @@ -261,7 +257,6 @@ run (void *cls, char *const *args, const char *cfgfile, void *data = NULL; size_t data_size = 0; struct GNUNET_TIME_Relative etime; - struct GNUNET_TIME_Relative btime; struct GNUNET_NAMESTORE_RecordData rd; if (NULL == keyfile) @@ -359,27 +354,6 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_SCHEDULER_shutdown (); return; } - if (NULL != blockexpirationstring) - { - if (GNUNET_OK != - GNUNET_STRINGS_fancy_time_to_relative (blockexpirationstring, - &btime)) - { - fprintf (stderr, - _("Invalid time format `%s'\n"), - blockexpirationstring); - GNUNET_SCHEDULER_shutdown (); - return; - } - } else if (add | del) - { - fprintf (stderr, - _("Missing option `%s' for operation `%s'\n"), - "-b", _("add/del")); - GNUNET_SCHEDULER_shutdown (); - return; - } - if (add) { if (NULL == name) @@ -397,7 +371,6 @@ run (void *cls, char *const *args, const char *cfgfile, rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always... add_qe = GNUNET_NAMESTORE_record_create (ns, zone_pkey, - GNUNET_TIME_relative_to_absolute (btime), name, &rd, &add_continuation, @@ -451,9 +424,6 @@ main (int argc, char *const *argv) {'a', "add", NULL, gettext_noop ("add record"), 0, &GNUNET_GETOPT_set_one, &add}, - {'b', "name-expiration", "TIME", - gettext_noop ("expiration time for name to use (for adding only)"), 1, - &GNUNET_GETOPT_set_string, &blockexpirationstring}, {'d', "delete", NULL, gettext_noop ("delete record"), 0, &GNUNET_GETOPT_set_one, &del}, diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 9cdc70454..d92463bbd 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c @@ -1105,7 +1105,6 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary struct GNUNET_NAMESTORE_QueueEntry * GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, - const struct GNUNET_TIME_Absolute expire, const char *name, const struct GNUNET_NAMESTORE_RecordData *rd, GNUNET_NAMESTORE_ContinuationWithStatus cont, @@ -1171,7 +1170,7 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, msg->rd_count = htons (1); msg->rd_len = htons (rd_ser_len); msg->pkey_len = htons (key_len); - msg->expire = GNUNET_TIME_absolute_hton(expire); + msg->expire = GNUNET_TIME_absolute_hton(GNUNET_TIME_absolute_get_forever()); memcpy (pkey_tmp, pkey_enc, key_len); memcpy (name_tmp, name, name_len); memcpy (rd_tmp, rd_ser, rd_ser_len); diff --git a/src/namestore/test_namestore_api_create.c b/src/namestore/test_namestore_api_create.c index 6cbf617cf..a2e1366c8 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, s_second_record->data_size = TEST_CREATE_RECORD_DATALEN; memset ((char *) s_second_record->data, TEST_CREATE_RECORD_DATA, TEST_CREATE_RECORD_DATALEN); - GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), name, s_second_record, &create_second_cont, name); + GNUNET_NAMESTORE_record_create (nsh, privkey, name, s_second_record, &create_second_cont, name); } else @@ -430,7 +430,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_break (s_name != NULL); /* create initial record */ - GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_first_cont, s_name); + GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_first_cont, s_name); } static int diff --git a/src/namestore/test_namestore_api_create_update.c b/src/namestore/test_namestore_api_create_update.c index f209b22c2..ca2cde10c 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, s_second_record->data_size = TEST_CREATE_RECORD_DATALEN; memset ((char *) s_second_record->data, TEST_CREATE_RECORD_DATA, TEST_CREATE_RECORD_DATALEN); - GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), name, s_second_record, &create_second_cont, name); + GNUNET_NAMESTORE_record_create (nsh, privkey, name, s_second_record, &create_second_cont, name); } else @@ -349,7 +349,7 @@ create_identical_cont (void *cls, int32_t success, const char *emsg) { res = 0; s_first_record->expiration = GNUNET_TIME_absolute_get (); - GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_updated_cont, s_name); + GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_updated_cont, s_name); } else { @@ -369,7 +369,7 @@ create_first_cont (void *cls, int32_t success, const char *emsg) { res = 0; /* check if record was created correct */ - GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_identical_cont, s_name); + GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_identical_cont, s_name); } else { @@ -474,7 +474,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_break (s_name != NULL); /* create initial record */ - GNUNET_NAMESTORE_record_create (nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name, s_first_record, &create_first_cont, s_name); + GNUNET_NAMESTORE_record_create (nsh, privkey, s_name, s_first_record, &create_first_cont, s_name); } static int diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index ed4424210..92e8e7988 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, GNUNET_asprintf(&s_name_1, "dummy1"); s_rd_1 = create_record(1); sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1); - GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_1, s_rd_1, &put_cont, NULL); + GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_1, s_rd_1, &put_cont, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); @@ -417,7 +417,7 @@ run (void *cls, char *const *args, const char *cfgfile, s_rd_2 = create_record(1); sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); - GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_2, s_rd_2, &put_cont, NULL); + GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); /* 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 74a607335..7cdcea42a 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, GNUNET_asprintf(&s_name_1, "dummy1"); s_rd_1 = create_record(1); sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1); - GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_1, s_rd_1, &put_cont, NULL); + GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_1, s_rd_1, &put_cont, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); @@ -398,7 +398,7 @@ run (void *cls, char *const *args, const char *cfgfile, s_rd_2 = create_record(1); sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); - GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_2, s_rd_2, &put_cont, NULL); + GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); /* 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 0b4917855..0c2fe0624 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c @@ -430,7 +430,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_asprintf(&s_name_1, "dummy1"); s_rd_1 = create_record(1); sig_1 = GNUNET_NAMESTORE_create_signature(privkey, s_name_1, s_rd_1, 1); - GNUNET_NAMESTORE_record_create(nsh, privkey, GNUNET_TIME_absolute_get_forever(), s_name_1, s_rd_1, &put_cont, NULL); + GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_1, s_rd_1, &put_cont, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); @@ -438,7 +438,7 @@ run (void *cls, char *const *args, const char *cfgfile, s_rd_2 = create_record(1); sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); - GNUNET_NAMESTORE_record_create(nsh, privkey,GNUNET_TIME_absolute_get_forever(), s_name_2, s_rd_2, &put_cont, NULL); + GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); /* name in different zone */