aboutsummaryrefslogtreecommitdiff
path: root/src/dht/test_dht_twopeer_get_put.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/test_dht_twopeer_get_put.c')
-rw-r--r--src/dht/test_dht_twopeer_get_put.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/dht/test_dht_twopeer_get_put.c b/src/dht/test_dht_twopeer_get_put.c
index 0bb9fac..3271d04 100644
--- a/src/dht/test_dht_twopeer_get_put.c
+++ b/src/dht/test_dht_twopeer_get_put.c
@@ -272,7 +272,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
#endif
global_get_handle =
- GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (),
+ GNUNET_DHT_get_start (peer2dht,
#if DNS
GNUNET_BLOCK_TYPE_DNS,
#else
@@ -289,7 +289,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* 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_SCHEDULER_cancel (die_task);
die_task =
@@ -391,29 +391,23 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
if (emsg == NULL)
{
total_connections++;
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"connected peer %s to peer %s, distance %u\n",
first_daemon->shortname, second_daemon->shortname, distance);
-#endif
}
-#if VERBOSE
else
{
failed_connections++;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed to connect peer %s to peer %s with error :\n%s\n",
first_daemon->shortname, second_daemon->shortname, emsg);
}
-#endif
if (total_connections == expected_connections)
{
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Created %d total connections, which is our target number! Starting next phase of testing.\n",
total_connections);
-#endif
GNUNET_SCHEDULER_cancel (die_task);
die_task =
GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, "from test gets");
@@ -482,10 +476,8 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
if (peers_left == 0) /* Indicates all peers started */
{
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"All %d daemons started, now connecting peers!\n", num_peers);
-#endif
expected_connections = -1;
if ((pg != NULL)) /* Sanity check */
{
@@ -556,9 +548,6 @@ check ()
char *const argv[] = { "test-dht-twopeer-get-put", /* Name to give running binary */
"-c",
"test_dht_twopeer_data.conf", /* Config file to use */
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -583,11 +572,7 @@ main (int argc, char *argv[])
int ret;
GNUNET_log_setup ("test-dht-twopeer",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
ret = check ();
/**