aboutsummaryrefslogtreecommitdiff
path: root/src/dht/test_dht_multipeer.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-18 05:34:34 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-18 05:34:34 +0000
commit45a6c8033e511e2d3dc3f20cb62248c77ee90725 (patch)
treec6ee2c18875b6bd4f950e463f04dcee3db8d2937 /src/dht/test_dht_multipeer.c
parent04630c5e40fc4de16393894d0b5ff2ca9055f4e2 (diff)
downloadgnunet-45a6c8033e511e2d3dc3f20cb62248c77ee90725.tar.gz
gnunet-45a6c8033e511e2d3dc3f20cb62248c77ee90725.zip
-code cleanup
Diffstat (limited to 'src/dht/test_dht_multipeer.c')
-rw-r--r--src/dht/test_dht_multipeer.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index a821b303c..9649405b1 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -27,9 +27,6 @@
27#include "gnunet_core_service.h" 27#include "gnunet_core_service.h"
28#include "gnunet_dht_service.h" 28#include "gnunet_dht_service.h"
29 29
30/* DEFINES */
31#define VERBOSE GNUNET_NO
32
33/* Timeout for entire testcase */ 30/* Timeout for entire testcase */
34#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 30) 31#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 30)
35 32
@@ -658,10 +655,9 @@ start_gets (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
658 unsigned long long j; 655 unsigned long long j;
659 struct TestGetContext *test_get; 656 struct TestGetContext *test_get;
660 657
661#if VERBOSE 658 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
662 FPRINTF (stderr, "Issuing %llu GETs\n", 659 "Issuing %llu GETs\n",
663 (unsigned long long) (num_peers * num_peers)); 660 (unsigned long long) (num_peers * num_peers));
664#endif
665 for (i = 0; i < num_peers; i++) 661 for (i = 0; i < num_peers; i++)
666 for (j = 0; j < num_peers; j++) 662 for (j = 0; j < num_peers; j++)
667 { 663 {
@@ -719,10 +715,9 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
719 test_put->dht_handle = GNUNET_DHT_connect (test_put->daemon->cfg, 10); 715 test_put->dht_handle = GNUNET_DHT_connect (test_put->daemon->cfg, 10);
720 GNUNET_assert (test_put->dht_handle != NULL); 716 GNUNET_assert (test_put->dht_handle != NULL);
721 outstanding_puts++; 717 outstanding_puts++;
722#if VERBOSE > 2 718 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
723 FPRINTF (stderr, "PUT %u at `%s'\n", test_put->uid, 719 "PUT %u at `%s'\n", test_put->uid,
724 GNUNET_i2s (&test_put->daemon->id)); 720 GNUNET_i2s (&test_put->daemon->id));
725#endif
726 GNUNET_DHT_put (test_put->dht_handle, &key, 1, route_option, 721 GNUNET_DHT_put (test_put->dht_handle, &key, 1, route_option,
727 GNUNET_BLOCK_TYPE_TEST, sizeof (data), data, 722 GNUNET_BLOCK_TYPE_TEST, sizeof (data), data,
728 GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL, 723 GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL,
@@ -822,9 +817,6 @@ check ()
822 char *const argv[] = { "test-dht-multipeer", /* Name to give running binary */ 817 char *const argv[] = { "test-dht-multipeer", /* Name to give running binary */
823 "-c", 818 "-c",
824 "test_dht_multipeer_data.conf", /* Config file to use */ 819 "test_dht_multipeer_data.conf", /* Config file to use */
825#if VERBOSE
826 "-L", "DEBUG",
827#endif
828 NULL 820 NULL
829 }; 821 };
830 struct GNUNET_GETOPT_CommandLineOption options[] = { 822 struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -848,13 +840,8 @@ main (int argc, char *argv[])
848{ 840{
849 int ret; 841 int ret;
850 842
851
852 GNUNET_log_setup ("test-dht-multipeer", 843 GNUNET_log_setup ("test-dht-multipeer",
853#if VERBOSE
854 "DEBUG",
855#else
856 "WARNING", 844 "WARNING",
857#endif
858 NULL); 845 NULL);
859 ret = check (); 846 ret = check ();
860 /** 847 /**