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/arm/test_exponential_backoff.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/arm/test_exponential_backoff.c')
-rw-r--r-- | src/arm/test_exponential_backoff.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index 44493c6de..1032a9010 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -141,11 +141,9 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
141 | * Shutting down took too long, cancel receive and return error. | 141 | * Shutting down took too long, cancel receive and return error. |
142 | * | 142 | * |
143 | * @param cls closure | 143 | * @param cls closure |
144 | * @param tc context information (why was this task triggered now) | ||
145 | */ | 144 | */ |
146 | static void | 145 | static void |
147 | service_shutdown_cancel (void *cls, | 146 | service_shutdown_cancel (void *cls) |
148 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
149 | { | 147 | { |
150 | struct ShutdownContext *shutdown_ctx = cls; | 148 | struct ShutdownContext *shutdown_ctx = cls; |
151 | 149 | ||
@@ -227,7 +225,7 @@ do_nothing_service_shutdown (struct GNUNET_CLIENT_Connection *sock, | |||
227 | 225 | ||
228 | 226 | ||
229 | static void | 227 | static void |
230 | kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc); | 228 | kill_task (void *cbData); |
231 | 229 | ||
232 | 230 | ||
233 | static void | 231 | static void |
@@ -246,7 +244,7 @@ shutdown_cont (void *cls, int reason) | |||
246 | 244 | ||
247 | 245 | ||
248 | static void | 246 | static void |
249 | kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc) | 247 | kill_task (void *cbData) |
250 | { | 248 | { |
251 | static struct GNUNET_CLIENT_Connection *doNothingConnection = NULL; | 249 | static struct GNUNET_CLIENT_Connection *doNothingConnection = NULL; |
252 | 250 | ||
@@ -284,7 +282,7 @@ kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
284 | 282 | ||
285 | 283 | ||
286 | static void | 284 | static void |
287 | trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 285 | trigger_disconnect (void *cls) |
288 | { | 286 | { |
289 | GNUNET_ARM_disconnect_and_free (arm); | 287 | GNUNET_ARM_disconnect_and_free (arm); |
290 | GNUNET_ARM_monitor_disconnect_and_free (mon); | 288 | GNUNET_ARM_monitor_disconnect_and_free (mon); |