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/core/test_core_quota_compliance.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/core/test_core_quota_compliance.c')
-rw-r--r-- | src/core/test_core_quota_compliance.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 02b9b3f3e..ed895df42 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -152,8 +152,7 @@ terminate_peer (struct PeerContext *p) | |||
152 | 152 | ||
153 | 153 | ||
154 | static void | 154 | static void |
155 | terminate_task (void *cls, | 155 | terminate_task (void *cls) |
156 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
157 | { | 156 | { |
158 | err_task = NULL; | 157 | err_task = NULL; |
159 | terminate_peer (&p1); | 158 | terminate_peer (&p1); |
@@ -162,11 +161,12 @@ terminate_task (void *cls, | |||
162 | 161 | ||
163 | 162 | ||
164 | static void | 163 | static void |
165 | terminate_task_error (void *cls, | 164 | terminate_task_error (void *cls) |
166 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
167 | { | 165 | { |
168 | err_task = NULL; | 166 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
169 | 167 | ||
168 | err_task = NULL; | ||
169 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
170 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 170 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
171 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 171 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
172 | "Testcase failed!\n"); | 172 | "Testcase failed!\n"); |
@@ -214,8 +214,7 @@ print_stat (void *cls, | |||
214 | 214 | ||
215 | 215 | ||
216 | static void | 216 | static void |
217 | measurement_stop (void *cls, | 217 | measurement_stop (void *cls) |
218 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
219 | { | 218 | { |
220 | unsigned long long delta; | 219 | unsigned long long delta; |
221 | unsigned long long throughput_out; | 220 | unsigned long long throughput_out; |