gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13126 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r13126 - gnunet/src/dht
Date: Sat, 2 Oct 2010 16:14:53 +0200

Author: grothoff
Date: 2010-10-02 16:14:53 +0200 (Sat, 02 Oct 2010)
New Revision: 13126

Modified:
   gnunet/src/dht/test_dht_twopeer_put_get.c
Log:
make third test compile

Modified: gnunet/src/dht/test_dht_twopeer_put_get.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer_put_get.c   2010-10-02 14:11:03 UTC (rev 
13125)
+++ gnunet/src/dht/test_dht_twopeer_put_get.c   2010-10-02 14:14:53 UTC (rev 
13126)
@@ -186,14 +186,11 @@
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failing test with error: `%s'!\n", 
(char *)cls);
   if (global_get_handle != NULL)
-  {
-    GNUNET_DHT_get_stop(global_get_handle, &end_badly_cont, NULL);
-  }
-  else
-  {
-    GNUNET_SCHEDULER_add_now(sched, &end_badly_cont, NULL);
-  }
-
+    {
+      GNUNET_DHT_get_stop(global_get_handle);
+      global_get_handle = NULL;
+    }
+  GNUNET_SCHEDULER_add_now(sched, &end_badly_cont, NULL);
   ok = 1;
 }
 
@@ -210,7 +207,9 @@
 void get_result_iterator (void *cls,
                           struct GNUNET_TIME_Absolute exp,
                           const GNUNET_HashCode * key,
-                          uint32_t type,
+                         const struct GNUNET_PeerIdentity * const *get_path,
+                         const struct GNUNET_PeerIdentity * const *put_path,
+                         enum GNUNET_BLOCK_Type type,
                           uint32_t size,
                           const void *data)
 {
@@ -229,7 +228,8 @@
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received correct GET response!\n");
   GNUNET_SCHEDULER_cancel(sched, die_task);
-  GNUNET_DHT_get_stop(global_get_handle, &finish_testing, NULL);
+  GNUNET_DHT_get_stop(global_get_handle);
+  GNUNET_SCHEDULER_add_now (sched, &finish_testing, NULL);
 }
 
 /**
@@ -240,7 +240,12 @@
 {
   GNUNET_HashCode key; /* Key for data lookup */
   memset(&key, 42, sizeof(GNUNET_HashCode)); /* Set the key to the same thing 
as when data was inserted */
-  global_get_handle = GNUNET_DHT_get_start(peer2dht, 
GNUNET_TIME_relative_get_forever(), 1, &key, &get_result_iterator, NULL, NULL, 
NULL);
+  global_get_handle = GNUNET_DHT_get_start(peer2dht, 
GNUNET_TIME_relative_get_forever(),
+                                          1 /* FIXME: use real type */, &key,
+                                          GNUNET_DHT_RO_NONE,
+                                          NULL, 0,
+                                          NULL, 0,
+                                          &get_result_iterator, NULL);
 }
 
 /**
@@ -270,10 +275,11 @@
   /* Insert the data at the first peer */
   GNUNET_DHT_put(peer1dht,
                  &key,
-                 1,
+                GNUNET_DHT_RO_NONE,
+                 1 /* FIXME: use real type */,
                  sizeof(data), data,
-                 GNUNET_TIME_absolute_get_forever(),
-                 GNUNET_TIME_relative_get_forever(),
+                 GNUNET_TIME_UNIT_FOREVER_ABS,
+                 GNUNET_TIME_UNIT_FOREVER_REL,
                  &put_finished, NULL);
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]