aboutsummaryrefslogtreecommitdiff
path: root/src/rps/test_rps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/test_rps.c')
-rw-r--r--src/rps/test_rps.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index 63eb8417a..aca58d55e 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -430,7 +430,7 @@ tofile_ (const char *file_name, char *line)
430 430
431 431
432/** 432/**
433 * Write the ids and their according index in the given array to a file 433 * Write the ids and their according index in the given array to a file
434 * Unused 434 * Unused
435 */ 435 */
436/* static void 436/* static void
@@ -493,7 +493,7 @@ make_oplist_entry ()
493 * Task run on timeout to shut everything down. 493 * Task run on timeout to shut everything down.
494 */ 494 */
495static void 495static void
496shutdown_op (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 496shutdown_op (void *cls)
497{ 497{
498 unsigned int i; 498 unsigned int i;
499 499
@@ -513,11 +513,11 @@ shutdown_op (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
513/** 513/**
514 * Seed peers. 514 * Seed peers.
515 */ 515 */
516 void 516static void
517seed_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 517seed_peers (void *cls)
518{ 518{
519 struct RPSPeer *peer = cls;
519 unsigned int amount; 520 unsigned int amount;
520 struct RPSPeer *peer = (struct RPSPeer *) cls;
521 unsigned int i; 521 unsigned int i;
522 522
523 // TODO if malicious don't seed mal peers 523 // TODO if malicious don't seed mal peers
@@ -532,13 +532,14 @@ seed_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
532 GNUNET_RPS_seed_ids (peer->rps_handle, amount, rps_peer_ids); 532 GNUNET_RPS_seed_ids (peer->rps_handle, amount, rps_peer_ids);
533} 533}
534 534
535
535/** 536/**
536 * Seed peers. 537 * Seed peers.
537 */ 538 */
538 void 539static void
539seed_peers_big (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 540seed_peers_big (void *cls)
540{ 541{
541 struct RPSPeer *peer = (struct RPSPeer *) cls; 542 struct RPSPeer *peer = cls;
542 unsigned int seed_msg_size; 543 unsigned int seed_msg_size;
543 uint32_t num_peers_max; 544 uint32_t num_peers_max;
544 unsigned int amount; 545 unsigned int amount;
@@ -740,7 +741,7 @@ default_reply_handle (void *cls,
740 "[%s] got %" PRIu64 " peers:\n", 741 "[%s] got %" PRIu64 " peers:\n",
741 GNUNET_i2s (rps_peer->peer_id), 742 GNUNET_i2s (rps_peer->peer_id),
742 n); 743 n);
743 744
744 for (i = 0; i < n; i++) 745 for (i = 0; i < n; i++)
745 { 746 {
746 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 747 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -762,11 +763,10 @@ default_reply_handle (void *cls,
762 * Request random peers. 763 * Request random peers.
763 */ 764 */
764static void 765static void
765request_peers (void *cls, 766request_peers (void *cls)
766 const struct GNUNET_SCHEDULER_TaskContext *tc)
767{ 767{
768 struct PendingRequest *pending_req = cls;
768 struct RPSPeer *rps_peer; 769 struct RPSPeer *rps_peer;
769 struct PendingRequest *pending_req = (struct PendingRequest *) cls;
770 struct PendingReply *pending_rep; 770 struct PendingReply *pending_rep;
771 771
772 if (GNUNET_YES == in_shutdown) 772 if (GNUNET_YES == in_shutdown)
@@ -827,11 +827,10 @@ cancel_request (struct PendingReply *pending_rep)
827 * Cancel a request. 827 * Cancel a request.
828 */ 828 */
829static void 829static void
830cancel_request_cb (void *cls, 830cancel_request_cb (void *cls)
831 const struct GNUNET_SCHEDULER_TaskContext *tc)
832{ 831{
832 struct RPSPeer *rps_peer = cls;
833 struct PendingReply *pending_rep; 833 struct PendingReply *pending_rep;
834 struct RPSPeer *rps_peer = (struct RPSPeer *) cls;
835 834
836 if (GNUNET_YES == in_shutdown) 835 if (GNUNET_YES == in_shutdown)
837 return; 836 return;
@@ -1137,8 +1136,9 @@ manage_service_wrapper (unsigned int i, unsigned int j, int delta,
1137 } 1136 }
1138} 1137}
1139 1138
1139
1140static void 1140static void
1141churn (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 1141churn (void *cls)
1142{ 1142{
1143 unsigned int i; 1143 unsigned int i;
1144 unsigned int j; 1144 unsigned int j;