diff options
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/test_dht_twopeer.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c index 3a7957a3c..a3b6e4a54 100644 --- a/src/dht/test_dht_twopeer.c +++ b/src/dht/test_dht_twopeer.c | |||
@@ -227,11 +227,7 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
227 | { | 227 | { |
228 | struct PeerGetContext *get_context = cls; | 228 | struct PeerGetContext *get_context = cls; |
229 | 229 | ||
230 | if (get_context->get_attempts < MAX_GET_ATTEMPTS) | 230 | if (get_context->get_attempts >= MAX_GET_ATTEMPTS) |
231 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
232 | "Get attempt %u failed, retrying request!\n", | ||
233 | get_context->get_attempts); | ||
234 | else | ||
235 | { | 231 | { |
236 | FPRINTF (stderr, "%s", "?\n"); | 232 | FPRINTF (stderr, "%s", "?\n"); |
237 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 233 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -243,11 +239,14 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
243 | "GET attempt failed, ending test!\n"); | 239 | "GET attempt failed, ending test!\n"); |
244 | return; | 240 | return; |
245 | } | 241 | } |
242 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
243 | "Get attempt %u failed, retrying request!\n", | ||
244 | get_context->get_attempts); | ||
246 | FPRINTF (stderr, "%s", "."); | 245 | FPRINTF (stderr, "%s", "."); |
247 | get_context->get_attempts++; | 246 | get_context->get_attempts++; |
248 | get_context->retry_task = | 247 | get_context->retry_task = |
249 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 248 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
250 | (GNUNET_TIME_UNIT_SECONDS, 10), | 249 | (GNUNET_TIME_UNIT_SECONDS, 60), |
251 | &stop_retry_get, get_context); | 250 | &stop_retry_get, get_context); |
252 | get_context->get_handle = | 251 | get_context->get_handle = |
253 | GNUNET_DHT_get_start (get_context->dht_handle, | 252 | GNUNET_DHT_get_start (get_context->dht_handle, |
@@ -311,17 +310,15 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
311 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 310 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
312 | "connected peer %s to peer %s, distance %u\n", | 311 | "connected peer %s to peer %s, distance %u\n", |
313 | first_daemon->shortname, second_daemon->shortname, distance); | 312 | first_daemon->shortname, second_daemon->shortname, distance); |
314 | #endif | ||
315 | } | 313 | } |
316 | #if VERBOSE | ||
317 | else | 314 | else |
318 | { | 315 | { |
319 | failed_connections++; | 316 | failed_connections++; |
320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 317 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
321 | "Failed to connect peer %s to peer %s with error :\n%s\n", | 318 | "Failed to connect peer %s to peer %s with error :\n%s\n", |
322 | first_daemon->shortname, second_daemon->shortname, emsg); | 319 | first_daemon->shortname, second_daemon->shortname, emsg); |
323 | } | ||
324 | #endif | 320 | #endif |
321 | } | ||
325 | 322 | ||
326 | if (total_connections == expected_connections) | 323 | if (total_connections == expected_connections) |
327 | { | 324 | { |