diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-27 12:20:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-27 12:20:31 +0000 |
commit | 6549574748c9583f86fc35dbb47d7709cafe671d (patch) | |
tree | f2b714ca6969633fa1f50a76614a5655dead19bf /src/dht/dht_test_lib.c | |
parent | d3834ca8024608b1dc7df467405d8a6ed31e8c05 (diff) | |
download | gnunet-6549574748c9583f86fc35dbb47d7709cafe671d.tar.gz gnunet-6549574748c9583f86fc35dbb47d7709cafe671d.zip |
-misc fixes to DHT tests
Diffstat (limited to 'src/dht/dht_test_lib.c')
-rw-r--r-- | src/dht/dht_test_lib.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dht/dht_test_lib.c b/src/dht/dht_test_lib.c index a395ce58b..4c1bd3057 100644 --- a/src/dht/dht_test_lib.c +++ b/src/dht/dht_test_lib.c | |||
@@ -118,7 +118,8 @@ dht_connect_cb (void *cls, | |||
118 | 118 | ||
119 | if (NULL != emsg) | 119 | if (NULL != emsg) |
120 | { | 120 | { |
121 | fprintf (stderr, "Failed to connect to DHT service: %s\n", | 121 | fprintf (stderr, |
122 | "Failed to connect to DHT service: %s\n", | ||
122 | emsg); | 123 | emsg); |
123 | GNUNET_SCHEDULER_shutdown (); | 124 | GNUNET_SCHEDULER_shutdown (); |
124 | return; | 125 | return; |
@@ -134,7 +135,7 @@ dht_connect_cb (void *cls, | |||
134 | ctx, | 135 | ctx, |
135 | ctx->num_peers, | 136 | ctx->num_peers, |
136 | ctx->peers, | 137 | ctx->peers, |
137 | ctx->dhts); | 138 | ctx->dhts); |
138 | } | 139 | } |
139 | 140 | ||
140 | 141 | ||
@@ -203,8 +204,10 @@ GNUNET_DHT_TEST_run (const char *testname, | |||
203 | 204 | ||
204 | ctx = GNUNET_new (struct GNUNET_DHT_TEST_Context); | 205 | ctx = GNUNET_new (struct GNUNET_DHT_TEST_Context); |
205 | ctx->num_peers = num_peers; | 206 | ctx->num_peers = num_peers; |
206 | ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *)); | 207 | ctx->ops = GNUNET_new_array (num_peers, |
207 | ctx->dhts = GNUNET_malloc (num_peers * sizeof (struct GNUNET_DHT_Handle *)); | 208 | struct GNUNET_TESTBED_Operation *); |
209 | ctx->dhts = GNUNET_new_array (num_peers, | ||
210 | struct GNUNET_DHT_Handle *); | ||
208 | ctx->app_main = tmain; | 211 | ctx->app_main = tmain; |
209 | ctx->app_main_cls = tmain_cls; | 212 | ctx->app_main_cls = tmain_cls; |
210 | (void) GNUNET_TESTBED_test_run (testname, | 213 | (void) GNUNET_TESTBED_test_run (testname, |