- reverting api change
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 7 Mar 2012 14:17:19 +0000 (14:17 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 7 Mar 2012 14:17:19 +0000 (14:17 +0000)
14 files changed:
src/gns/gnunet-gns-fcfsd.c
src/gns/namestore_stub_api.c
src/gns/test_gns_dht_delegated_lookup.c
src/gns/test_gns_simple_delegated_lookup.c
src/gns/test_gns_simple_lookup.c
src/gns/test_gns_twopeer.c
src/include/gnunet_namestore_service.h
src/namestore/gnunet-namestore.c
src/namestore/namestore_api.c
src/namestore/test_namestore_api_create.c
src/namestore/test_namestore_api_create_update.c
src/namestore/test_namestore_api_zone_iteration.c
src/namestore/test_namestore_api_zone_iteration_specific_zone.c
src/namestore/test_namestore_api_zone_iteration_stop.c

index c93e3c2853bcf4163fcc495d9b2df0e3ce2ec173..f931a368038c3726264331a120c21674bb0283df 100644 (file)
@@ -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,
index d17c5bdca50929253b42a4792d6652b3af13cb25..d067bca5438c77b87c3314a5a14e394cb087e6ae 100644 (file)
@@ -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,
index 493cb73112a06e0b730fce866fd9a76ed607f1b9..83fdf18730b0de924d32a3d11c3133a06e3430fa 100644 (file)
@@ -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,
index 0ccf872edb3513c028f7019b7787161bddc12fc5..059d08c067f09138c12004ad63c24acce7446c8a 100644 (file)
@@ -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,
index 2b8e0ae883135462a32d5dcee8f5bbf625a51ded..d75ff2d28f4aeac56bb0ae4d257106eedb14661c 100644 (file)
@@ -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,
index d8988f34c11235e1383ed7c95a4a67cae80fb5b8..8ebb9611b31ac8b10b9daa51daacc709313b055e 100644 (file)
@@ -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,
index 497d57136060e4bc606c54374846c59997d0fb7c..29c70a1795aa5fccf2261cb4f36236982ddcaa9a 100644 (file)
@@ -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,
index 9829eaaa41d3c13bd934887a9e3da6fb8eeced83..4f7dc161bd3ce299eba8ba84ab6a36ddd6af0c53 100644 (file)
@@ -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},   
index 9cdc70454be0e8400eaaa2d0f148dedd030880b0..d92463bbdd85c1c4a4d87e9b967fb67caee34cb0 100644 (file)
@@ -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);
index 6cbf617cf49ef332356e9474f9d0a99e6ca69f27..a2e1366c840f2caeb515f5f3ee3069254fe60a3f 100644 (file)
@@ -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
index f209b22c258ebeb5ab42c65bd4bd7b80aa1c35d9..ca2cde10c4ac33776f8b566ab6a79453acb8181a 100644 (file)
@@ -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
index ed4424210f3944941e4aad816541e9af347e29dd..92e8e7988a89762766081e072ba2a76c42dc346f 100644 (file)
@@ -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 */
index 74a607335112045b143c4472d2f4726bba485722..7cdcea42a08cc7d4094e777e8506fec49e74e4df 100644 (file)
@@ -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 */
index 0b4917855b86b1bc6ffaeb8495fadb9cb822cc5c..0c2fe0624c8a5ae3c40175b7e986becbac76d6ff 100644 (file)
@@ -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 */