diff options
Diffstat (limited to 'src/dht/test_dht_twopeer.c')
-rw-r--r-- | src/dht/test_dht_twopeer.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c index 8947739c4..04198b48b 100644 --- a/src/dht/test_dht_twopeer.c +++ b/src/dht/test_dht_twopeer.c | |||
@@ -138,9 +138,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
138 | { | 138 | { |
139 | const char *emsg = cls; | 139 | const char *emsg = cls; |
140 | 140 | ||
141 | fprintf (stderr, | 141 | fprintf (stderr, "Error: %s\n", emsg); |
142 | "Error: %s\n", | ||
143 | emsg); | ||
144 | if (curr_get_ctx.retry_task != GNUNET_SCHEDULER_NO_TASK) | 142 | if (curr_get_ctx.retry_task != GNUNET_SCHEDULER_NO_TASK) |
145 | { | 143 | { |
146 | GNUNET_SCHEDULER_cancel (curr_get_ctx.retry_task); | 144 | GNUNET_SCHEDULER_cancel (curr_get_ctx.retry_task); |
@@ -175,10 +173,10 @@ static void | |||
175 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | 173 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, |
176 | const GNUNET_HashCode * key, | 174 | const GNUNET_HashCode * key, |
177 | const struct GNUNET_PeerIdentity *get_path, | 175 | const struct GNUNET_PeerIdentity *get_path, |
178 | unsigned int get_path_length, | 176 | unsigned int get_path_length, |
179 | const struct GNUNET_PeerIdentity *put_path, | 177 | const struct GNUNET_PeerIdentity *put_path, |
180 | unsigned int put_path_length, | 178 | unsigned int put_path_length, enum GNUNET_BLOCK_Type type, |
181 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | 179 | size_t size, const void *data) |
182 | { | 180 | { |
183 | struct PeerGetContext *get_context = cls; | 181 | struct PeerGetContext *get_context = cls; |
184 | 182 | ||
@@ -257,9 +255,9 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
257 | GNUNET_TIME_relative_multiply | 255 | GNUNET_TIME_relative_multiply |
258 | (GNUNET_TIME_UNIT_SECONDS, 5), | 256 | (GNUNET_TIME_UNIT_SECONDS, 5), |
259 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 257 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
260 | &get_context->peer->hashPubKey, | 258 | &get_context->peer->hashPubKey, 1, |
261 | 1, GNUNET_DHT_RO_NONE, NULL, | 259 | GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator, |
262 | 0, &get_result_iterator, get_context); | 260 | get_context); |
263 | } | 261 | } |
264 | 262 | ||
265 | 263 | ||
@@ -292,9 +290,9 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
292 | GNUNET_TIME_relative_multiply | 290 | GNUNET_TIME_relative_multiply |
293 | (GNUNET_TIME_UNIT_SECONDS, 5), | 291 | (GNUNET_TIME_UNIT_SECONDS, 5), |
294 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 292 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
295 | &get_context->peer->hashPubKey, | 293 | &get_context->peer->hashPubKey, 1, |
296 | 1, GNUNET_DHT_RO_FIND_PEER, NULL, | 294 | GNUNET_DHT_RO_FIND_PEER, NULL, 0, |
297 | 0, &get_result_iterator, get_context); | 295 | &get_result_iterator, get_context); |
298 | } | 296 | } |
299 | 297 | ||
300 | 298 | ||
@@ -335,8 +333,8 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
335 | #endif | 333 | #endif |
336 | GNUNET_SCHEDULER_cancel (die_task); | 334 | GNUNET_SCHEDULER_cancel (die_task); |
337 | die_task = | 335 | die_task = |
338 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 336 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, |
339 | &end_badly, "Timeout trying to GET"); | 337 | "Timeout trying to GET"); |
340 | 338 | ||
341 | curr_get_ctx.dht_handle = peer1dht; | 339 | curr_get_ctx.dht_handle = peer1dht; |
342 | curr_get_ctx.peer = &peer2id; | 340 | curr_get_ctx.peer = &peer2id; |
@@ -383,9 +381,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
383 | { | 381 | { |
384 | if (emsg != NULL) | 382 | if (emsg != NULL) |
385 | { | 383 | { |
386 | fprintf (stderr, | 384 | fprintf (stderr, "Failed to start daemon: `%s'\n", emsg); |
387 | "Failed to start daemon: `%s'\n", | ||
388 | emsg); | ||
389 | return; | 385 | return; |
390 | } | 386 | } |
391 | GNUNET_assert (id != NULL); | 387 | GNUNET_assert (id != NULL); |