-fixing #2397
[oweals/gnunet.git] / src / dht / test_dht_twopeer.c
index 6f2b0de18e07e652e6b9e93e512bc96f64e9daa0..8579013e371a6c50b03c1f571cfce907e32adafe 100644 (file)
@@ -28,8 +28,6 @@
 #include "gnunet_dht_service.h"
 
 /* DEFINES */
-#define VERBOSE GNUNET_NO
-
 #define MAX_GET_ATTEMPTS 10
 
 #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 5)
@@ -171,7 +169,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
  */
 static void
 get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
-                     const GNUNET_HashCode * key,
+                     const struct GNUNET_HashCode * key,
                      const struct GNUNET_PeerIdentity *get_path,
                      unsigned int get_path_length,
                      const struct GNUNET_PeerIdentity *put_path,
@@ -181,7 +179,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
   struct PeerGetContext *get_context = cls;
 
   if (0 !=
-      memcmp (&get_context->peer->hashPubKey, key, sizeof (GNUNET_HashCode)))
+      memcmp (&get_context->peer->hashPubKey, key, sizeof (struct GNUNET_HashCode)))
   {
     FPRINTF (stderr, "%s",  "??\n");
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -250,8 +248,6 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                     &stop_retry_get, get_context);
   get_context->get_handle =
       GNUNET_DHT_get_start (get_context->dht_handle,
-                            GNUNET_TIME_relative_multiply
-                            (GNUNET_TIME_UNIT_SECONDS, 5),
                             GNUNET_BLOCK_TYPE_DHT_HELLO,
                             &get_context->peer->hashPubKey, 1,
                             GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator,
@@ -285,8 +281,6 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                     &stop_retry_get, get_context);
   get_context->get_handle =
       GNUNET_DHT_get_start (get_context->dht_handle,
-                            GNUNET_TIME_relative_multiply
-                            (GNUNET_TIME_UNIT_SECONDS, 5),
                             GNUNET_BLOCK_TYPE_DHT_HELLO,
                             &get_context->peer->hashPubKey, 1,
                             GNUNET_DHT_RO_FIND_PEER, NULL, 0,
@@ -434,7 +428,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
 
   if (GNUNET_SYSERR ==
-      GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers",
+      GNUNET_CONFIGURATION_get_value_number (cfg, "testing_old", "num_peers",
                                              &num_peers))
     num_peers = DEFAULT_NUM_PEERS;