diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-29 14:56:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-29 14:56:32 +0000 |
commit | bc6bbc70cd2b7ff0acd21609b44d71d07fd3e6e0 (patch) | |
tree | 72c0e830ce8d2547cb743ad7d0651c167aa300de /src/dht/test_dht_multipeer.c | |
parent | 5e5c036096ba38df995bc694734f553c8b12c41e (diff) | |
download | gnunet-bc6bbc70cd2b7ff0acd21609b44d71d07fd3e6e0.tar.gz gnunet-bc6bbc70cd2b7ff0acd21609b44d71d07fd3e6e0.zip |
better reporting
Diffstat (limited to 'src/dht/test_dht_multipeer.c')
-rw-r--r-- | src/dht/test_dht_multipeer.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 0cae62038..610740a4e 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c | |||
@@ -373,17 +373,20 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
373 | #if PATH_TRACKING | 373 | #if PATH_TRACKING |
374 | if (put_path != NULL) | 374 | if (put_path != NULL) |
375 | { | 375 | { |
376 | fprintf (stderr, "PUT Path: "); | 376 | fprintf (stderr, "PUT (%u) Path: ", |
377 | test_get->uid); | ||
377 | for (i = 0; i<put_path_length; i++) | 378 | for (i = 0; i<put_path_length; i++) |
378 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); | 379 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); |
379 | fprintf (stderr, "\n"); | 380 | fprintf (stderr, "\n"); |
380 | } | 381 | } |
381 | if (get_path != NULL) | 382 | if (get_path != NULL) |
382 | { | 383 | { |
383 | fprintf (stderr, "GET Path: "); | 384 | fprintf (stderr, "GET (%u) Path: ", |
385 | test_get->uid); | ||
384 | for (i = 0; i < get_path_length; i++) | 386 | for (i = 0; i < get_path_length; i++) |
385 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); | 387 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); |
386 | fprintf (stderr, "\n"); | 388 | fprintf (stderr, "->%s\n", |
389 | GNUNET_i2s (&test_get->daemon->id)); | ||
387 | } | 390 | } |
388 | #endif | 391 | #endif |
389 | 392 | ||
@@ -395,7 +398,6 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
395 | } | 398 | } |
396 | else | 399 | else |
397 | { | 400 | { |
398 | fprintf (stderr, "GET successful!\n"); | ||
399 | gets_completed++; | 401 | gets_completed++; |
400 | test_get->succeeded = GNUNET_YES; | 402 | test_get->succeeded = GNUNET_YES; |
401 | } | 403 | } |
@@ -500,6 +502,9 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
500 | 502 | ||
501 | GNUNET_assert (test_put->dht_handle != NULL); | 503 | GNUNET_assert (test_put->dht_handle != NULL); |
502 | outstanding_puts++; | 504 | outstanding_puts++; |
505 | fprintf (stderr, "PUT %u at `%s'\n", | ||
506 | test_put->uid, | ||
507 | GNUNET_i2s (&test_put->daemon->id)); | ||
503 | GNUNET_DHT_put (test_put->dht_handle, &key, 1, | 508 | GNUNET_DHT_put (test_put->dht_handle, &key, 1, |
504 | route_option, GNUNET_BLOCK_TYPE_TEST, sizeof (data), data, | 509 | route_option, GNUNET_BLOCK_TYPE_TEST, sizeof (data), data, |
505 | GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL, | 510 | GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL, |
@@ -524,7 +529,6 @@ run_dht_test (void *cls, const char *emsg) | |||
524 | { | 529 | { |
525 | unsigned long long i; | 530 | unsigned long long i; |
526 | unsigned long long j; | 531 | unsigned long long j; |
527 | uint32_t temp_daemon; | ||
528 | struct TestPutContext *test_put; | 532 | struct TestPutContext *test_put; |
529 | struct TestGetContext *test_get; | 533 | struct TestGetContext *test_get; |
530 | 534 | ||
@@ -568,8 +572,7 @@ run_dht_test (void *cls, const char *emsg) | |||
568 | { | 572 | { |
569 | test_get = GNUNET_malloc (sizeof (struct TestGetContext)); | 573 | test_get = GNUNET_malloc (sizeof (struct TestGetContext)); |
570 | test_get->uid = i; | 574 | test_get->uid = i; |
571 | temp_daemon = j; | 575 | test_get->daemon = GNUNET_TESTING_daemon_get (pg, j); |
572 | test_get->daemon = GNUNET_TESTING_daemon_get (pg, temp_daemon); | ||
573 | test_get->next = all_gets; | 576 | test_get->next = all_gets; |
574 | all_gets = test_get; | 577 | all_gets = test_get; |
575 | } | 578 | } |