diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-27 21:11:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-27 21:11:28 +0000 |
commit | a1d613b1e775afb6020db47af7ffa3b3915d6c91 (patch) | |
tree | f39eac5b39f3113e514051213653a22cedbb0307 /src/dht/test_dht_multipeer.c | |
parent | a9c2c9e208c23b3923744e854aa7aa32355b1bb1 (diff) | |
download | gnunet-a1d613b1e775afb6020db47af7ffa3b3915d6c91.tar.gz gnunet-a1d613b1e775afb6020db47af7ffa3b3915d6c91.zip |
make compile
Diffstat (limited to 'src/dht/test_dht_multipeer.c')
-rw-r--r-- | src/dht/test_dht_multipeer.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 5d9adeb56..acc9b1652 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c | |||
@@ -397,8 +397,10 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
397 | static void | 397 | static void |
398 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | 398 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, |
399 | const GNUNET_HashCode * key, | 399 | const GNUNET_HashCode * key, |
400 | const struct GNUNET_PeerIdentity *const *get_path, | 400 | const struct GNUNET_PeerIdentity *get_path, |
401 | const struct GNUNET_PeerIdentity *const *put_path, | 401 | unsigned int get_path_length, |
402 | const struct GNUNET_PeerIdentity *put_path, | ||
403 | unsigned int put_path_length, | ||
402 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | 404 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) |
403 | { | 405 | { |
404 | struct TestGetContext *test_get = cls; | 406 | struct TestGetContext *test_get = cls; |
@@ -416,15 +418,15 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
416 | if (put_path != NULL) | 418 | if (put_path != NULL) |
417 | { | 419 | { |
418 | fprintf (stderr, "PUT Path: "); | 420 | fprintf (stderr, "PUT Path: "); |
419 | for (i = 0; put_path[i] != NULL; i++) | 421 | for (i = 0; i<put_path_length; i++) |
420 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (put_path[i])); | 422 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); |
421 | fprintf (stderr, "\n"); | 423 | fprintf (stderr, "\n"); |
422 | } | 424 | } |
423 | if (get_path != NULL) | 425 | if (get_path != NULL) |
424 | { | 426 | { |
425 | fprintf (stderr, "GET Path: "); | 427 | fprintf (stderr, "GET Path: "); |
426 | for (i = 0; get_path[i] != NULL; i++) | 428 | for (i = 0; i < get_path_length; i++) |
427 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (get_path[i])); | 429 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); |
428 | fprintf (stderr, "\n"); | 430 | fprintf (stderr, "\n"); |
429 | } | 431 | } |
430 | #endif | 432 | #endif |
@@ -476,8 +478,8 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
476 | test_get->get_handle = | 478 | test_get->get_handle = |
477 | GNUNET_DHT_get_start (test_get->dht_handle, GNUNET_TIME_UNIT_FOREVER_REL, | 479 | GNUNET_DHT_get_start (test_get->dht_handle, GNUNET_TIME_UNIT_FOREVER_REL, |
478 | GNUNET_BLOCK_TYPE_TEST, &key, | 480 | GNUNET_BLOCK_TYPE_TEST, &key, |
479 | DEFAULT_GET_REPLICATION, route_option, NULL, 0, | 481 | 1, route_option, NULL, 0, |
480 | NULL, 0, &get_result_iterator, test_get); | 482 | &get_result_iterator, test_get); |
481 | #if VERBOSE | 483 | #if VERBOSE |
482 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting get for uid %u from peer %s\n", | 484 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting get for uid %u from peer %s\n", |
483 | test_get->uid, test_get->daemon->shortname); | 485 | test_get->uid, test_get->daemon->shortname); |
@@ -542,7 +544,7 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
542 | 544 | ||
543 | GNUNET_assert (test_put->dht_handle != NULL); | 545 | GNUNET_assert (test_put->dht_handle != NULL); |
544 | outstanding_puts++; | 546 | outstanding_puts++; |
545 | GNUNET_DHT_put (test_put->dht_handle, &key, DEFAULT_PUT_REPLICATION, | 547 | GNUNET_DHT_put (test_put->dht_handle, &key, 1, |
546 | route_option, GNUNET_BLOCK_TYPE_TEST, sizeof (data), data, | 548 | route_option, GNUNET_BLOCK_TYPE_TEST, sizeof (data), data, |
547 | GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL, | 549 | GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL, |
548 | &put_finished, test_put); | 550 | &put_finished, test_put); |