aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-10-02 14:17:48 +0000
committerChristian Grothoff <christian@grothoff.org>2010-10-02 14:17:48 +0000
commit64b0a6f17bff78a41bcdf0a7832a5c3e3e4a29e4 (patch)
tree270d0bd493ee0ef9ae580d07a40c70537b0edb35
parent399847d7a28ab59d8ca4e8600b0cdc7781892bbe (diff)
downloadgnunet-64b0a6f17bff78a41bcdf0a7832a5c3e3e4a29e4.tar.gz
gnunet-64b0a6f17bff78a41bcdf0a7832a5c3e3e4a29e4.zip
making all tests compile
-rw-r--r--src/dht/test_dht_multipeer.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index 288cf76b6..60b2de6f2 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -391,7 +391,9 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
391void get_result_iterator (void *cls, 391void get_result_iterator (void *cls,
392 struct GNUNET_TIME_Absolute exp, 392 struct GNUNET_TIME_Absolute exp,
393 const GNUNET_HashCode * key, 393 const GNUNET_HashCode * key,
394 uint32_t type, 394 const struct GNUNET_PeerIdentity * const *get_path,
395 const struct GNUNET_PeerIdentity * const *put_path,
396 enum GNUNET_BLOCK_Type type,
395 uint32_t size, 397 uint32_t size,
396 const void *data) 398 const void *data)
397{ 399{
@@ -420,16 +422,6 @@ void get_result_iterator (void *cls,
420 GNUNET_SCHEDULER_add_continuation(sched, &get_stop_task, test_get, GNUNET_SCHEDULER_REASON_PREREQ_DONE); 422 GNUNET_SCHEDULER_add_continuation(sched, &get_stop_task, test_get, GNUNET_SCHEDULER_REASON_PREREQ_DONE);
421} 423}
422 424
423/**
424 * Continuation telling us GET request was sent.
425 */
426static void
427get_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
428{
429 // Is there something to be done here?
430 if (tc->reason != GNUNET_SCHEDULER_REASON_PREREQ_DONE)
431 return;
432}
433 425
434/** 426/**
435 * Set up some data, and call API PUT function 427 * Set up some data, and call API PUT function
@@ -457,12 +449,13 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
457 GNUNET_assert(test_get->dht_handle != NULL); 449 GNUNET_assert(test_get->dht_handle != NULL);
458 outstanding_gets++; 450 outstanding_gets++;
459 test_get->get_handle = GNUNET_DHT_get_start(test_get->dht_handle, 451 test_get->get_handle = GNUNET_DHT_get_start(test_get->dht_handle,
460 GNUNET_TIME_relative_get_forever(), 452 GNUNET_TIME_UNIT_FOREVER_REL,
461 1, 453 1 /* FIXME: use real type */,
462 &key, 454 &key,
455 GNUNET_DHT_RO_NONE,
456 NULL, 0,
457 NULL, 0,
463 &get_result_iterator, 458 &get_result_iterator,
464 test_get,
465 &get_continuation,
466 test_get); 459 test_get);
467#if VERBOSE 460#if VERBOSE
468 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting get for uid %u from peer %s\n", 461 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting get for uid %u from peer %s\n",
@@ -527,10 +520,11 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
527 outstanding_puts++; 520 outstanding_puts++;
528 GNUNET_DHT_put(test_put->dht_handle, 521 GNUNET_DHT_put(test_put->dht_handle,
529 &key, 522 &key,
530 1, 523 GNUNET_DHT_RO_NONE,
524 1 /* FIXME: use real type */,
531 sizeof(data), data, 525 sizeof(data), data,
532 GNUNET_TIME_absolute_get_forever(), 526 GNUNET_TIME_UNIT_FOREVER_ABS,
533 GNUNET_TIME_relative_get_forever(), 527 GNUNET_TIME_UNIT_FOREVER_REL,
534 &put_finished, test_put); 528 &put_finished, test_put);
535 test_put->disconnect_task = GNUNET_SCHEDULER_add_delayed(sched, GNUNET_TIME_relative_get_forever(), &put_disconnect_task, test_put); 529 test_put->disconnect_task = GNUNET_SCHEDULER_add_delayed(sched, GNUNET_TIME_relative_get_forever(), &put_disconnect_task, test_put);
536 GNUNET_SCHEDULER_add_now(sched, &do_put, test_put->next); 530 GNUNET_SCHEDULER_add_now(sched, &do_put, test_put->next);