-more debug messages
[oweals/gnunet.git] / src / namestore / test_namestore_api_zone_to_name.c
index e5db28165eb37e9ee12c0eaf79890e08443a5493..0e29b8b330a8ddf1b1fd9c0e569dc09d10909e91 100644 (file)
@@ -70,7 +70,7 @@ static void
 endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (nsh != NULL)
-    GNUNET_NAMESTORE_disconnect (nsh, GNUNET_YES);
+    GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
     GNUNET_CRYPTO_rsa_key_free (privkey);
@@ -91,7 +91,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_CRYPTO_rsa_key_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
-    GNUNET_NAMESTORE_disconnect (nsh, GNUNET_YES);
+    GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
 }
 
@@ -163,8 +163,11 @@ put_cont (void *cls, int32_t success, const char *emsg)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
+  struct GNUNET_TIME_Absolute et;
+
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL);
   GNUNET_asprintf(&s_name, "dummy");
   /* load privat key */
@@ -184,7 +187,7 @@ run (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value));
 
   struct GNUNET_NAMESTORE_RecordData rd;
-  rd.expiration = GNUNET_TIME_absolute_get();
+  rd.expiration_time = GNUNET_TIME_absolute_get().abs_value;
   rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
   rd.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode);
   rd.data = GNUNET_malloc(sizeof (struct GNUNET_CRYPTO_ShortHashCode));
@@ -193,7 +196,8 @@ run (void *cls,
   GNUNET_break (NULL != nsh);
 
   expire = GNUNET_TIME_absolute_get ();
-  s_signature = GNUNET_NAMESTORE_create_signature(privkey, rd.expiration, s_name, &rd, 1);
+  et.abs_value = rd.expiration_time;
+  s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, &rd, 1);
   GNUNET_NAMESTORE_record_put(nsh, &pubkey, s_name, expire, 1, &rd, s_signature, put_cont, NULL);
 
   GNUNET_free ((void *) rd.data);