diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
commit | 29e6158507a0758192075ac6ece7ba8e75ddc49a (patch) | |
tree | b91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/transport/test_transport_api_timeout.c | |
parent | 5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff) | |
download | gnunet-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_timeout.c')
-rw-r--r-- | src/transport/test_transport_api_timeout.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 256ce46a8..aa9884a2e 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c | |||
@@ -120,8 +120,9 @@ end () | |||
120 | GNUNET_TRANSPORT_TESTING_done (tth); | 120 | GNUNET_TRANSPORT_TESTING_done (tth); |
121 | } | 121 | } |
122 | 122 | ||
123 | |||
123 | static void | 124 | static void |
124 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 125 | end_badly (void *cls) |
125 | { | 126 | { |
126 | die_task = NULL; | 127 | die_task = NULL; |
127 | 128 | ||
@@ -181,12 +182,13 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
181 | 182 | ||
182 | 183 | ||
183 | static void | 184 | static void |
184 | timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 185 | timer (void *cls) |
185 | { | 186 | { |
186 | static int percentage; | 187 | static int percentage; |
188 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
187 | 189 | ||
188 | timer_task = NULL; | 190 | timer_task = NULL; |
189 | 191 | tc = GNUNET_SCHEDULER_get_task_context (); | |
190 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 192 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
191 | return; | 193 | return; |
192 | 194 | ||