*/
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;
/**
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
const GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
- unsigned int get_path_length,
+ 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)
+ 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 */
char original_data[4]; /* Made up data that was stored */
#if VERBOSE
if (put_path != NULL)
{
- fprintf (stderr, "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", "PUT Path: ");
+ for (i = 0; i < put_path_length; i++)
+ FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
+ FPRINTF (stderr, "%s", "\n");
}
if (get_path != NULL)
{
- fprintf (stderr, "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", "GET Path: ");
+ for (i = 0; i < get_path_length; i++)
+ FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
+ FPRINTF (stderr, "%s", "\n");
}
#endif
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_BLOCK_TYPE_TEST, &key,
- 1, GNUNET_DHT_RO_RECORD_ROUTE,
- NULL, 0, &get_result_iterator, NULL);
+ GNUNET_BLOCK_TYPE_TEST, &key, 1,
+ GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0,
+ &get_result_iterator, NULL);
}
/**
memset (data, 43, sizeof (data));
/* Insert the data at the first peer */
- GNUNET_DHT_put (peer1dht, &key, 1,
- GNUNET_DHT_RO_RECORD_ROUTE, GNUNET_BLOCK_TYPE_TEST,
- sizeof (data), data, GNUNET_TIME_UNIT_FOREVER_ABS,
- GNUNET_TIME_UNIT_FOREVER_REL, &put_finished, NULL);
+ GNUNET_DHT_put (peer1dht, &key, 1, GNUNET_DHT_RO_RECORD_ROUTE,
+ GNUNET_BLOCK_TYPE_TEST, sizeof (data), data,
+ GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL,
+ &put_finished, NULL);
}
/**