aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_bidirectional_connect.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_bidirectional_connect.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_bidirectional_connect.c')
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index 30de6b7ba..1e00e982d 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -95,7 +95,7 @@ end ()
95 95
96 96
97static void 97static void
98end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 98end_badly (void *cls)
99{ 99{
100 die_task = NULL; 100 die_task = NULL;
101 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); 101 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n");
@@ -208,10 +208,12 @@ notify_ready (void *cls, size_t size, void *buf)
208 208
209 209
210static void 210static void
211sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 211sendtask (void *cls)
212{ 212{
213 send_task = NULL; 213 const struct GNUNET_SCHEDULER_TaskContext *tc;
214 214
215 send_task = NULL;
216 tc = GNUNET_SCHEDULER_get_task_context ();
215 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 217 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
216 return; 218 return;
217 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); 219 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));