#include "gnunet_dht_service.h"
/* DEFINES */
-#define VERBOSE GNUNET_EXTRA_LOGGING
+#define VERBOSE GNUNET_NO
/* Timeout for entire testcase */
#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 5)
*/
static unsigned int failed_connections;
-/* Task handle to use to schedule test failure */
+/**
+ * Task handle to use to schedule test failure
+ */
GNUNET_SCHEDULER_TaskIdentifier die_task;
-/* Global return value (0 for success, anything else for failure) */
+/**
+ * Global return value (0 for success, anything else for failure)
+ */
static int ok;
/**
#if VERBOSE
if (put_path != NULL)
{
- fprintf (stderr, "PUT Path: ");
+ FPRINTF (stderr, "%s", "PUT Path: ");
for (i = 0; i < put_path_length; i++)
- fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
- fprintf (stderr, "\n");
+ FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
+ FPRINTF (stderr, "%s", "\n");
}
if (get_path != NULL)
{
- fprintf (stderr, "GET Path: ");
+ FPRINTF (stderr, "%s", "GET Path: ");
for (i = 0; i < get_path_length; i++)
- fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
- fprintf (stderr, "\n");
+ FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
+ FPRINTF (stderr, "%s", "\n");
}
#endif
* 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 */
"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 */
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);