diff options
-rw-r--r-- | src/rps/test_rps.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 0268ff438..584d26c26 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c | |||
@@ -277,9 +277,12 @@ static struct GNUNET_SCHEDULER_Task *churn_task; | |||
277 | typedef void (*InitPeer) (struct RPSPeer *rps_peer); | 277 | typedef void (*InitPeer) (struct RPSPeer *rps_peer); |
278 | 278 | ||
279 | /** | 279 | /** |
280 | * Called directly after connecting to the service | 280 | * @brief Called directly after connecting to the service |
281 | * | ||
282 | * @param rps_peer Specific peer the function is called on | ||
283 | * @param h the handle to the rps service | ||
281 | */ | 284 | */ |
282 | typedef void (*PreTest) (void *cls, struct GNUNET_RPS_Handle *h); | 285 | typedef void (*PreTest) (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h); |
283 | 286 | ||
284 | /** | 287 | /** |
285 | * @brief Executes functions to test the api/service for a given peer | 288 | * @brief Executes functions to test the api/service for a given peer |
@@ -934,12 +937,20 @@ static void mal_init_peer (struct RPSPeer *rps_peer) | |||
934 | rps_peer->num_ids_to_request = 1; | 937 | rps_peer->num_ids_to_request = 1; |
935 | } | 938 | } |
936 | 939 | ||
940 | |||
941 | /** | ||
942 | * @brief Set peers to (non-)malicious before execution | ||
943 | * | ||
944 | * Of signature #PreTest | ||
945 | * | ||
946 | * @param rps_peer the peer to set (non-) malicious | ||
947 | * @param h the handle to the service | ||
948 | */ | ||
937 | static void | 949 | static void |
938 | mal_pre (void *cls, struct GNUNET_RPS_Handle *h) | 950 | mal_pre (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h) |
939 | { | 951 | { |
940 | #ifdef ENABLE_MALICIOUS | 952 | #ifdef ENABLE_MALICIOUS |
941 | uint32_t num_mal_peers; | 953 | uint32_t num_mal_peers; |
942 | struct RPSPeer *rps_peer = (struct RPSPeer *) cls; | ||
943 | 954 | ||
944 | GNUNET_assert ( (1 >= portion) && | 955 | GNUNET_assert ( (1 >= portion) && |
945 | (0 < portion) ); | 956 | (0 < portion) ); |