aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_restart_1peer.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_api_restart_1peer.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
downloadgnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz
gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip
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_api_restart_1peer.c')
-rw-r--r--src/transport/test_transport_api_restart_1peer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c
index f51b70e92..adec15f4f 100644
--- a/src/transport/test_transport_api_restart_1peer.c
+++ b/src/transport/test_transport_api_restart_1peer.c
@@ -112,8 +112,7 @@ end ()
112 112
113 113
114static void 114static void
115end_badly (void *cls, 115end_badly (void *cls)
116 const struct GNUNET_SCHEDULER_TaskContext *tc)
117{ 116{
118 die_task = NULL; 117 die_task = NULL;
119 118
@@ -259,10 +258,12 @@ notify_ready (void *cls, size_t size, void *buf)
259 258
260 259
261static void 260static void
262sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 261sendtask (void *cls)
263{ 262{
264 send_task = NULL; 263 const struct GNUNET_SCHEDULER_TaskContext *tc;
265 264
265 send_task = NULL;
266 tc = GNUNET_SCHEDULER_get_task_context ();
266 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 267 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
267 return; 268 return;
268 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); 269 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));