-fixing #2397
[oweals/gnunet.git] / src / dht / test_dht_twopeer_path_tracking.c
index 6e764a387cffd4311ef8c5e7e7c7656d1500bb1a..86086b806b5ab5e57bd72517ae75a4865442eab6 100644 (file)
@@ -193,23 +193,23 @@ end_badly (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,
                      unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
                      size_t size, const void *data)
 {
-  GNUNET_HashCode original_key; /* Key data was stored data under */
+  struct GNUNET_HashCode original_key; /* Key data was stored data under */
   char original_data[4];        /* Made up data that was stored */
 
-  memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */
+  memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
   memset (original_data, 43, sizeof (original_data));
 #if VERBOSE
   unsigned int i;
 #endif
 
-  if ((0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) ||
+  if ((0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
       (0 != memcmp (original_data, data, sizeof (original_data))))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -249,17 +249,17 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
  * Schedule the GET request for some time in the future.
  */
 static void
-put_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+put_finished (void *cls, int success)
 {
-  GNUNET_HashCode key;          /* Key for data lookup */
+  struct GNUNET_HashCode key;          /* Key for data lookup */
 
   GNUNET_SCHEDULER_cancel (die_task);
   die_task =
       GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly,
                                     "waiting for get response (data not found)");
-  memset (&key, 42, sizeof (GNUNET_HashCode));  /* Set the key to the same thing as when data was inserted */
+  memset (&key, 42, sizeof (struct 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 (),
+      GNUNET_DHT_get_start (peer2dht, 
                             GNUNET_BLOCK_TYPE_TEST, &key, 1,
                             GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0,
                             &get_result_iterator, NULL);
@@ -271,10 +271,10 @@ put_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  GNUNET_HashCode key;          /* Made up key to store data under */
+  struct GNUNET_HashCode key;          /* Made up key to store data under */
   char data[4];                 /* Made up data to store */
 
-  memset (&key, 42, sizeof (GNUNET_HashCode));  /* Set the key to something simple so we can issue GET request */
+  memset (&key, 42, sizeof (struct GNUNET_HashCode));  /* Set the key to something simple so we can issue GET request */
   memset (data, 43, sizeof (data));
 
   /* Insert the data at the first peer */
@@ -441,7 +441,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   /* Get number of peers to start from configuration (should be two) */
   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;