summaryrefslogtreecommitdiff
path: root/src/transport/test_transport_blacklisting.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
commit29e6158507a0758192075ac6ece7ba8e75ddc49a (patch)
treeb91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/transport/test_transport_blacklisting.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/transport/test_transport_blacklisting.c')
-rw-r--r--src/transport/test_transport_blacklisting.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/transport/test_transport_blacklisting.c b/src/transport/test_transport_blacklisting.c
index 8ac198cfe..6cb598f2f 100644
--- a/src/transport/test_transport_blacklisting.c
+++ b/src/transport/test_transport_blacklisting.c
@@ -85,11 +85,13 @@ static struct GNUNET_SCHEDULER_Task * stage_task;
#define OKPP do { ok++; } while (0)
#endif
+
static void
-run_stage(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+run_stage(void *cls);
+
static void
-end(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end (void *cls)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping\n");
@@ -129,8 +131,9 @@ end(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
}
}
+
static void
-end_badly(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_badly (void *cls)
{
die_task = NULL;
@@ -172,17 +175,20 @@ testing_connect_cb(struct PeerContext *p1, struct PeerContext *p2, void *cls)
stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL );
}
+
static void
-connect_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+connect_timeout(void *cls)
{
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peers not connected, next stage\n");
timeout_task = NULL;
- stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL );
+ stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL);
}
+
static int started;
-void
+
+static void
start_cb(struct PeerContext *p, void *cls)
{
@@ -243,8 +249,9 @@ static int check_blacklist_config (char *cfg_file,
return GNUNET_OK;
}
+
static void
-run_stage(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+run_stage (void *cls)
{
stage_task = NULL;
if (NULL != die_task)