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/set/test_set_api.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/set/test_set_api.c')
-rw-r--r-- | src/set/test_set_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/set/test_set_api.c b/src/set/test_set_api.c index fbb303257..b5c21f8a3 100644 --- a/src/set/test_set_api.c +++ b/src/set/test_set_api.c | |||
@@ -246,12 +246,13 @@ test_iter () | |||
246 | * Signature of the main function of a task. | 246 | * Signature of the main function of a task. |
247 | * | 247 | * |
248 | * @param cls closure | 248 | * @param cls closure |
249 | * @param tc context information (why was this task triggered now) | ||
250 | */ | 249 | */ |
251 | static void | 250 | static void |
252 | timeout_fail (void *cls, | 251 | timeout_fail (void *cls) |
253 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
254 | { | 252 | { |
253 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
254 | |||
255 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
255 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 256 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
256 | return; | 257 | return; |
257 | GNUNET_SCHEDULER_shutdown (); | 258 | GNUNET_SCHEDULER_shutdown (); |
@@ -316,4 +317,3 @@ main (int argc, char **argv) | |||
316 | } | 317 | } |
317 | return ret; | 318 | return ret; |
318 | } | 319 | } |
319 | |||