diff options
Diffstat (limited to 'src')
392 files changed, 1698 insertions, 2270 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 38fa42356..f38dd19d3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -13,14 +13,9 @@ endif | |||
13 | if HAVE_EXPERIMENTAL | 13 | if HAVE_EXPERIMENTAL |
14 | EXP_DIR = \ | 14 | EXP_DIR = \ |
15 | dv \ | 15 | dv \ |
16 | multicast \ | ||
17 | psycutil \ | ||
18 | psycstore \ | ||
19 | psyc \ | ||
20 | rps \ | 16 | rps \ |
21 | social \ | ||
22 | $(CONSENSUS) \ | 17 | $(CONSENSUS) \ |
23 | $(SECRETSHARING) | 18 | $(SECRETSHARING) |
24 | endif | 19 | endif |
25 | 20 | ||
26 | if HAVE_REST | 21 | if HAVE_REST |
@@ -105,6 +100,11 @@ SUBDIRS = \ | |||
105 | exit \ | 100 | exit \ |
106 | pt \ | 101 | pt \ |
107 | integration-tests \ | 102 | integration-tests \ |
103 | multicast \ | ||
104 | psycutil \ | ||
105 | psycstore \ | ||
106 | psyc \ | ||
107 | social \ | ||
108 | $(EXP_DIR) \ | 108 | $(EXP_DIR) \ |
109 | $(PROVIDER_DIR) | 109 | $(PROVIDER_DIR) |
110 | 110 | ||
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index 69569511f..c708f9150 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -205,10 +205,9 @@ trigger_next_request (struct GNUNET_ARM_Handle *h, int ignore_currently_down); | |||
205 | * Task scheduled to try to re-connect to arm. | 205 | * Task scheduled to try to re-connect to arm. |
206 | * | 206 | * |
207 | * @param cls the 'struct GNUNET_ARM_Handle' | 207 | * @param cls the 'struct GNUNET_ARM_Handle' |
208 | * @param tc task context | ||
209 | */ | 208 | */ |
210 | static void | 209 | static void |
211 | reconnect_arm_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 210 | reconnect_arm_task (void *cls) |
212 | { | 211 | { |
213 | struct GNUNET_ARM_Handle *h = cls; | 212 | struct GNUNET_ARM_Handle *h = cls; |
214 | 213 | ||
@@ -711,10 +710,9 @@ GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h) | |||
711 | * Message timed out. Remove it from the queue. | 710 | * Message timed out. Remove it from the queue. |
712 | * | 711 | * |
713 | * @param cls the message (struct ARMControlMessage *) | 712 | * @param cls the message (struct ARMControlMessage *) |
714 | * @param tc task context | ||
715 | */ | 713 | */ |
716 | static void | 714 | static void |
717 | control_message_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 715 | control_message_timeout (void *cls) |
718 | { | 716 | { |
719 | struct ARMControlMessage *cm = cls; | 717 | struct ARMControlMessage *cm = cls; |
720 | struct GNUNET_ARM_Message *arm_msg; | 718 | struct GNUNET_ARM_Message *arm_msg; |
diff --git a/src/arm/arm_monitor_api.c b/src/arm/arm_monitor_api.c index ea4caa866..19a2f4eb9 100644 --- a/src/arm/arm_monitor_api.c +++ b/src/arm/arm_monitor_api.c | |||
@@ -85,25 +85,29 @@ struct GNUNET_ARM_MonitorHandle | |||
85 | struct GNUNET_SCHEDULER_Task * init_timeout_task_id; | 85 | struct GNUNET_SCHEDULER_Task * init_timeout_task_id; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | |||
88 | static void | 89 | static void |
89 | monitor_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg); | 90 | monitor_notify_handler (void *cls, |
91 | const struct GNUNET_MessageHeader *msg); | ||
92 | |||
90 | 93 | ||
91 | static int | 94 | static int |
92 | reconnect_arm_monitor (struct GNUNET_ARM_MonitorHandle *h); | 95 | reconnect_arm_monitor (struct GNUNET_ARM_MonitorHandle *h); |
93 | 96 | ||
97 | |||
94 | /** | 98 | /** |
95 | * Task scheduled to try to re-connect to arm. | 99 | * Task scheduled to try to re-connect to arm. |
96 | * | 100 | * |
97 | * @param cls the 'struct GNUNET_ARM_MonitorHandle' | 101 | * @param cls the 'struct GNUNET_ARM_MonitorHandle' |
98 | * @param tc task context | ||
99 | */ | 102 | */ |
100 | static void | 103 | static void |
101 | reconnect_arm_monitor_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 104 | reconnect_arm_monitor_task (void *cls) |
102 | { | 105 | { |
103 | struct GNUNET_ARM_MonitorHandle *h = cls; | 106 | struct GNUNET_ARM_MonitorHandle *h = cls; |
104 | 107 | ||
105 | h->reconnect_task = NULL; | 108 | h->reconnect_task = NULL; |
106 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Connecting to ARM service for monitoring after delay\n"); | 109 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
110 | "Connecting to ARM service for monitoring after delay\n"); | ||
107 | reconnect_arm_monitor (h); | 111 | reconnect_arm_monitor (h); |
108 | } | 112 | } |
109 | 113 | ||
@@ -147,15 +151,14 @@ reconnect_arm_monitor_later (struct GNUNET_ARM_MonitorHandle *h) | |||
147 | * Init message timed out. Disconnect and try again. | 151 | * Init message timed out. Disconnect and try again. |
148 | * | 152 | * |
149 | * @param cls arm monitor handle | 153 | * @param cls arm monitor handle |
150 | * @param tc task context | ||
151 | */ | 154 | */ |
152 | static void | 155 | static void |
153 | init_timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 156 | init_timeout_task (void *cls) |
154 | { | 157 | { |
155 | struct GNUNET_ARM_MonitorHandle *h = cls; | 158 | struct GNUNET_ARM_MonitorHandle *h = cls; |
159 | |||
156 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 160 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
157 | "Init message timed out\n"); | 161 | "Init message timed out\n"); |
158 | |||
159 | h->init_timeout_task_id = NULL; | 162 | h->init_timeout_task_id = NULL; |
160 | reconnect_arm_monitor_later (h); | 163 | reconnect_arm_monitor_later (h); |
161 | } | 164 | } |
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 726365ede..af85372d8 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -179,10 +179,9 @@ delete_files () | |||
179 | * jobs that we've been asked to do in order. | 179 | * jobs that we've been asked to do in order. |
180 | * | 180 | * |
181 | * @param cls closure, unused | 181 | * @param cls closure, unused |
182 | * @param tc context, unused | ||
183 | */ | 182 | */ |
184 | static void | 183 | static void |
185 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 184 | shutdown_task (void *cls) |
186 | { | 185 | { |
187 | if (NULL != h) | 186 | if (NULL != h) |
188 | { | 187 | { |
@@ -269,10 +268,9 @@ ret_string (enum GNUNET_ARM_Result result) | |||
269 | * Main task that runs our various operations in order. | 268 | * Main task that runs our various operations in order. |
270 | * | 269 | * |
271 | * @param cls closure | 270 | * @param cls closure |
272 | * @param tc scheudler context | ||
273 | */ | 271 | */ |
274 | static void | 272 | static void |
275 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 273 | action_loop (void *cls); |
276 | 274 | ||
277 | 275 | ||
278 | /** | 276 | /** |
@@ -539,11 +537,13 @@ list_callback (void *cls, | |||
539 | * do, in order. | 537 | * do, in order. |
540 | * | 538 | * |
541 | * @param cls closure, unused | 539 | * @param cls closure, unused |
542 | * @param tc context, unused | ||
543 | */ | 540 | */ |
544 | static void | 541 | static void |
545 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 542 | action_loop (void *cls) |
546 | { | 543 | { |
544 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
545 | |||
546 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
547 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 547 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
548 | return; | 548 | return; |
549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n"); | 549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n"); |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index ea89b2989..28d448f75 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -630,16 +630,17 @@ find_service (const char *name) | |||
630 | * create the service in order to relay the incoming connection to it | 630 | * create the service in order to relay the incoming connection to it |
631 | * | 631 | * |
632 | * @param cls callback data, `struct ServiceListeningInfo` describing a listen socket | 632 | * @param cls callback data, `struct ServiceListeningInfo` describing a listen socket |
633 | * @param tc context | ||
634 | */ | 633 | */ |
635 | static void | 634 | static void |
636 | accept_connection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 635 | accept_connection (void *cls) |
637 | { | 636 | { |
638 | struct ServiceListeningInfo *sli = cls; | 637 | struct ServiceListeningInfo *sli = cls; |
639 | struct ServiceList *sl = sli->sl; | 638 | struct ServiceList *sl = sli->sl; |
639 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
640 | 640 | ||
641 | sli->accept_task = NULL; | 641 | sli->accept_task = NULL; |
642 | GNUNET_assert (GNUNET_NO == in_shutdown); | 642 | GNUNET_assert (GNUNET_NO == in_shutdown); |
643 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
643 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 644 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
644 | return; | 645 | return; |
645 | start_process (sl, NULL, 0); | 646 | start_process (sl, NULL, 0); |
@@ -845,11 +846,9 @@ handle_start (void *cls, | |||
845 | * Start a shutdown sequence. | 846 | * Start a shutdown sequence. |
846 | * | 847 | * |
847 | * @param cls closure (refers to service) | 848 | * @param cls closure (refers to service) |
848 | * @param tc task context | ||
849 | */ | 849 | */ |
850 | static void | 850 | static void |
851 | trigger_shutdown (void *cls, | 851 | trigger_shutdown (void *cls) |
852 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
853 | { | 852 | { |
854 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 853 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
855 | "Triggering shutdown\n"); | 854 | "Triggering shutdown\n"); |
@@ -1060,11 +1059,9 @@ list_count (struct ServiceList *running_head) | |||
1060 | * Task run for shutdown. | 1059 | * Task run for shutdown. |
1061 | * | 1060 | * |
1062 | * @param cls closure, NULL if we need to self-restart | 1061 | * @param cls closure, NULL if we need to self-restart |
1063 | * @param tc context | ||
1064 | */ | 1062 | */ |
1065 | static void | 1063 | static void |
1066 | shutdown_task (void *cls, | 1064 | shutdown_task (void *cls) |
1067 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1068 | { | 1065 | { |
1069 | struct ServiceList *pos; | 1066 | struct ServiceList *pos; |
1070 | struct ServiceList *nxt; | 1067 | struct ServiceList *nxt; |
@@ -1129,17 +1126,18 @@ shutdown_task (void *cls, | |||
1129 | * Task run whenever it is time to restart a child that died. | 1126 | * Task run whenever it is time to restart a child that died. |
1130 | * | 1127 | * |
1131 | * @param cls closure, always NULL | 1128 | * @param cls closure, always NULL |
1132 | * @param tc context | ||
1133 | */ | 1129 | */ |
1134 | static void | 1130 | static void |
1135 | delayed_restart_task (void *cls, | 1131 | delayed_restart_task (void *cls) |
1136 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1132 | |
1137 | { | 1133 | { |
1134 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1138 | struct ServiceList *sl; | 1135 | struct ServiceList *sl; |
1139 | struct GNUNET_TIME_Relative lowestRestartDelay; | 1136 | struct GNUNET_TIME_Relative lowestRestartDelay; |
1140 | struct ServiceListeningInfo *sli; | 1137 | struct ServiceListeningInfo *sli; |
1141 | 1138 | ||
1142 | child_restart_task = NULL; | 1139 | child_restart_task = NULL; |
1140 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1143 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1141 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1144 | return; | 1142 | return; |
1145 | GNUNET_assert (GNUNET_NO == in_shutdown); | 1143 | GNUNET_assert (GNUNET_NO == in_shutdown); |
@@ -1204,12 +1202,11 @@ delayed_restart_task (void *cls, | |||
1204 | * process died). | 1202 | * process died). |
1205 | * | 1203 | * |
1206 | * @param cls closure, NULL if we need to self-restart | 1204 | * @param cls closure, NULL if we need to self-restart |
1207 | * @param tc context | ||
1208 | */ | 1205 | */ |
1209 | static void | 1206 | static void |
1210 | maint_child_death (void *cls, | 1207 | maint_child_death (void *cls) |
1211 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1212 | { | 1208 | { |
1209 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1213 | struct ServiceList *pos; | 1210 | struct ServiceList *pos; |
1214 | struct ServiceList *next; | 1211 | struct ServiceList *next; |
1215 | struct ServiceListeningInfo *sli; | 1212 | struct ServiceListeningInfo *sli; |
@@ -1223,6 +1220,7 @@ maint_child_death (void *cls, | |||
1223 | 1220 | ||
1224 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); | 1221 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); |
1225 | child_death_task = NULL; | 1222 | child_death_task = NULL; |
1223 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1226 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 1224 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
1227 | { | 1225 | { |
1228 | /* shutdown scheduled us, ignore! */ | 1226 | /* shutdown scheduled us, ignore! */ |
diff --git a/src/arm/test_arm_api.c b/src/arm/test_arm_api.c index 2bdc0e941..149ec46c4 100644 --- a/src/arm/test_arm_api.c +++ b/src/arm/test_arm_api.c | |||
@@ -122,7 +122,7 @@ resolver_start_cb (void *cls, | |||
122 | 122 | ||
123 | 123 | ||
124 | static void | 124 | static void |
125 | trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 125 | trigger_disconnect (void *cls) |
126 | { | 126 | { |
127 | GNUNET_ARM_disconnect_and_free ((struct GNUNET_ARM_Handle *) cls); | 127 | GNUNET_ARM_disconnect_and_free ((struct GNUNET_ARM_Handle *) cls); |
128 | } | 128 | } |
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); |
diff --git a/src/arm/test_gnunet_service_arm.c b/src/arm/test_gnunet_service_arm.c index 7003271fa..33662e579 100644 --- a/src/arm/test_gnunet_service_arm.c +++ b/src/arm/test_gnunet_service_arm.c | |||
@@ -49,8 +49,7 @@ static struct GNUNET_ARM_Handle *arm; | |||
49 | 49 | ||
50 | 50 | ||
51 | static void | 51 | static void |
52 | trigger_disconnect (void *cls, | 52 | trigger_disconnect (void *cls) |
53 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
54 | { | 53 | { |
55 | GNUNET_ARM_disconnect_and_free (arm); | 54 | GNUNET_ARM_disconnect_and_free (arm); |
56 | arm = NULL; | 55 | arm = NULL; |
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c index a4a925847..b8da23df9 100644 --- a/src/ats-tests/ats-testing-experiment.c +++ b/src/ats-tests/ats-testing-experiment.c | |||
@@ -415,8 +415,9 @@ load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg) | |||
415 | return e_counter; | 415 | return e_counter; |
416 | } | 416 | } |
417 | 417 | ||
418 | |||
418 | static void | 419 | static void |
419 | timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 420 | timeout_experiment (void *cls) |
420 | { | 421 | { |
421 | struct Experiment *e = cls; | 422 | struct Experiment *e = cls; |
422 | e->experiment_timeout_task = NULL; | 423 | e->experiment_timeout_task = NULL; |
@@ -432,6 +433,7 @@ timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | |||
432 | GNUNET_SYSERR); | 433 | GNUNET_SYSERR); |
433 | } | 434 | } |
434 | 435 | ||
436 | |||
435 | static void | 437 | static void |
436 | enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) | 438 | enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) |
437 | { | 439 | { |
@@ -573,10 +575,12 @@ static void enforce_episode (struct Episode *ep) | |||
573 | } | 575 | } |
574 | } | 576 | } |
575 | 577 | ||
578 | |||
576 | static void | 579 | static void |
577 | timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 580 | timeout_episode (void *cls) |
578 | { | 581 | { |
579 | struct Experiment *e = cls; | 582 | struct Experiment *e = cls; |
583 | |||
580 | e->episode_timeout_task = NULL; | 584 | e->episode_timeout_task = NULL; |
581 | if (NULL != e->ep_done_cb) | 585 | if (NULL != e->ep_done_cb) |
582 | e->ep_done_cb (e->cur); | 586 | e->ep_done_cb (e->cur); |
@@ -741,4 +745,3 @@ GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e) | |||
741 | } | 745 | } |
742 | 746 | ||
743 | /* end of file ats-testing-experiment.c*/ | 747 | /* end of file ats-testing-experiment.c*/ |
744 | |||
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c index fff70052d..650be29f3 100644 --- a/src/ats-tests/ats-testing-log.c +++ b/src/ats-tests/ats-testing-log.c | |||
@@ -799,21 +799,24 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) | |||
799 | } | 799 | } |
800 | } | 800 | } |
801 | 801 | ||
802 | |||
802 | static void | 803 | static void |
803 | collect_log_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 804 | collect_log_task (void *cls) |
804 | { | 805 | { |
805 | struct LoggingHandle *l = cls; | 806 | struct LoggingHandle *l = cls; |
806 | l->log_task = NULL; | 807 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
807 | 808 | ||
809 | l->log_task = NULL; | ||
808 | GNUNET_ATS_TEST_logging_now (l); | 810 | GNUNET_ATS_TEST_logging_now (l); |
809 | 811 | tc = GNUNET_SCHEDULER_get_task_context (); | |
810 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 812 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) |
811 | return; | 813 | return; |
812 | |||
813 | l->log_task = GNUNET_SCHEDULER_add_delayed (l->frequency, | 814 | l->log_task = GNUNET_SCHEDULER_add_delayed (l->frequency, |
814 | &collect_log_task, l); | 815 | &collect_log_task, |
816 | l); | ||
815 | } | 817 | } |
816 | 818 | ||
819 | |||
817 | /** | 820 | /** |
818 | * Stop logging | 821 | * Stop logging |
819 | * | 822 | * |
@@ -905,4 +908,3 @@ GNUNET_ATS_TEST_logging_start(struct GNUNET_TIME_Relative log_frequency, | |||
905 | return l; | 908 | return l; |
906 | } | 909 | } |
907 | /* end of file ats-testing-log.c */ | 910 | /* end of file ats-testing-log.c */ |
908 | |||
diff --git a/src/ats-tests/ats-testing-preferences.c b/src/ats-tests/ats-testing-preferences.c index b8cf205ec..856c8de4b 100644 --- a/src/ats-tests/ats-testing-preferences.c +++ b/src/ats-tests/ats-testing-preferences.c | |||
@@ -91,8 +91,7 @@ get_preference (struct PreferenceGenerator *pg) | |||
91 | 91 | ||
92 | 92 | ||
93 | static void | 93 | static void |
94 | set_pref_task (void *cls, | 94 | set_pref_task (void *cls) |
95 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
96 | { | 95 | { |
97 | struct BenchmarkPartner *p = cls; | 96 | struct BenchmarkPartner *p = cls; |
98 | double pref_value; | 97 | double pref_value; |
diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c index 4446be171..5eb01bd55 100644 --- a/src/ats-tests/ats-testing-traffic.c +++ b/src/ats-tests/ats-testing-traffic.c | |||
@@ -166,8 +166,7 @@ send_ping_ready_cb (void *cls, size_t size, void *buf) | |||
166 | 166 | ||
167 | 167 | ||
168 | static void | 168 | static void |
169 | comm_schedule_send (void *cls, | 169 | comm_schedule_send (void *cls) |
170 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
171 | { | 170 | { |
172 | struct BenchmarkPartner *p = cls; | 171 | struct BenchmarkPartner *p = cls; |
173 | 172 | ||
@@ -431,4 +430,3 @@ GNUNET_ATS_TEST_generate_traffic_stop_all () | |||
431 | } | 430 | } |
432 | 431 | ||
433 | /* end of file ats-testing-traffic.c */ | 432 | /* end of file ats-testing-traffic.c */ |
434 | |||
diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c index a3a6b9623..49aa5a052 100644 --- a/src/ats-tests/ats-testing.c +++ b/src/ats-tests/ats-testing.c | |||
@@ -52,14 +52,14 @@ struct GNUNET_CONFIGURATION_Handle *cfg; | |||
52 | 52 | ||
53 | struct GNUNET_ATS_TEST_Topology *top; | 53 | struct GNUNET_ATS_TEST_Topology *top; |
54 | 54 | ||
55 | |||
55 | /** | 56 | /** |
56 | * Shutdown nicely | 57 | * Shutdown nicely |
57 | * | 58 | * |
58 | * @param cls NULL | 59 | * @param cls NULL |
59 | * @param tc the task context | ||
60 | */ | 60 | */ |
61 | static void | 61 | static void |
62 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 62 | do_shutdown (void *cls) |
63 | { | 63 | { |
64 | int c_m; | 64 | int c_m; |
65 | int c_s; | 65 | int c_s; |
@@ -437,7 +437,7 @@ connect_completion_callback (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
437 | } | 437 | } |
438 | 438 | ||
439 | static void | 439 | static void |
440 | do_connect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 440 | do_connect_peers (void *cls) |
441 | { | 441 | { |
442 | int c_m; | 442 | int c_m; |
443 | int c_s; | 443 | int c_s; |
@@ -506,7 +506,7 @@ comm_connect_completion_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
506 | } | 506 | } |
507 | 507 | ||
508 | static void | 508 | static void |
509 | do_comm_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 509 | do_comm_connect (void *cls) |
510 | { | 510 | { |
511 | int c_s; | 511 | int c_s; |
512 | int c_m; | 512 | int c_m; |
@@ -649,7 +649,7 @@ ats_connect_completion_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
649 | 649 | ||
650 | 650 | ||
651 | static void | 651 | static void |
652 | do_connect_ats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 652 | do_connect_ats (void *cls) |
653 | { | 653 | { |
654 | int c_m; | 654 | int c_m; |
655 | int c_s; | 655 | int c_s; |
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c index e0d85094c..0d2460b7f 100644 --- a/src/ats-tests/gnunet-solver-eval.c +++ b/src/ats-tests/gnunet-solver-eval.c | |||
@@ -418,8 +418,9 @@ load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg) | |||
418 | return e_counter; | 418 | return e_counter; |
419 | } | 419 | } |
420 | 420 | ||
421 | |||
421 | static void | 422 | static void |
422 | timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 423 | timeout_experiment (void *cls) |
423 | { | 424 | { |
424 | struct Experiment *e = cls; | 425 | struct Experiment *e = cls; |
425 | e->experiment_timeout_task = NULL; | 426 | e->experiment_timeout_task = NULL; |
@@ -435,6 +436,7 @@ timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | |||
435 | GNUNET_SYSERR); | 436 | GNUNET_SYSERR); |
436 | } | 437 | } |
437 | 438 | ||
439 | |||
438 | static void | 440 | static void |
439 | enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) | 441 | enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) |
440 | { | 442 | { |
@@ -584,8 +586,9 @@ static void enforce_episode (struct Episode *ep) | |||
584 | } | 586 | } |
585 | } | 587 | } |
586 | 588 | ||
589 | |||
587 | static void | 590 | static void |
588 | timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 591 | timeout_episode (void *cls) |
589 | { | 592 | { |
590 | struct Experiment *e = cls; | 593 | struct Experiment *e = cls; |
591 | e->episode_timeout_task = NULL; | 594 | e->episode_timeout_task = NULL; |
@@ -931,4 +934,3 @@ main (int argc, char *argv[]) | |||
931 | return 0; | 934 | return 0; |
932 | } | 935 | } |
933 | /* end of file ats-testing-experiment.c*/ | 936 | /* end of file ats-testing-experiment.c*/ |
934 | |||
diff --git a/src/ats-tests/perf_ats.c b/src/ats-tests/perf_ats.c index c49d5f03d..4c22043e5 100644 --- a/src/ats-tests/perf_ats.c +++ b/src/ats-tests/perf_ats.c | |||
@@ -185,10 +185,9 @@ evaluate () | |||
185 | * Shutdown nicely | 185 | * Shutdown nicely |
186 | * | 186 | * |
187 | * @param cls NULL | 187 | * @param cls NULL |
188 | * @param tc the task context | ||
189 | */ | 188 | */ |
190 | static void | 189 | static void |
191 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 190 | do_shutdown (void *cls) |
192 | { | 191 | { |
193 | 192 | ||
194 | if (GNUNET_YES == logging) | 193 | if (GNUNET_YES == logging) |
@@ -223,8 +222,9 @@ print_progress () | |||
223 | &print_progress, NULL ); | 222 | &print_progress, NULL ); |
224 | } | 223 | } |
225 | 224 | ||
225 | |||
226 | static void | 226 | static void |
227 | ats_pref_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 227 | ats_pref_task (void *cls) |
228 | { | 228 | { |
229 | struct BenchmarkPeer *me = cls; | 229 | struct BenchmarkPeer *me = cls; |
230 | 230 | ||
diff --git a/src/ats-tests/perf_ats_logging.c b/src/ats-tests/perf_ats_logging.c index d3c6ed9c5..1e4b15432 100644 --- a/src/ats-tests/perf_ats_logging.c +++ b/src/ats-tests/perf_ats_logging.c | |||
@@ -637,17 +637,19 @@ collect_log_now (void) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | static void | 639 | static void |
640 | collect_log_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 640 | collect_log_task (void *cls) |
641 | { | 641 | { |
642 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
643 | |||
642 | log_task = NULL; | 644 | log_task = NULL; |
643 | 645 | ||
644 | collect_log_now(); | 646 | collect_log_now(); |
645 | 647 | tc = GNUNET_SCHEDULER_get_task_context (); | |
646 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 648 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) |
647 | return; | 649 | return; |
648 | 650 | ||
649 | log_task = GNUNET_SCHEDULER_add_delayed (frequency, | 651 | log_task = GNUNET_SCHEDULER_add_delayed (frequency, |
650 | &collect_log_task, NULL); | 652 | &collect_log_task, NULL); |
651 | } | 653 | } |
652 | 654 | ||
653 | 655 | ||
@@ -655,7 +657,6 @@ void | |||
655 | perf_logging_stop () | 657 | perf_logging_stop () |
656 | { | 658 | { |
657 | int c_m; | 659 | int c_m; |
658 | struct GNUNET_SCHEDULER_TaskContext tc; | ||
659 | struct PeerLoggingTimestep *cur; | 660 | struct PeerLoggingTimestep *cur; |
660 | 661 | ||
661 | if (GNUNET_YES!= running) | 662 | if (GNUNET_YES!= running) |
@@ -664,8 +665,7 @@ perf_logging_stop () | |||
664 | if (NULL != log_task) | 665 | if (NULL != log_task) |
665 | GNUNET_SCHEDULER_cancel (log_task); | 666 | GNUNET_SCHEDULER_cancel (log_task); |
666 | log_task = NULL; | 667 | log_task = NULL; |
667 | tc.reason = GNUNET_SCHEDULER_REASON_SHUTDOWN; | 668 | collect_log_task (NULL); |
668 | collect_log_task (NULL, &tc); | ||
669 | 669 | ||
670 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 670 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, |
671 | _("Stop logging\n")); | 671 | _("Stop logging\n")); |
@@ -685,6 +685,7 @@ perf_logging_stop () | |||
685 | GNUNET_free (lp); | 685 | GNUNET_free (lp); |
686 | } | 686 | } |
687 | 687 | ||
688 | |||
688 | void | 689 | void |
689 | perf_logging_start (struct GNUNET_TIME_Relative log_frequency, | 690 | perf_logging_start (struct GNUNET_TIME_Relative log_frequency, |
690 | char * testname, struct BenchmarkPeer *masters, int num_masters) | 691 | char * testname, struct BenchmarkPeer *masters, int num_masters) |
@@ -710,4 +711,3 @@ perf_logging_start (struct GNUNET_TIME_Relative log_frequency, | |||
710 | running = GNUNET_YES; | 711 | running = GNUNET_YES; |
711 | } | 712 | } |
712 | /* end of file perf_ats_logging.c */ | 713 | /* end of file perf_ats_logging.c */ |
713 | |||
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index 458db04c8..a2ef80cef 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c | |||
@@ -265,11 +265,9 @@ free_addr_it (void *cls, | |||
265 | * Task run on shutdown. | 265 | * Task run on shutdown. |
266 | * | 266 | * |
267 | * @param cls NULL | 267 | * @param cls NULL |
268 | * @param tc scheduler context | ||
269 | */ | 268 | */ |
270 | static void | 269 | static void |
271 | end (void *cls, | 270 | end (void *cls) |
272 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
273 | { | 271 | { |
274 | struct PendingResolutions * pr; | 272 | struct PendingResolutions * pr; |
275 | struct PendingResolutions * next; | 273 | struct PendingResolutions * next; |
diff --git a/src/ats/ats_api_connectivity.c b/src/ats/ats_api_connectivity.c index f1898af3f..1897e2783 100644 --- a/src/ats/ats_api_connectivity.c +++ b/src/ats/ats_api_connectivity.c | |||
@@ -106,11 +106,9 @@ reconnect (struct GNUNET_ATS_ConnectivityHandle *ch); | |||
106 | * Re-establish the connection to the ATS service. | 106 | * Re-establish the connection to the ATS service. |
107 | * | 107 | * |
108 | * @param cls handle to use to re-connect. | 108 | * @param cls handle to use to re-connect. |
109 | * @param tc scheduler context | ||
110 | */ | 109 | */ |
111 | static void | 110 | static void |
112 | reconnect_task (void *cls, | 111 | reconnect_task (void *cls) |
113 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
114 | { | 112 | { |
115 | struct GNUNET_ATS_ConnectivityHandle *ch = cls; | 113 | struct GNUNET_ATS_ConnectivityHandle *ch = cls; |
116 | 114 | ||
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index 490c74cfa..48bb2ebf4 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c | |||
@@ -261,11 +261,9 @@ reconnect (struct GNUNET_ATS_PerformanceHandle *ph); | |||
261 | * Re-establish the connection to the ATS service. | 261 | * Re-establish the connection to the ATS service. |
262 | * | 262 | * |
263 | * @param cls handle to use to re-connect. | 263 | * @param cls handle to use to re-connect. |
264 | * @param tc scheduler context | ||
265 | */ | 264 | */ |
266 | static void | 265 | static void |
267 | reconnect_task (void *cls, | 266 | reconnect_task (void *cls) |
268 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
269 | { | 267 | { |
270 | struct GNUNET_ATS_PerformanceHandle *ph = cls; | 268 | struct GNUNET_ATS_PerformanceHandle *ph = cls; |
271 | 269 | ||
diff --git a/src/ats/ats_api_scanner.c b/src/ats/ats_api_scanner.c index 3ed0924fe..d9002a076 100644 --- a/src/ats/ats_api_scanner.c +++ b/src/ats/ats_api_scanner.c | |||
@@ -297,11 +297,9 @@ interface_proc (void *cls, | |||
297 | * Periodically get list of network addresses from our interfaces. | 297 | * Periodically get list of network addresses from our interfaces. |
298 | * | 298 | * |
299 | * @param cls closure | 299 | * @param cls closure |
300 | * @param tc Task context | ||
301 | */ | 300 | */ |
302 | static void | 301 | static void |
303 | get_addresses (void *cls, | 302 | get_addresses (void *cls) |
304 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
305 | { | 303 | { |
306 | struct GNUNET_ATS_InterfaceScanner *is = cls; | 304 | struct GNUNET_ATS_InterfaceScanner *is = cls; |
307 | 305 | ||
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index d26841878..0d0d102db 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -166,11 +166,9 @@ reconnect (struct GNUNET_ATS_SchedulingHandle *sh); | |||
166 | * Re-establish the connection to the ATS service. | 166 | * Re-establish the connection to the ATS service. |
167 | * | 167 | * |
168 | * @param cls handle to use to re-connect. | 168 | * @param cls handle to use to re-connect. |
169 | * @param tc scheduler context | ||
170 | */ | 169 | */ |
171 | static void | 170 | static void |
172 | reconnect_task (void *cls, | 171 | reconnect_task (void *cls) |
173 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
174 | { | 172 | { |
175 | struct GNUNET_ATS_SchedulingHandle *sh = cls; | 173 | struct GNUNET_ATS_SchedulingHandle *sh = cls; |
176 | 174 | ||
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index 3cadb2ef7..613df52ad 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -216,7 +216,7 @@ GNUNET_ATS_solver_logging_now (struct LoggingHandle *l) | |||
216 | 216 | ||
217 | 217 | ||
218 | static void | 218 | static void |
219 | logging_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 219 | logging_task (void *cls) |
220 | { | 220 | { |
221 | struct LoggingHandle *l = cls; | 221 | struct LoggingHandle *l = cls; |
222 | 222 | ||
@@ -590,7 +590,7 @@ get_property (struct PropertyGenerator *pg) | |||
590 | 590 | ||
591 | 591 | ||
592 | static void | 592 | static void |
593 | set_prop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 593 | set_prop_task (void *cls) |
594 | { | 594 | { |
595 | struct PropertyGenerator *pg = cls; | 595 | struct PropertyGenerator *pg = cls; |
596 | struct TestPeer *p; | 596 | struct TestPeer *p; |
@@ -858,9 +858,9 @@ get_preference (struct PreferenceGenerator *pg) | |||
858 | return pref_value; | 858 | return pref_value; |
859 | } | 859 | } |
860 | 860 | ||
861 | |||
861 | static void | 862 | static void |
862 | set_feedback_task (void *cls, | 863 | set_feedback_task (void *cls) |
863 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
864 | { | 864 | { |
865 | struct PreferenceGenerator *pg = cls; | 865 | struct PreferenceGenerator *pg = cls; |
866 | struct TestPeer *p; | 866 | struct TestPeer *p; |
@@ -934,8 +934,7 @@ set_feedback_task (void *cls, | |||
934 | 934 | ||
935 | 935 | ||
936 | static void | 936 | static void |
937 | set_pref_task (void *cls, | 937 | set_pref_task (void *cls) |
938 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
939 | { | 938 | { |
940 | struct PreferenceGenerator *pg = cls; | 939 | struct PreferenceGenerator *pg = cls; |
941 | struct TestPeer *p; | 940 | struct TestPeer *p; |
@@ -2124,10 +2123,12 @@ load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg) | |||
2124 | return e_counter; | 2123 | return e_counter; |
2125 | } | 2124 | } |
2126 | 2125 | ||
2126 | |||
2127 | static void | 2127 | static void |
2128 | timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 2128 | timeout_experiment (void *cls) |
2129 | { | 2129 | { |
2130 | struct Experiment *e = cls; | 2130 | struct Experiment *e = cls; |
2131 | |||
2131 | e->experiment_timeout_task = NULL; | 2132 | e->experiment_timeout_task = NULL; |
2132 | fprintf (stderr, "Experiment timeout!\n"); | 2133 | fprintf (stderr, "Experiment timeout!\n"); |
2133 | 2134 | ||
@@ -2487,10 +2488,12 @@ static void enforce_episode (struct Episode *ep) | |||
2487 | } | 2488 | } |
2488 | } | 2489 | } |
2489 | 2490 | ||
2491 | |||
2490 | static void | 2492 | static void |
2491 | timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 2493 | timeout_episode (void *cls) |
2492 | { | 2494 | { |
2493 | struct Experiment *e = cls; | 2495 | struct Experiment *e = cls; |
2496 | |||
2494 | e->episode_timeout_task = NULL; | 2497 | e->episode_timeout_task = NULL; |
2495 | if (NULL != e->ep_done_cb) | 2498 | if (NULL != e->ep_done_cb) |
2496 | e->ep_done_cb (e->cur); | 2499 | e->ep_done_cb (e->cur); |
diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c index 11db62e2d..7b8dfe222 100644 --- a/src/ats/gnunet-service-ats.c +++ b/src/ats/gnunet-service-ats.c | |||
@@ -124,11 +124,9 @@ client_disconnect_handler (void *cls, | |||
124 | * Task run during shutdown. | 124 | * Task run during shutdown. |
125 | * | 125 | * |
126 | * @param cls unused | 126 | * @param cls unused |
127 | * @param tc unused | ||
128 | */ | 127 | */ |
129 | static void | 128 | static void |
130 | cleanup_task (void *cls, | 129 | cleanup_task (void *cls) |
131 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
132 | { | 130 | { |
133 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 131 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
134 | "ATS shutdown initiated\n"); | 132 | "ATS shutdown initiated\n"); |
diff --git a/src/ats/gnunet-service-ats_preferences.c b/src/ats/gnunet-service-ats_preferences.c index b56a8fd7f..c835b026b 100644 --- a/src/ats/gnunet-service-ats_preferences.c +++ b/src/ats/gnunet-service-ats_preferences.c | |||
@@ -388,11 +388,9 @@ age_values (void *cls, | |||
388 | * Reduce absolute preferences since they got old. | 388 | * Reduce absolute preferences since they got old. |
389 | * | 389 | * |
390 | * @param cls unused | 390 | * @param cls unused |
391 | * @param tc context | ||
392 | */ | 391 | */ |
393 | static void | 392 | static void |
394 | preference_aging (void *cls, | 393 | preference_aging (void *cls) |
395 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
396 | { | 394 | { |
397 | struct AgeContext ac; | 395 | struct AgeContext ac; |
398 | 396 | ||
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c index 0f02fe34a..766a9936d 100644 --- a/src/ats/plugin_ats_ril.c +++ b/src/ats/plugin_ats_ril.c | |||
@@ -1513,10 +1513,9 @@ ril_step (struct GAS_RIL_Handle *solver); | |||
1513 | * no further step is scheduled. | 1513 | * no further step is scheduled. |
1514 | * | 1514 | * |
1515 | * @param cls the solver handle | 1515 | * @param cls the solver handle |
1516 | * @param tc the task context for the scheduler | ||
1517 | */ | 1516 | */ |
1518 | static void | 1517 | static void |
1519 | ril_step_scheduler_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1518 | ril_step_scheduler_task (void *cls) |
1520 | { | 1519 | { |
1521 | struct GAS_RIL_Handle *solver = cls; | 1520 | struct GAS_RIL_Handle *solver = cls; |
1522 | 1521 | ||
diff --git a/src/ats/test_ats_lib.c b/src/ats/test_ats_lib.c index 6592cded1..b0c42ac3d 100644 --- a/src/ats/test_ats_lib.c +++ b/src/ats/test_ats_lib.c | |||
@@ -279,11 +279,9 @@ find_address_information (const struct GNUNET_HELLO_Address *addr) | |||
279 | * Task run to terminate the testcase. | 279 | * Task run to terminate the testcase. |
280 | * | 280 | * |
281 | * @param cls NULL | 281 | * @param cls NULL |
282 | * @param tc unused | ||
283 | */ | 282 | */ |
284 | static void | 283 | static void |
285 | end (void *cls, | 284 | end (void *cls) |
286 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
287 | { | 285 | { |
288 | if (0 != ret) | 286 | if (0 != ret) |
289 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 287 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -335,11 +333,9 @@ end (void *cls, | |||
335 | * Main interpreter loop. Runs the steps of the test. | 333 | * Main interpreter loop. Runs the steps of the test. |
336 | * | 334 | * |
337 | * @param cls NULL | 335 | * @param cls NULL |
338 | * @param tc unused | ||
339 | */ | 336 | */ |
340 | static void | 337 | static void |
341 | interpreter (void *cls, | 338 | interpreter (void *cls); |
342 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
343 | 339 | ||
344 | 340 | ||
345 | /** | 341 | /** |
@@ -591,11 +587,9 @@ reservation_cb (void *cls, | |||
591 | * Main interpreter loop. Runs the steps of the test. | 587 | * Main interpreter loop. Runs the steps of the test. |
592 | * | 588 | * |
593 | * @param cls NULL | 589 | * @param cls NULL |
594 | * @param tc unused | ||
595 | */ | 590 | */ |
596 | static void | 591 | static void |
597 | interpreter (void *cls, | 592 | interpreter (void *cls) |
598 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
599 | 593 | ||
600 | { | 594 | { |
601 | struct Command *cmd; | 595 | struct Command *cmd; |
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c index a1fe90cc5..6894d2482 100644 --- a/src/cadet/cadet_api.c +++ b/src/cadet/cadet_api.c | |||
@@ -513,10 +513,9 @@ destroy_channel (struct GNUNET_CADET_Channel *ch, int call_cleaner) | |||
513 | * Notify client that the transmission has timed out | 513 | * Notify client that the transmission has timed out |
514 | * | 514 | * |
515 | * @param cls closure | 515 | * @param cls closure |
516 | * @param tc task context | ||
517 | */ | 516 | */ |
518 | static void | 517 | static void |
519 | timeout_transmission (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 518 | timeout_transmission (void *cls) |
520 | { | 519 | { |
521 | struct GNUNET_CADET_TransmitHandle *th = cls; | 520 | struct GNUNET_CADET_TransmitHandle *th = cls; |
522 | struct GNUNET_CADET_Handle *cadet = th->channel->cadet; | 521 | struct GNUNET_CADET_Handle *cadet = th->channel->cadet; |
@@ -594,12 +593,12 @@ send_ack (struct GNUNET_CADET_Channel *ch) | |||
594 | 593 | ||
595 | /** | 594 | /** |
596 | * Reconnect callback: tries to reconnect again after a failer previous | 595 | * Reconnect callback: tries to reconnect again after a failer previous |
597 | * reconnecttion | 596 | * reconnection. |
597 | * | ||
598 | * @param cls closure (cadet handle) | 598 | * @param cls closure (cadet handle) |
599 | * @param tc task context | ||
600 | */ | 599 | */ |
601 | static void | 600 | static void |
602 | reconnect_cbk (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 601 | reconnect_cbk (void *cls); |
603 | 602 | ||
604 | 603 | ||
605 | /** | 604 | /** |
@@ -696,15 +695,17 @@ do_reconnect (struct GNUNET_CADET_Handle *h) | |||
696 | /** | 695 | /** |
697 | * Reconnect callback: tries to reconnect again after a failer previous | 696 | * Reconnect callback: tries to reconnect again after a failer previous |
698 | * reconnecttion | 697 | * reconnecttion |
698 | * | ||
699 | * @param cls closure (cadet handle) | 699 | * @param cls closure (cadet handle) |
700 | * @param tc task context | ||
701 | */ | 700 | */ |
702 | static void | 701 | static void |
703 | reconnect_cbk (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 702 | reconnect_cbk (void *cls) |
704 | { | 703 | { |
705 | struct GNUNET_CADET_Handle *h = cls; | 704 | struct GNUNET_CADET_Handle *h = cls; |
705 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
706 | 706 | ||
707 | h->reconnect_task = NULL; | 707 | h->reconnect_task = NULL; |
708 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
708 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 709 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
709 | return; | 710 | return; |
710 | do_reconnect (h); | 711 | do_reconnect (h); |
@@ -2171,4 +2172,3 @@ GNUNET_CADET_mq_create (struct GNUNET_CADET_Channel *channel) | |||
2171 | NULL); /* no handler cls */ | 2172 | NULL); /* no handler cls */ |
2172 | return mq; | 2173 | return mq; |
2173 | } | 2174 | } |
2174 | |||
diff --git a/src/cadet/cadet_path.c b/src/cadet/cadet_path.c index 1ea2b185f..47241292b 100644 --- a/src/cadet/cadet_path.c +++ b/src/cadet/cadet_path.c | |||
@@ -39,18 +39,19 @@ | |||
39 | * Removes the path from the peer (except for direct paths). | 39 | * Removes the path from the peer (except for direct paths). |
40 | * | 40 | * |
41 | * @param cls Closure (path to destroy). | 41 | * @param cls Closure (path to destroy). |
42 | * @param tc Task context. | ||
43 | */ | 42 | */ |
44 | static void | 43 | static void |
45 | path_destroy_delayed (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 44 | path_destroy_delayed (void *cls) |
46 | { | 45 | { |
47 | struct CadetPeerPath *path = cls; | 46 | struct CadetPeerPath *path = cls; |
48 | struct CadetPeer *peer; | 47 | struct CadetPeer *peer; |
48 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
49 | 49 | ||
50 | LOG (GNUNET_ERROR_TYPE_INFO, "Destroy delayed %p (%u)\n", path, path->length); | 50 | LOG (GNUNET_ERROR_TYPE_INFO, "Destroy delayed %p (%u)\n", path, path->length); |
51 | path->path_delete = NULL; | 51 | path->path_delete = NULL; |
52 | 52 | ||
53 | /* During shutdown, the peers peermap might not exist anymore. */ | 53 | /* During shutdown, the peers peermap might not exist anymore. */ |
54 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
54 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) == 0) | 55 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) == 0) |
55 | { | 56 | { |
56 | if (2 >= path->length) | 57 | if (2 >= path->length) |
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c index bda844b13..ffa993f8e 100644 --- a/src/cadet/gnunet-cadet-profiler.c +++ b/src/cadet/gnunet-cadet-profiler.c | |||
@@ -249,10 +249,9 @@ static int test_finished; | |||
249 | * on callback funtion ch. | 249 | * on callback funtion ch. |
250 | * | 250 | * |
251 | * @param cls Closure (unsued). | 251 | * @param cls Closure (unsued). |
252 | * @param tc Task Context. | ||
253 | */ | 252 | */ |
254 | static void | 253 | static void |
255 | start_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 254 | start_test (void *cls); |
256 | 255 | ||
257 | 256 | ||
258 | /** | 257 | /** |
@@ -314,10 +313,9 @@ show_end_data (void) | |||
314 | * Shut down peergroup, clean up. | 313 | * Shut down peergroup, clean up. |
315 | * | 314 | * |
316 | * @param cls Closure (unused). | 315 | * @param cls Closure (unused). |
317 | * @param tc Task Context. | ||
318 | */ | 316 | */ |
319 | static void | 317 | static void |
320 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 318 | shutdown_task (void *cls) |
321 | { | 319 | { |
322 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Ending test.\n"); | 320 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Ending test.\n"); |
323 | shutdown_handle = NULL; | 321 | shutdown_handle = NULL; |
@@ -328,10 +326,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
328 | * Disconnect from cadet services af all peers, call shutdown. | 326 | * Disconnect from cadet services af all peers, call shutdown. |
329 | * | 327 | * |
330 | * @param cls Closure (unused). | 328 | * @param cls Closure (unused). |
331 | * @param tc Task Context. | ||
332 | */ | 329 | */ |
333 | static void | 330 | static void |
334 | disconnect_cadet_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 331 | disconnect_cadet_peers (void *cls) |
335 | { | 332 | { |
336 | long line = (long) cls; | 333 | long line = (long) cls; |
337 | unsigned int i; | 334 | unsigned int i; |
@@ -443,11 +440,13 @@ stats_iterator (void *cls, const struct GNUNET_TESTBED_Peer *peer, | |||
443 | * Task check that keepalives were sent and received. | 440 | * Task check that keepalives were sent and received. |
444 | * | 441 | * |
445 | * @param cls Closure (NULL). | 442 | * @param cls Closure (NULL). |
446 | * @param tc Task Context. | ||
447 | */ | 443 | */ |
448 | static void | 444 | static void |
449 | collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 445 | collect_stats (void *cls) |
450 | { | 446 | { |
447 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
448 | |||
449 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
451 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 450 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
452 | return; | 451 | return; |
453 | 452 | ||
@@ -462,11 +461,13 @@ collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
462 | * @brief Finish profiler normally. Signal finish and start collecting stats. | 461 | * @brief Finish profiler normally. Signal finish and start collecting stats. |
463 | * | 462 | * |
464 | * @param cls Closure (unused). | 463 | * @param cls Closure (unused). |
465 | * @param tc Task context. | ||
466 | */ | 464 | */ |
467 | static void | 465 | static void |
468 | finish_profiler (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 466 | finish_profiler (void *cls) |
469 | { | 467 | { |
468 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
469 | |||
470 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
470 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 471 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
471 | return; | 472 | return; |
472 | 473 | ||
@@ -542,11 +543,13 @@ adjust_running_peers (unsigned int target) | |||
542 | * @brief Move to next round. | 543 | * @brief Move to next round. |
543 | * | 544 | * |
544 | * @param cls Closure (round #). | 545 | * @param cls Closure (round #). |
545 | * @param tc Task context. | ||
546 | */ | 546 | */ |
547 | static void | 547 | static void |
548 | next_rnd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 548 | next_rnd (void *cls) |
549 | { | 549 | { |
550 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
551 | |||
552 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
550 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 553 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
551 | return; | 554 | return; |
552 | 555 | ||
@@ -608,15 +611,15 @@ tmt_rdy_pong (void *cls, size_t size, void *buf) | |||
608 | * @brief Send a ping to destination | 611 | * @brief Send a ping to destination |
609 | * | 612 | * |
610 | * @param cls Closure (peer). | 613 | * @param cls Closure (peer). |
611 | * @param tc Task context. | ||
612 | */ | 614 | */ |
613 | static void | 615 | static void |
614 | ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 616 | ping (void *cls) |
615 | { | 617 | { |
616 | struct CadetPeer *peer = (struct CadetPeer *) cls; | 618 | struct CadetPeer *peer = cls; |
619 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
617 | 620 | ||
618 | peer->ping_task = NULL; | 621 | peer->ping_task = NULL; |
619 | 622 | tc = GNUNET_SCHEDULER_get_task_context (); | |
620 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) | 623 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) |
621 | || GNUNET_YES == test_finished) | 624 | || GNUNET_YES == test_finished) |
622 | return; | 625 | return; |
@@ -865,15 +868,16 @@ select_random_peer (struct CadetPeer *peer) | |||
865 | * on callback funtion ch. | 868 | * on callback funtion ch. |
866 | * | 869 | * |
867 | * @param cls Closure (unsued). | 870 | * @param cls Closure (unsued). |
868 | * @param tc Task Context. | ||
869 | */ | 871 | */ |
870 | static void | 872 | static void |
871 | start_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 873 | start_test (void *cls) |
872 | { | 874 | { |
873 | enum GNUNET_CADET_ChannelOption flags; | 875 | enum GNUNET_CADET_ChannelOption flags; |
874 | unsigned long i; | 876 | unsigned long i; |
877 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
875 | 878 | ||
876 | test_task = NULL; | 879 | test_task = NULL; |
880 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
877 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 881 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
878 | return; | 882 | return; |
879 | 883 | ||
@@ -1089,4 +1093,3 @@ main (int argc, char *argv[]) | |||
1089 | } | 1093 | } |
1090 | 1094 | ||
1091 | /* end of gnunet-cadet-profiler.c */ | 1095 | /* end of gnunet-cadet-profiler.c */ |
1092 | |||
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 5c5ec54b9..14b499aae 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -191,11 +191,9 @@ conn_2s (uint16_t status) | |||
191 | * Stops monitoring activity. | 191 | * Stops monitoring activity. |
192 | * | 192 | * |
193 | * @param cls Closure (unused). | 193 | * @param cls Closure (unused). |
194 | * @param tc scheduler context | ||
195 | */ | 194 | */ |
196 | static void | 195 | static void |
197 | shutdown_task (void *cls, | 196 | shutdown_task (void *cls) |
198 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
199 | { | 197 | { |
200 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); | 198 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); |
201 | if (NULL != th) | 199 | if (NULL != th) |
@@ -268,14 +266,14 @@ data_ready (void *cls, size_t size, void *buf) | |||
268 | * Task run in stdio mode, after some data is available at stdin. | 266 | * Task run in stdio mode, after some data is available at stdin. |
269 | * | 267 | * |
270 | * @param cls Closure (unused). | 268 | * @param cls Closure (unused). |
271 | * @param tc scheduler context | ||
272 | */ | 269 | */ |
273 | static void | 270 | static void |
274 | read_stdio (void *cls, | 271 | read_stdio (void *cls) |
275 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
276 | { | 272 | { |
277 | static char buf[60000]; | 273 | static char buf[60000]; |
274 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
278 | 275 | ||
276 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
279 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 277 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
280 | { | 278 | { |
281 | return; | 279 | return; |
@@ -406,11 +404,13 @@ channel_incoming (void *cls, | |||
406 | * @brief Send an echo request to the remote peer. | 404 | * @brief Send an echo request to the remote peer. |
407 | * | 405 | * |
408 | * @param cls Closure (NULL). | 406 | * @param cls Closure (NULL). |
409 | * @param tc Task context. | ||
410 | */ | 407 | */ |
411 | static void | 408 | static void |
412 | send_echo (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 409 | send_echo (void *cls) |
413 | { | 410 | { |
411 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
412 | |||
413 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
414 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || NULL == ch) | 414 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || NULL == ch) |
415 | return; | 415 | return; |
416 | 416 | ||
@@ -426,10 +426,9 @@ send_echo (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
426 | * Call CADET's monitor API, request debug dump on the service. | 426 | * Call CADET's monitor API, request debug dump on the service. |
427 | * | 427 | * |
428 | * @param cls Closure (unused). | 428 | * @param cls Closure (unused). |
429 | * @param tc TaskContext | ||
430 | */ | 429 | */ |
431 | static void | 430 | static void |
432 | request_dump (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 431 | request_dump (void *cls) |
433 | { | 432 | { |
434 | GNUNET_CADET_request_dump (mh); | 433 | GNUNET_CADET_request_dump (mh); |
435 | GNUNET_SCHEDULER_cancel (sd); | 434 | GNUNET_SCHEDULER_cancel (sd); |
@@ -441,10 +440,9 @@ request_dump (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
441 | * Call CADET's monitor API, get info of one connection. | 440 | * Call CADET's monitor API, get info of one connection. |
442 | * | 441 | * |
443 | * @param cls Closure (unused). | 442 | * @param cls Closure (unused). |
444 | * @param tc TaskContext | ||
445 | */ | 443 | */ |
446 | static void | 444 | static void |
447 | create_channel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 445 | create_channel (void *cls) |
448 | { | 446 | { |
449 | struct GNUNET_PeerIdentity pid; | 447 | struct GNUNET_PeerIdentity pid; |
450 | enum GNUNET_CADET_ChannelOption opt; | 448 | enum GNUNET_CADET_ChannelOption opt; |
@@ -703,11 +701,13 @@ tunnel_callback (void *cls, | |||
703 | * Call CADET's meta API, get all peers known to a peer. | 701 | * Call CADET's meta API, get all peers known to a peer. |
704 | * | 702 | * |
705 | * @param cls Closure (unused). | 703 | * @param cls Closure (unused). |
706 | * @param tc TaskContext | ||
707 | */ | 704 | */ |
708 | static void | 705 | static void |
709 | get_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 706 | get_peers (void *cls) |
710 | { | 707 | { |
708 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
709 | |||
710 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
711 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 711 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
712 | { | 712 | { |
713 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); | 713 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); |
@@ -721,18 +721,17 @@ get_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
721 | * Call CADET's monitor API, get info of one peer. | 721 | * Call CADET's monitor API, get info of one peer. |
722 | * | 722 | * |
723 | * @param cls Closure (unused). | 723 | * @param cls Closure (unused). |
724 | * @param tc TaskContext | ||
725 | */ | 724 | */ |
726 | static void | 725 | static void |
727 | show_peer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 726 | show_peer (void *cls) |
728 | { | 727 | { |
729 | struct GNUNET_PeerIdentity pid; | 728 | struct GNUNET_PeerIdentity pid; |
730 | 729 | ||
731 | if (GNUNET_OK != | 730 | if (GNUNET_OK != |
732 | GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id, | 731 | GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id, |
733 | strlen (peer_id), | 732 | strlen (peer_id), |
734 | &pid.public_key)) | 733 | &pid.public_key)) |
735 | { | 734 | { |
736 | fprintf (stderr, | 735 | fprintf (stderr, |
737 | _("Invalid peer ID `%s'\n"), | 736 | _("Invalid peer ID `%s'\n"), |
738 | peer_id); | 737 | peer_id); |
@@ -746,11 +745,13 @@ show_peer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
746 | * Call CADET's meta API, get all tunnels known to a peer. | 745 | * Call CADET's meta API, get all tunnels known to a peer. |
747 | * | 746 | * |
748 | * @param cls Closure (unused). | 747 | * @param cls Closure (unused). |
749 | * @param tc TaskContext | ||
750 | */ | 748 | */ |
751 | static void | 749 | static void |
752 | get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 750 | get_tunnels (void *cls) |
753 | { | 751 | { |
752 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
753 | |||
754 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
754 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 755 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
755 | { | 756 | { |
756 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); | 757 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); |
@@ -764,10 +765,9 @@ get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
764 | * Call CADET's monitor API, get info of one tunnel. | 765 | * Call CADET's monitor API, get info of one tunnel. |
765 | * | 766 | * |
766 | * @param cls Closure (unused). | 767 | * @param cls Closure (unused). |
767 | * @param tc TaskContext | ||
768 | */ | 768 | */ |
769 | static void | 769 | static void |
770 | show_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 770 | show_tunnel (void *cls) |
771 | { | 771 | { |
772 | struct GNUNET_PeerIdentity pid; | 772 | struct GNUNET_PeerIdentity pid; |
773 | 773 | ||
@@ -790,10 +790,9 @@ show_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
790 | * Call CADET's monitor API, get info of one channel. | 790 | * Call CADET's monitor API, get info of one channel. |
791 | * | 791 | * |
792 | * @param cls Closure (unused). | 792 | * @param cls Closure (unused). |
793 | * @param tc TaskContext | ||
794 | */ | 793 | */ |
795 | static void | 794 | static void |
796 | show_channel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 795 | show_channel (void *cls) |
797 | { | 796 | { |
798 | 797 | ||
799 | } | 798 | } |
@@ -803,10 +802,9 @@ show_channel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
803 | * Call CADET's monitor API, get info of one connection. | 802 | * Call CADET's monitor API, get info of one connection. |
804 | * | 803 | * |
805 | * @param cls Closure (unused). | 804 | * @param cls Closure (unused). |
806 | * @param tc TaskContext | ||
807 | */ | 805 | */ |
808 | static void | 806 | static void |
809 | show_connection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 807 | show_connection (void *cls) |
810 | { | 808 | { |
811 | 809 | ||
812 | } | 810 | } |
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c index 86f1692e1..a2e00300b 100644 --- a/src/cadet/gnunet-service-cadet.c +++ b/src/cadet/gnunet-service-cadet.c | |||
@@ -98,10 +98,9 @@ static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key; | |||
98 | * Task run during shutdown. | 98 | * Task run during shutdown. |
99 | * | 99 | * |
100 | * @param cls unused | 100 | * @param cls unused |
101 | * @param tc unused | ||
102 | */ | 101 | */ |
103 | static void | 102 | static void |
104 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 103 | shutdown_task (void *cls) |
105 | { | 104 | { |
106 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutting down\n"); | 105 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutting down\n"); |
107 | 106 | ||
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index a2e01d28f..debae7d77 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -721,19 +721,19 @@ send_client_nack (struct CadetChannel *ch) | |||
721 | * We haven't received an ACK after a certain time: restransmit the message. | 721 | * We haven't received an ACK after a certain time: restransmit the message. |
722 | * | 722 | * |
723 | * @param cls Closure (CadetChannelReliability with the message to restransmit) | 723 | * @param cls Closure (CadetChannelReliability with the message to restransmit) |
724 | * @param tc TaskContext. | ||
725 | */ | 724 | */ |
726 | static void | 725 | static void |
727 | channel_retransmit_message (void *cls, | 726 | channel_retransmit_message (void *cls) |
728 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
729 | { | 727 | { |
730 | struct CadetChannelReliability *rel = cls; | 728 | struct CadetChannelReliability *rel = cls; |
731 | struct CadetReliableMessage *copy; | 729 | struct CadetReliableMessage *copy; |
732 | struct CadetChannel *ch; | 730 | struct CadetChannel *ch; |
733 | struct GNUNET_CADET_Data *payload; | 731 | struct GNUNET_CADET_Data *payload; |
734 | int fwd; | 732 | int fwd; |
733 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
735 | 734 | ||
736 | rel->retry_task = NULL; | 735 | rel->retry_task = NULL; |
736 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
737 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 737 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
738 | return; | 738 | return; |
739 | 739 | ||
@@ -760,14 +760,15 @@ channel_retransmit_message (void *cls, | |||
760 | * We haven't received an Channel ACK after a certain time: resend the CREATE. | 760 | * We haven't received an Channel ACK after a certain time: resend the CREATE. |
761 | * | 761 | * |
762 | * @param cls Closure (CadetChannelReliability of the channel to recreate) | 762 | * @param cls Closure (CadetChannelReliability of the channel to recreate) |
763 | * @param tc TaskContext. | ||
764 | */ | 763 | */ |
765 | static void | 764 | static void |
766 | channel_recreate (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 765 | channel_recreate (void *cls) |
767 | { | 766 | { |
768 | struct CadetChannelReliability *rel = cls; | 767 | struct CadetChannelReliability *rel = cls; |
768 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
769 | 769 | ||
770 | rel->retry_task = NULL; | 770 | rel->retry_task = NULL; |
771 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
771 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 772 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
772 | return; | 773 | return; |
773 | 774 | ||
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 186204f1e..d11368a79 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -1221,13 +1221,14 @@ connection_keepalive (struct CadetConnection *c, int fwd, int shutdown) | |||
1221 | * Keep the connection alive in the FWD direction. | 1221 | * Keep the connection alive in the FWD direction. |
1222 | * | 1222 | * |
1223 | * @param cls Closure (connection to keepalive). | 1223 | * @param cls Closure (connection to keepalive). |
1224 | * @param tc TaskContext. | ||
1225 | */ | 1224 | */ |
1226 | static void | 1225 | static void |
1227 | connection_fwd_keepalive (void *cls, | 1226 | connection_fwd_keepalive (void *cls) |
1228 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1229 | { | 1227 | { |
1228 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1229 | |||
1230 | GCC_check_connections (); | 1230 | GCC_check_connections (); |
1231 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1231 | connection_keepalive ((struct CadetConnection *) cls, | 1232 | connection_keepalive ((struct CadetConnection *) cls, |
1232 | GNUNET_YES, | 1233 | GNUNET_YES, |
1233 | tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN); | 1234 | tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN); |
@@ -1239,13 +1240,14 @@ connection_fwd_keepalive (void *cls, | |||
1239 | * Keep the connection alive in the BCK direction. | 1240 | * Keep the connection alive in the BCK direction. |
1240 | * | 1241 | * |
1241 | * @param cls Closure (connection to keepalive). | 1242 | * @param cls Closure (connection to keepalive). |
1242 | * @param tc TaskContext. | ||
1243 | */ | 1243 | */ |
1244 | static void | 1244 | static void |
1245 | connection_bck_keepalive (void *cls, | 1245 | connection_bck_keepalive (void *cls) |
1246 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1247 | { | 1246 | { |
1247 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1248 | |||
1248 | GCC_check_connections (); | 1249 | GCC_check_connections (); |
1250 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1249 | connection_keepalive ((struct CadetConnection *) cls, | 1251 | connection_keepalive ((struct CadetConnection *) cls, |
1250 | GNUNET_NO, | 1252 | GNUNET_NO, |
1251 | tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN); | 1253 | tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN); |
@@ -1400,11 +1402,9 @@ connection_cancel_queues (struct CadetConnection *c, | |||
1400 | * possibly due to a missed ACK. Poll the neighbor about its ACK status. | 1402 | * possibly due to a missed ACK. Poll the neighbor about its ACK status. |
1401 | * | 1403 | * |
1402 | * @param cls Closure (poll ctx). | 1404 | * @param cls Closure (poll ctx). |
1403 | * @param tc TaskContext. | ||
1404 | */ | 1405 | */ |
1405 | static void | 1406 | static void |
1406 | connection_poll (void *cls, | 1407 | connection_poll (void *cls); |
1407 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
1408 | 1408 | ||
1409 | 1409 | ||
1410 | /** | 1410 | /** |
@@ -1453,18 +1453,19 @@ poll_sent (void *cls, | |||
1453 | * possibly due to a missed ACK. Poll the neighbor about its ACK status. | 1453 | * possibly due to a missed ACK. Poll the neighbor about its ACK status. |
1454 | * | 1454 | * |
1455 | * @param cls Closure (poll ctx). | 1455 | * @param cls Closure (poll ctx). |
1456 | * @param tc TaskContext. | ||
1457 | */ | 1456 | */ |
1458 | static void | 1457 | static void |
1459 | connection_poll (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1458 | connection_poll (void *cls) |
1460 | { | 1459 | { |
1461 | struct CadetFlowControl *fc = cls; | 1460 | struct CadetFlowControl *fc = cls; |
1462 | struct GNUNET_CADET_Poll msg; | 1461 | struct GNUNET_CADET_Poll msg; |
1463 | struct CadetConnection *c; | 1462 | struct CadetConnection *c; |
1464 | int fwd; | 1463 | int fwd; |
1464 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1465 | 1465 | ||
1466 | fc->poll_task = NULL; | 1466 | fc->poll_task = NULL; |
1467 | GCC_check_connections (); | 1467 | GCC_check_connections (); |
1468 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1468 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1469 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1469 | { | 1470 | { |
1470 | return; | 1471 | return; |
@@ -1586,15 +1587,15 @@ connection_timeout (struct CadetConnection *c, int fwd) | |||
1586 | * Destroys connection if called. | 1587 | * Destroys connection if called. |
1587 | * | 1588 | * |
1588 | * @param cls Closure (connection to destroy). | 1589 | * @param cls Closure (connection to destroy). |
1589 | * @param tc TaskContext. | ||
1590 | */ | 1590 | */ |
1591 | static void | 1591 | static void |
1592 | connection_fwd_timeout (void *cls, | 1592 | connection_fwd_timeout (void *cls) |
1593 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1594 | { | 1593 | { |
1595 | struct CadetConnection *c = cls; | 1594 | struct CadetConnection *c = cls; |
1595 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1596 | 1596 | ||
1597 | c->fwd_maintenance_task = NULL; | 1597 | c->fwd_maintenance_task = NULL; |
1598 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1598 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1599 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1599 | return; | 1600 | return; |
1600 | GCC_check_connections (); | 1601 | GCC_check_connections (); |
@@ -1608,15 +1609,15 @@ connection_fwd_timeout (void *cls, | |||
1608 | * Destroys connection if called. | 1609 | * Destroys connection if called. |
1609 | * | 1610 | * |
1610 | * @param cls Closure (connection to destroy). | 1611 | * @param cls Closure (connection to destroy). |
1611 | * @param tc TaskContext | ||
1612 | */ | 1612 | */ |
1613 | static void | 1613 | static void |
1614 | connection_bck_timeout (void *cls, | 1614 | connection_bck_timeout (void *cls) |
1615 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1616 | { | 1615 | { |
1617 | struct CadetConnection *c = cls; | 1616 | struct CadetConnection *c = cls; |
1617 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1618 | 1618 | ||
1619 | c->bck_maintenance_task = NULL; | 1619 | c->bck_maintenance_task = NULL; |
1620 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1620 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1621 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1621 | return; | 1622 | return; |
1622 | GCC_check_connections (); | 1623 | GCC_check_connections (); |
@@ -1761,14 +1762,15 @@ does_connection_exist (struct CadetConnection *conn) | |||
1761 | * connection with the same path, and destroy one if so. | 1762 | * connection with the same path, and destroy one if so. |
1762 | * | 1763 | * |
1763 | * @param cls Closure (connection to check). | 1764 | * @param cls Closure (connection to check). |
1764 | * @param tc Task context. | ||
1765 | */ | 1765 | */ |
1766 | static void | 1766 | static void |
1767 | check_duplicates (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1767 | check_duplicates (void *cls) |
1768 | { | 1768 | { |
1769 | struct CadetConnection *c = cls; | 1769 | struct CadetConnection *c = cls; |
1770 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1770 | 1771 | ||
1771 | c->check_duplicates_task = NULL; | 1772 | c->check_duplicates_task = NULL; |
1773 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1772 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1774 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1773 | return; | 1775 | return; |
1774 | 1776 | ||
diff --git a/src/cadet/gnunet-service-cadet_dht.c b/src/cadet/gnunet-service-cadet_dht.c index 2e8e53a9d..088d40eac 100644 --- a/src/cadet/gnunet-service-cadet_dht.c +++ b/src/cadet/gnunet-service-cadet_dht.c | |||
@@ -206,17 +206,18 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
206 | * Periodically announce self id in the DHT | 206 | * Periodically announce self id in the DHT |
207 | * | 207 | * |
208 | * @param cls closure | 208 | * @param cls closure |
209 | * @param tc task context | ||
210 | */ | 209 | */ |
211 | static void | 210 | static void |
212 | announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 211 | announce_id (void *cls) |
213 | { | 212 | { |
214 | struct GNUNET_HashCode phash; | 213 | struct GNUNET_HashCode phash; |
215 | const struct GNUNET_HELLO_Message *hello; | 214 | const struct GNUNET_HELLO_Message *hello; |
216 | size_t size; | 215 | size_t size; |
217 | struct GNUNET_TIME_Absolute expiration; | 216 | struct GNUNET_TIME_Absolute expiration; |
218 | struct GNUNET_TIME_Relative retry_time; | 217 | struct GNUNET_TIME_Relative retry_time; |
218 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
219 | 219 | ||
220 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
220 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 221 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
221 | { | 222 | { |
222 | announce_id_task = NULL; | 223 | announce_id_task = NULL; |
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 594c35701..51af04527 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -841,14 +841,15 @@ is_searching (const struct CadetPeer *peer) | |||
841 | * @brief Start a search for a peer. | 841 | * @brief Start a search for a peer. |
842 | * | 842 | * |
843 | * @param cls Closure (Peer to search for). | 843 | * @param cls Closure (Peer to search for). |
844 | * @param tc Task context. | ||
845 | */ | 844 | */ |
846 | static void | 845 | static void |
847 | delayed_search (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 846 | delayed_search (void *cls) |
848 | { | 847 | { |
849 | struct CadetPeer *peer = cls; | 848 | struct CadetPeer *peer = cls; |
849 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
850 | 850 | ||
851 | peer->search_delayed = NULL; | 851 | peer->search_delayed = NULL; |
852 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
852 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 853 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
853 | return; | 854 | return; |
854 | GCC_check_connections (); | 855 | GCC_check_connections (); |
@@ -1955,11 +1956,9 @@ GCP_get_short (const GNUNET_PEER_Id peer, int create) | |||
1955 | * Marks the operation as finished. | 1956 | * Marks the operation as finished. |
1956 | * | 1957 | * |
1957 | * @param cls Closure (our `struct CadetPeer`). | 1958 | * @param cls Closure (our `struct CadetPeer`). |
1958 | * @param tc TaskContext. | ||
1959 | */ | 1959 | */ |
1960 | static void | 1960 | static void |
1961 | hello_offer_done (void *cls, | 1961 | hello_offer_done (void *cls) |
1962 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1963 | { | 1962 | { |
1964 | struct CadetPeer *peer = cls; | 1963 | struct CadetPeer *peer = cls; |
1965 | 1964 | ||
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index 67c2ad5fa..73bd28643 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c | |||
@@ -1730,15 +1730,15 @@ create_kx_ctx (struct CadetTunnel *t) | |||
1730 | * @brief Finish the Key eXchange and destroy the old keys. | 1730 | * @brief Finish the Key eXchange and destroy the old keys. |
1731 | * | 1731 | * |
1732 | * @param cls Closure (Tunnel for which to finish the KX). | 1732 | * @param cls Closure (Tunnel for which to finish the KX). |
1733 | * @param tc Task context. | ||
1734 | */ | 1733 | */ |
1735 | static void | 1734 | static void |
1736 | finish_kx (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1735 | finish_kx (void *cls) |
1737 | { | 1736 | { |
1738 | struct CadetTunnel *t = cls; | 1737 | struct CadetTunnel *t = cls; |
1738 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1739 | 1739 | ||
1740 | LOG (GNUNET_ERROR_TYPE_INFO, "finish KX for %s\n", GCT_2s (t)); | 1740 | LOG (GNUNET_ERROR_TYPE_INFO, "finish KX for %s\n", GCT_2s (t)); |
1741 | 1741 | tc = GNUNET_SCHEDULER_get_task_context (); | |
1742 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1742 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1743 | { | 1743 | { |
1744 | LOG (GNUNET_ERROR_TYPE_INFO, " shutdown\n"); | 1744 | LOG (GNUNET_ERROR_TYPE_INFO, " shutdown\n"); |
@@ -2098,15 +2098,15 @@ send_queued_data (struct CadetTunnel *t) | |||
2098 | * @brief Resend the AX KX until we complete the handshake. | 2098 | * @brief Resend the AX KX until we complete the handshake. |
2099 | * | 2099 | * |
2100 | * @param cls Closure (tunnel). | 2100 | * @param cls Closure (tunnel). |
2101 | * @param tc Task context. | ||
2102 | */ | 2101 | */ |
2103 | static void | 2102 | static void |
2104 | ax_kx_resend (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 2103 | ax_kx_resend (void *cls) |
2105 | { | 2104 | { |
2106 | struct CadetTunnel *t = cls; | 2105 | struct CadetTunnel *t = cls; |
2106 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
2107 | 2107 | ||
2108 | t->rekey_task = NULL; | 2108 | t->rekey_task = NULL; |
2109 | 2109 | tc = GNUNET_SCHEDULER_get_task_context (); | |
2110 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 2110 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
2111 | return; | 2111 | return; |
2112 | 2112 | ||
@@ -2328,16 +2328,16 @@ send_pong (struct CadetTunnel *t, uint32_t challenge) | |||
2328 | * Initiate a rekey with the remote peer. | 2328 | * Initiate a rekey with the remote peer. |
2329 | * | 2329 | * |
2330 | * @param cls Closure (tunnel). | 2330 | * @param cls Closure (tunnel). |
2331 | * @param tc TaskContext. | ||
2332 | */ | 2331 | */ |
2333 | static void | 2332 | static void |
2334 | rekey_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 2333 | rekey_tunnel (void *cls) |
2335 | { | 2334 | { |
2336 | struct CadetTunnel *t = cls; | 2335 | struct CadetTunnel *t = cls; |
2336 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
2337 | 2337 | ||
2338 | t->rekey_task = NULL; | 2338 | t->rekey_task = NULL; |
2339 | |||
2340 | LOG (GNUNET_ERROR_TYPE_INFO, "Re-key Tunnel %s\n", GCT_2s (t)); | 2339 | LOG (GNUNET_ERROR_TYPE_INFO, "Re-key Tunnel %s\n", GCT_2s (t)); |
2340 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
2341 | if (NULL != tc && 0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 2341 | if (NULL != tc && 0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
2342 | return; | 2342 | return; |
2343 | 2343 | ||
@@ -2447,16 +2447,16 @@ rekey_iterator (void *cls, | |||
2447 | * Create a new ephemeral key and key message, schedule next rekeying. | 2447 | * Create a new ephemeral key and key message, schedule next rekeying. |
2448 | * | 2448 | * |
2449 | * @param cls Closure (unused). | 2449 | * @param cls Closure (unused). |
2450 | * @param tc TaskContext. | ||
2451 | */ | 2450 | */ |
2452 | static void | 2451 | static void |
2453 | global_otr_rekey (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 2452 | global_otr_rekey (void *cls) |
2454 | { | 2453 | { |
2455 | struct GNUNET_TIME_Absolute time; | 2454 | struct GNUNET_TIME_Absolute time; |
2456 | long n; | 2455 | long n; |
2456 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
2457 | 2457 | ||
2458 | rekey_task = NULL; | 2458 | rekey_task = NULL; |
2459 | 2459 | tc = GNUNET_SCHEDULER_get_task_context (); | |
2460 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 2460 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
2461 | return; | 2461 | return; |
2462 | 2462 | ||
@@ -2833,7 +2833,7 @@ handle_ephemeral (struct CadetTunnel *t, | |||
2833 | GNUNET_break (0); | 2833 | GNUNET_break (0); |
2834 | return; | 2834 | return; |
2835 | } | 2835 | } |
2836 | rekey_tunnel (t, NULL); | 2836 | rekey_tunnel (t); |
2837 | GNUNET_STATISTICS_update (stats, "# otr-downgrades", -1, GNUNET_NO); | 2837 | GNUNET_STATISTICS_update (stats, "# otr-downgrades", -1, GNUNET_NO); |
2838 | } | 2838 | } |
2839 | 2839 | ||
@@ -2865,7 +2865,7 @@ handle_ephemeral (struct CadetTunnel *t, | |||
2865 | } | 2865 | } |
2866 | if (NULL != t->rekey_task) | 2866 | if (NULL != t->rekey_task) |
2867 | GNUNET_SCHEDULER_cancel (t->rekey_task); | 2867 | GNUNET_SCHEDULER_cancel (t->rekey_task); |
2868 | t->rekey_task = GNUNET_SCHEDULER_add_now (rekey_tunnel, t); | 2868 | t->rekey_task = GNUNET_SCHEDULER_add_now (&rekey_tunnel, t); |
2869 | } | 2869 | } |
2870 | if (CADET_TUNNEL_KEY_SENT == t->estate) | 2870 | if (CADET_TUNNEL_KEY_SENT == t->estate) |
2871 | { | 2871 | { |
@@ -3467,15 +3467,15 @@ GCT_change_estate (struct CadetTunnel* t, enum CadetTunnelEState state) | |||
3467 | * of being created/processed. | 3467 | * of being created/processed. |
3468 | * | 3468 | * |
3469 | * @param cls Closure (Tunnel to check). | 3469 | * @param cls Closure (Tunnel to check). |
3470 | * @param tc Task context. | ||
3471 | */ | 3470 | */ |
3472 | static void | 3471 | static void |
3473 | trim_connections (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 3472 | trim_connections (void *cls) |
3474 | { | 3473 | { |
3475 | struct CadetTunnel *t = cls; | 3474 | struct CadetTunnel *t = cls; |
3475 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
3476 | 3476 | ||
3477 | t->trim_connections_task = NULL; | 3477 | t->trim_connections_task = NULL; |
3478 | 3478 | tc = GNUNET_SCHEDULER_get_task_context (); | |
3479 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 3479 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
3480 | return; | 3480 | return; |
3481 | 3481 | ||
@@ -3695,15 +3695,16 @@ GCT_get_channel (struct CadetTunnel *t, CADET_ChannelNumber chid) | |||
3695 | * the tunnel. This way we avoid a new public key handshake. | 3695 | * the tunnel. This way we avoid a new public key handshake. |
3696 | * | 3696 | * |
3697 | * @param cls Closure (tunnel to destroy). | 3697 | * @param cls Closure (tunnel to destroy). |
3698 | * @param tc Task context. | ||
3699 | */ | 3698 | */ |
3700 | static void | 3699 | static void |
3701 | delayed_destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 3700 | delayed_destroy (void *cls) |
3702 | { | 3701 | { |
3703 | struct CadetTunnel *t = cls; | 3702 | struct CadetTunnel *t = cls; |
3704 | struct CadetTConnection *iter; | 3703 | struct CadetTConnection *iter; |
3704 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
3705 | 3705 | ||
3706 | LOG (GNUNET_ERROR_TYPE_DEBUG, "delayed destroying tunnel %p\n", t); | 3706 | LOG (GNUNET_ERROR_TYPE_DEBUG, "delayed destroying tunnel %p\n", t); |
3707 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3707 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 3708 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
3708 | { | 3709 | { |
3709 | LOG (GNUNET_ERROR_TYPE_WARNING, | 3710 | LOG (GNUNET_ERROR_TYPE_WARNING, |
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index d1b1b8212..39bfc5fed 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c | |||
@@ -262,7 +262,7 @@ show_end_data (void) | |||
262 | * @param tc Task Context. | 262 | * @param tc Task Context. |
263 | */ | 263 | */ |
264 | static void | 264 | static void |
265 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 265 | shutdown_task (void *cls) |
266 | { | 266 | { |
267 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n"); | 267 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n"); |
268 | shutdown_handle = NULL; | 268 | shutdown_handle = NULL; |
@@ -276,12 +276,13 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
276 | * @param tc Task Context. | 276 | * @param tc Task Context. |
277 | */ | 277 | */ |
278 | static void | 278 | static void |
279 | disconnect_cadet_peers (void *cls, | 279 | disconnect_cadet_peers (void *cls) |
280 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
281 | { | 280 | { |
282 | long line = (long) cls; | 281 | long line = (long) cls; |
283 | unsigned int i; | 282 | unsigned int i; |
283 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
284 | 284 | ||
285 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
285 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 286 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 287 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
287 | "disconnecting cadet peers due to SHUTDOWN! called from %ld\n", | 288 | "disconnecting cadet peers due to SHUTDOWN! called from %ld\n", |
@@ -387,16 +388,16 @@ stats_iterator (void *cls, const struct GNUNET_TESTBED_Peer *peer, | |||
387 | * Task to gather all statistics. | 388 | * Task to gather all statistics. |
388 | * | 389 | * |
389 | * @param cls Closure (NULL). | 390 | * @param cls Closure (NULL). |
390 | * @param tc Task Context. | ||
391 | */ | 391 | */ |
392 | static void | 392 | static void |
393 | gather_stats_and_exit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 393 | gather_stats_and_exit (void *cls) |
394 | { | 394 | { |
395 | disconnect_task = NULL; | ||
396 | long l = (long) cls; | 395 | long l = (long) cls; |
396 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
397 | 397 | ||
398 | disconnect_task = NULL; | ||
398 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "gathering statistics from line %d\n", l); | 399 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "gathering statistics from line %d\n", l); |
399 | 400 | tc = GNUNET_SCHEDULER_get_task_context (); | |
400 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 401 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
401 | { | 402 | { |
402 | disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, | 403 | disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, |
@@ -456,18 +457,17 @@ tmt_rdy (void *cls, size_t size, void *buf); | |||
456 | * Task to request a new data transmission. | 457 | * Task to request a new data transmission. |
457 | * | 458 | * |
458 | * @param cls Closure (peer #). | 459 | * @param cls Closure (peer #). |
459 | * @param tc Task Context. | ||
460 | */ | 460 | */ |
461 | static void | 461 | static void |
462 | data_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 462 | data_task (void *cls) |
463 | { | 463 | { |
464 | struct GNUNET_CADET_Channel *channel; | 464 | struct GNUNET_CADET_Channel *channel; |
465 | static struct GNUNET_CADET_TransmitHandle **pth; | 465 | static struct GNUNET_CADET_TransmitHandle **pth; |
466 | 466 | const struct GNUNET_SCHEDULER_TaskContext *tc; | |
467 | long src; | 467 | long src; |
468 | 468 | ||
469 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Data task\n"); | 469 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Data task\n"); |
470 | 470 | tc = GNUNET_SCHEDULER_get_task_context (); | |
471 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 471 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
472 | return; | 472 | return; |
473 | 473 | ||
@@ -837,13 +837,14 @@ channel_cleaner (void *cls, const struct GNUNET_CADET_Channel *channel, | |||
837 | * on callback function ch. | 837 | * on callback function ch. |
838 | * | 838 | * |
839 | * @param cls Closure (unused). | 839 | * @param cls Closure (unused). |
840 | * @param tc Task Context. | ||
841 | */ | 840 | */ |
842 | static void | 841 | static void |
843 | do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 842 | do_test (void *cls) |
844 | { | 843 | { |
845 | enum GNUNET_CADET_ChannelOption flags; | 844 | enum GNUNET_CADET_ChannelOption flags; |
845 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
846 | 846 | ||
847 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
847 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 848 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
848 | return; | 849 | return; |
849 | 850 | ||
@@ -1084,4 +1085,3 @@ main (int argc, char *argv[]) | |||
1084 | } | 1085 | } |
1085 | 1086 | ||
1086 | /* end of test_cadet.c */ | 1087 | /* end of test_cadet.c */ |
1087 | |||
diff --git a/src/cadet/test_cadet_local.c b/src/cadet/test_cadet_local.c index ef6882961..42663b146 100644 --- a/src/cadet/test_cadet_local.c +++ b/src/cadet/test_cadet_local.c | |||
@@ -53,17 +53,16 @@ static struct GNUNET_CADET_TransmitHandle *mth; | |||
53 | * Connect to other client and send data | 53 | * Connect to other client and send data |
54 | * | 54 | * |
55 | * @param cls Closue (unused). | 55 | * @param cls Closue (unused). |
56 | * @param tc TaskContext. | ||
57 | */ | 56 | */ |
58 | static void | 57 | static void |
59 | do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 58 | do_connect (void *cls); |
60 | 59 | ||
61 | 60 | ||
62 | /** | 61 | /** |
63 | * Shutdown nicely | 62 | * Shutdown nicely |
64 | */ | 63 | */ |
65 | static void | 64 | static void |
66 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | do_shutdown (void *cls) |
67 | { | 66 | { |
68 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutdown\n"); | 67 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutdown\n"); |
69 | if (NULL != abort_task) | 68 | if (NULL != abort_task) |
@@ -91,7 +90,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
91 | * Something went wrong and timed out. Kill everything and set error flag | 90 | * Something went wrong and timed out. Kill everything and set error flag |
92 | */ | 91 | */ |
93 | static void | 92 | static void |
94 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 93 | do_abort (void *cls) |
95 | { | 94 | { |
96 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ABORT\n"); | 95 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ABORT\n"); |
97 | result = GNUNET_SYSERR; | 96 | result = GNUNET_SYSERR; |
@@ -101,7 +100,7 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
101 | GNUNET_SCHEDULER_cancel (shutdown_task); | 100 | GNUNET_SCHEDULER_cancel (shutdown_task); |
102 | shutdown_task = NULL; | 101 | shutdown_task = NULL; |
103 | } | 102 | } |
104 | do_shutdown (cls, tc); | 103 | do_shutdown (cls); |
105 | } | 104 | } |
106 | 105 | ||
107 | 106 | ||
@@ -126,7 +125,8 @@ data_callback (void *cls, struct GNUNET_CADET_Channel *channel, | |||
126 | if (NULL != shutdown_task) | 125 | if (NULL != shutdown_task) |
127 | GNUNET_SCHEDULER_cancel (shutdown_task); | 126 | GNUNET_SCHEDULER_cancel (shutdown_task); |
128 | shutdown_task = | 127 | shutdown_task = |
129 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, | 128 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
129 | &do_shutdown, | ||
130 | NULL); | 130 | NULL); |
131 | GNUNET_CADET_receive_done (channel); | 131 | GNUNET_CADET_receive_done (channel); |
132 | return GNUNET_OK; | 132 | return GNUNET_OK; |
@@ -146,9 +146,11 @@ data_callback (void *cls, struct GNUNET_CADET_Channel *channel, | |||
146 | * (can be NULL -- that's not an error) | 146 | * (can be NULL -- that's not an error) |
147 | */ | 147 | */ |
148 | static void * | 148 | static void * |
149 | inbound_channel (void *cls, struct GNUNET_CADET_Channel *channel, | 149 | inbound_channel (void *cls, |
150 | const struct GNUNET_PeerIdentity *initiator, | 150 | struct GNUNET_CADET_Channel *channel, |
151 | uint32_t port, enum GNUNET_CADET_ChannelOption options) | 151 | const struct GNUNET_PeerIdentity *initiator, |
152 | uint32_t port, | ||
153 | enum GNUNET_CADET_ChannelOption options) | ||
152 | { | 154 | { |
153 | long id = (long) cls; | 155 | long id = (long) cls; |
154 | 156 | ||
@@ -247,13 +249,14 @@ do_send (void *cls, size_t size, void *buf) | |||
247 | * Connect to other client and send data | 249 | * Connect to other client and send data |
248 | * | 250 | * |
249 | * @param cls Closue (unused). | 251 | * @param cls Closue (unused). |
250 | * @param tc TaskContext. | ||
251 | */ | 252 | */ |
252 | static void | 253 | static void |
253 | do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 254 | do_connect (void *cls) |
254 | { | 255 | { |
255 | struct GNUNET_PeerIdentity id; | 256 | struct GNUNET_PeerIdentity id; |
257 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
256 | 258 | ||
259 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
257 | if (NULL != tc && 0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 260 | if (NULL != tc && 0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
258 | return; | 261 | return; |
259 | 262 | ||
diff --git a/src/cadet/test_cadet_single.c b/src/cadet/test_cadet_single.c index d5c19ac01..93a50c02c 100644 --- a/src/cadet/test_cadet_single.c +++ b/src/cadet/test_cadet_single.c | |||
@@ -59,7 +59,7 @@ do_send (void *cls, size_t size, void *buf); | |||
59 | * Shutdown nicely | 59 | * Shutdown nicely |
60 | */ | 60 | */ |
61 | static void | 61 | static void |
62 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 62 | do_shutdown (void *cls) |
63 | { | 63 | { |
64 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutdown\n"); | 64 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutdown\n"); |
65 | if (NULL != abort_task) | 65 | if (NULL != abort_task) |
@@ -88,7 +88,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
88 | * Something went wrong and timed out. Kill everything and set error flag | 88 | * Something went wrong and timed out. Kill everything and set error flag |
89 | */ | 89 | */ |
90 | static void | 90 | static void |
91 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 91 | do_abort (void *cls) |
92 | { | 92 | { |
93 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ABORT\n"); | 93 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ABORT\n"); |
94 | result = GNUNET_SYSERR; | 94 | result = GNUNET_SYSERR; |
@@ -98,7 +98,7 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
98 | GNUNET_SCHEDULER_cancel (shutdown_task); | 98 | GNUNET_SCHEDULER_cancel (shutdown_task); |
99 | shutdown_task = NULL; | 99 | shutdown_task = NULL; |
100 | } | 100 | } |
101 | do_shutdown (cls, tc); | 101 | do_shutdown (cls); |
102 | } | 102 | } |
103 | 103 | ||
104 | 104 | ||
@@ -247,14 +247,15 @@ do_send (void *cls, size_t size, void *buf) | |||
247 | * Connect to other client and send data | 247 | * Connect to other client and send data |
248 | * | 248 | * |
249 | * @param cls Closue (unused). | 249 | * @param cls Closue (unused). |
250 | * @param tc TaskContext. | ||
251 | */ | 250 | */ |
252 | static void | 251 | static void |
253 | do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 252 | do_connect (void *cls) |
254 | { | 253 | { |
255 | struct GNUNET_PeerIdentity id; | 254 | struct GNUNET_PeerIdentity id; |
256 | size_t size = sizeof (struct GNUNET_MessageHeader) + DATA_SIZE; | 255 | size_t size = sizeof (struct GNUNET_MessageHeader) + DATA_SIZE; |
256 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
257 | 257 | ||
258 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
258 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 259 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
259 | return; | 260 | return; |
260 | 261 | ||
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c index 355ae60a3..4af7740e7 100644 --- a/src/consensus/gnunet-consensus-profiler.c +++ b/src/consensus/gnunet-consensus-profiler.c | |||
@@ -120,8 +120,8 @@ statistics_done_db (void *cls, | |||
120 | * @param subsystem name of subsystem that created the statistic | 120 | * @param subsystem name of subsystem that created the statistic |
121 | * @param name the name of the datum | 121 | * @param name the name of the datum |
122 | * @param value the current value | 122 | * @param value the current value |
123 | * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not | 123 | * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if not |
124 | * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration | 124 | * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration |
125 | */ | 125 | */ |
126 | static int | 126 | static int |
127 | statistics_cb (void *cls, | 127 | statistics_cb (void *cls, |
@@ -140,7 +140,7 @@ statistics_cb (void *cls, | |||
140 | 140 | ||
141 | 141 | ||
142 | static void | 142 | static void |
143 | destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *ctx) | 143 | destroy (void *cls) |
144 | { | 144 | { |
145 | struct GNUNET_CONSENSUS_Handle *consensus = cls; | 145 | struct GNUNET_CONSENSUS_Handle *consensus = cls; |
146 | 146 | ||
@@ -521,4 +521,3 @@ main (int argc, char **argv) | |||
521 | options, &run, NULL, GNUNET_YES); | 521 | options, &run, NULL, GNUNET_YES); |
522 | return 0; | 522 | return 0; |
523 | } | 523 | } |
524 | |||
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c index e8385a6bb..82b05d136 100644 --- a/src/consensus/gnunet-service-consensus.c +++ b/src/consensus/gnunet-service-consensus.c | |||
@@ -3169,11 +3169,9 @@ client_conclude (void *cls, | |||
3169 | * Called to clean up, after a shutdown has been requested. | 3169 | * Called to clean up, after a shutdown has been requested. |
3170 | * | 3170 | * |
3171 | * @param cls closure | 3171 | * @param cls closure |
3172 | * @param tc context information (why was this task triggered now) | ||
3173 | */ | 3172 | */ |
3174 | static void | 3173 | static void |
3175 | shutdown_task (void *cls, | 3174 | shutdown_task (void *cls) |
3176 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3177 | { | 3175 | { |
3178 | while (NULL != sessions_head) | 3176 | while (NULL != sessions_head) |
3179 | destroy_session (sessions_head); | 3177 | destroy_session (sessions_head); |
diff --git a/src/consensus/test_consensus_api.c b/src/consensus/test_consensus_api.c index 18c5b3b31..0073267f8 100644 --- a/src/consensus/test_consensus_api.c +++ b/src/consensus/test_consensus_api.c | |||
@@ -67,11 +67,9 @@ insert_done (void *cls, int success) | |||
67 | * Signature of the main function of a task. | 67 | * Signature of the main function of a task. |
68 | * | 68 | * |
69 | * @param cls closure | 69 | * @param cls closure |
70 | * @param tc context information (why was this task triggered now) | ||
71 | */ | 70 | */ |
72 | static void | 71 | static void |
73 | on_shutdown (void *cls, | 72 | on_shutdown (void *cls) |
74 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
75 | { | 73 | { |
76 | if (NULL != consensus) | 74 | if (NULL != consensus) |
77 | { | 75 | { |
@@ -121,4 +119,3 @@ main (int argc, char **argv) | |||
121 | &run, NULL); | 119 | &run, NULL); |
122 | return ret; | 120 | return ret; |
123 | } | 121 | } |
124 | |||
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c index 1c8fe74e6..fe6eae925 100644 --- a/src/conversation/gnunet-conversation-test.c +++ b/src/conversation/gnunet-conversation-test.c | |||
@@ -96,11 +96,9 @@ static struct Recording *rec_tail; | |||
96 | * Terminate test. | 96 | * Terminate test. |
97 | * | 97 | * |
98 | * @param cls NULL | 98 | * @param cls NULL |
99 | * @param tc unused | ||
100 | */ | 99 | */ |
101 | static void | 100 | static void |
102 | do_shutdown (void *cls, | 101 | do_shutdown (void *cls) |
103 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
104 | { | 102 | { |
105 | struct Recording *rec; | 103 | struct Recording *rec; |
106 | 104 | ||
@@ -126,11 +124,9 @@ do_shutdown (void *cls, | |||
126 | * Terminate recording process and switch to playback. | 124 | * Terminate recording process and switch to playback. |
127 | * | 125 | * |
128 | * @param cls NULL | 126 | * @param cls NULL |
129 | * @param tc unused | ||
130 | */ | 127 | */ |
131 | static void | 128 | static void |
132 | switch_to_speaker (void *cls, | 129 | switch_to_speaker (void *cls) |
133 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
134 | { | 130 | { |
135 | struct Recording *rec; | 131 | struct Recording *rec; |
136 | 132 | ||
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c index 3b50c8043..9000bcf3f 100644 --- a/src/conversation/gnunet-conversation.c +++ b/src/conversation/gnunet-conversation.c | |||
@@ -1020,11 +1020,9 @@ do_help (const char *args) | |||
1020 | * Task run during shutdown. | 1020 | * Task run during shutdown. |
1021 | * | 1021 | * |
1022 | * @param cls NULL | 1022 | * @param cls NULL |
1023 | * @param tc unused | ||
1024 | */ | 1023 | */ |
1025 | static void | 1024 | static void |
1026 | do_stop_task (void *cls, | 1025 | do_stop_task (void *cls) |
1027 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1028 | { | 1026 | { |
1029 | #ifdef WINDOWS | 1027 | #ifdef WINDOWS |
1030 | if (NULL != stdin_hlp) | 1028 | if (NULL != stdin_hlp) |
@@ -1132,11 +1130,9 @@ console_reader_chars (void *cls, | |||
1132 | * Task to handle commands from the terminal. | 1130 | * Task to handle commands from the terminal. |
1133 | * | 1131 | * |
1134 | * @param cls NULL | 1132 | * @param cls NULL |
1135 | * @param tc scheduler context | ||
1136 | */ | 1133 | */ |
1137 | static void | 1134 | static void |
1138 | handle_command (void *cls, | 1135 | handle_command (void *cls) |
1139 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1140 | { | 1136 | { |
1141 | char message[MAX_MESSAGE_LENGTH + 1]; | 1137 | char message[MAX_MESSAGE_LENGTH + 1]; |
1142 | 1138 | ||
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 8761ed5e1..fdaa2999c 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c | |||
@@ -1463,11 +1463,9 @@ handle_client_disconnect (void *cls, | |||
1463 | * Shutdown nicely | 1463 | * Shutdown nicely |
1464 | * | 1464 | * |
1465 | * @param cls closure, NULL | 1465 | * @param cls closure, NULL |
1466 | * @param tc the task context | ||
1467 | */ | 1466 | */ |
1468 | static void | 1467 | static void |
1469 | do_shutdown (void *cls, | 1468 | do_shutdown (void *cls) |
1470 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1471 | { | 1469 | { |
1472 | struct Line *line; | 1470 | struct Line *line; |
1473 | struct Channel *ch; | 1471 | struct Channel *ch; |
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c index 317818c8e..f8159115b 100644 --- a/src/conversation/test_conversation_api.c +++ b/src/conversation/test_conversation_api.c | |||
@@ -73,8 +73,7 @@ static struct GNUNET_SCHEDULER_Task * call_task; | |||
73 | 73 | ||
74 | 74 | ||
75 | static void | 75 | static void |
76 | phone_send (void *cls, | 76 | phone_send (void *cls) |
77 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
78 | { | 77 | { |
79 | static unsigned int i; | 78 | static unsigned int i; |
80 | char buf[32]; | 79 | char buf[32]; |
@@ -88,8 +87,7 @@ phone_send (void *cls, | |||
88 | 87 | ||
89 | 88 | ||
90 | static void | 89 | static void |
91 | call_send (void *cls, | 90 | call_send (void *cls) |
92 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
93 | { | 91 | { |
94 | static unsigned int i; | 92 | static unsigned int i; |
95 | char buf[32]; | 93 | char buf[32]; |
@@ -272,10 +270,9 @@ static struct GNUNET_MICROPHONE_Handle phone_mic = { | |||
272 | * Signature of the main function of a task. | 270 | * Signature of the main function of a task. |
273 | * | 271 | * |
274 | * @param cls closure | 272 | * @param cls closure |
275 | * @param tc context information (why was this task triggered now) | ||
276 | */ | 273 | */ |
277 | static void | 274 | static void |
278 | end_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 275 | end_test (void *cls) |
279 | { | 276 | { |
280 | GNUNET_SCHEDULER_shutdown (); | 277 | GNUNET_SCHEDULER_shutdown (); |
281 | if (NULL != op) | 278 | if (NULL != op) |
diff --git a/src/conversation/test_conversation_api_reject.c b/src/conversation/test_conversation_api_reject.c index 13dfcd3d5..5f1f836f7 100644 --- a/src/conversation/test_conversation_api_reject.c +++ b/src/conversation/test_conversation_api_reject.c | |||
@@ -130,10 +130,9 @@ static struct GNUNET_MICROPHONE_Handle call_mic = { | |||
130 | * Signature of the main function of a task. | 130 | * Signature of the main function of a task. |
131 | * | 131 | * |
132 | * @param cls closure | 132 | * @param cls closure |
133 | * @param tc context information (why was this task triggered now) | ||
134 | */ | 133 | */ |
135 | static void | 134 | static void |
136 | end_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 135 | end_test (void *cls) |
137 | { | 136 | { |
138 | GNUNET_SCHEDULER_shutdown (); | 137 | GNUNET_SCHEDULER_shutdown (); |
139 | if (NULL != op) | 138 | if (NULL != op) |
diff --git a/src/conversation/test_conversation_api_twocalls.c b/src/conversation/test_conversation_api_twocalls.c index 5d7e56d95..17a12eb4f 100644 --- a/src/conversation/test_conversation_api_twocalls.c +++ b/src/conversation/test_conversation_api_twocalls.c | |||
@@ -124,8 +124,7 @@ static struct MicContext call2_mic_ctx; | |||
124 | 124 | ||
125 | 125 | ||
126 | static void | 126 | static void |
127 | phone_send (void *cls, | 127 | phone_send (void *cls) |
128 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
129 | { | 128 | { |
130 | char buf[32]; | 129 | char buf[32]; |
131 | 130 | ||
@@ -138,8 +137,7 @@ phone_send (void *cls, | |||
138 | 137 | ||
139 | 138 | ||
140 | static void | 139 | static void |
141 | call_send (void *cls, | 140 | call_send (void *cls) |
142 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
143 | { | 141 | { |
144 | struct MicContext *mc = cls; | 142 | struct MicContext *mc = cls; |
145 | char buf[32]; | 143 | char buf[32]; |
@@ -343,10 +341,9 @@ static struct GNUNET_MICROPHONE_Handle phone_mic = { | |||
343 | * Signature of the main function of a task. | 341 | * Signature of the main function of a task. |
344 | * | 342 | * |
345 | * @param cls closure | 343 | * @param cls closure |
346 | * @param tc context information (why was this task triggered now) | ||
347 | */ | 344 | */ |
348 | static void | 345 | static void |
349 | end_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 346 | end_test (void *cls) |
350 | { | 347 | { |
351 | GNUNET_SCHEDULER_shutdown (); | 348 | GNUNET_SCHEDULER_shutdown (); |
352 | if (NULL != op) | 349 | if (NULL != op) |
diff --git a/src/core/core_api.c b/src/core/core_api.c index 20f0acc09..7b423b6a0 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -339,8 +339,7 @@ reconnect (struct GNUNET_CORE_Handle *h); | |||
339 | * @param tc task context | 339 | * @param tc task context |
340 | */ | 340 | */ |
341 | static void | 341 | static void |
342 | reconnect_task (void *cls, | 342 | reconnect_task (void *cls) |
343 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
344 | { | 343 | { |
345 | struct GNUNET_CORE_Handle *h = cls; | 344 | struct GNUNET_CORE_Handle *h = cls; |
346 | 345 | ||
@@ -1214,11 +1213,9 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle) | |||
1214 | * Task that calls #request_next_transmission(). | 1213 | * Task that calls #request_next_transmission(). |
1215 | * | 1214 | * |
1216 | * @param cls the `struct PeerRecord *` | 1215 | * @param cls the `struct PeerRecord *` |
1217 | * @param tc scheduler context | ||
1218 | */ | 1216 | */ |
1219 | static void | 1217 | static void |
1220 | run_request_next_transmission (void *cls, | 1218 | run_request_next_transmission (void *cls) |
1221 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1222 | { | 1219 | { |
1223 | struct PeerRecord *pr = cls; | 1220 | struct PeerRecord *pr = cls; |
1224 | 1221 | ||
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c index c70d49bb7..968072e22 100644 --- a/src/core/gnunet-core.c +++ b/src/core/gnunet-core.c | |||
@@ -44,11 +44,9 @@ static struct GNUNET_CORE_MonitorHandle *mh; | |||
44 | * Stops monitoring activity. | 44 | * Stops monitoring activity. |
45 | * | 45 | * |
46 | * @param cls NULL | 46 | * @param cls NULL |
47 | * @param tc scheduler context | ||
48 | */ | 47 | */ |
49 | static void | 48 | static void |
50 | shutdown_task (void *cls, | 49 | shutdown_task (void *cls) |
51 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
52 | { | 50 | { |
53 | if (NULL != mh) | 51 | if (NULL != mh) |
54 | { | 52 | { |
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 83942d9ab..1d9de8666 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -60,12 +60,12 @@ static struct GNUNET_SERVER_Handle *GSC_server; | |||
60 | * the transport. | 60 | * the transport. |
61 | * | 61 | * |
62 | * @param cls NULL, unused | 62 | * @param cls NULL, unused |
63 | * @param tc scheduler context, unused | ||
64 | */ | 63 | */ |
65 | static void | 64 | static void |
66 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | shutdown_task (void *cls) |
67 | { | 66 | { |
68 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Core service shutting down.\n"); | 67 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
68 | "Core service shutting down.\n"); | ||
69 | GSC_CLIENTS_done (); | 69 | GSC_CLIENTS_done (); |
70 | GSC_NEIGHBOURS_done (); | 70 | GSC_NEIGHBOURS_done (); |
71 | GSC_SESSIONS_done (); | 71 | GSC_SESSIONS_done (); |
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 988c5790a..8250bcc6f 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c | |||
@@ -659,11 +659,9 @@ send_key (struct GSC_KeyExchangeInfo *kx); | |||
659 | * Task that will retry #send_key() if our previous attempt failed. | 659 | * Task that will retry #send_key() if our previous attempt failed. |
660 | * | 660 | * |
661 | * @param cls our `struct GSC_KeyExchangeInfo` | 661 | * @param cls our `struct GSC_KeyExchangeInfo` |
662 | * @param tc scheduler context | ||
663 | */ | 662 | */ |
664 | static void | 663 | static void |
665 | set_key_retry_task (void *cls, | 664 | set_key_retry_task (void *cls) |
666 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
667 | { | 665 | { |
668 | struct GSC_KeyExchangeInfo *kx = cls; | 666 | struct GSC_KeyExchangeInfo *kx = cls; |
669 | 667 | ||
@@ -1104,11 +1102,9 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx, | |||
1104 | * (and we should prevent this by sending a PING). | 1102 | * (and we should prevent this by sending a PING). |
1105 | * | 1103 | * |
1106 | * @param cls the `struct GSC_KeyExchangeInfo` | 1104 | * @param cls the `struct GSC_KeyExchangeInfo` |
1107 | * @param tc scheduler context (not used) | ||
1108 | */ | 1105 | */ |
1109 | static void | 1106 | static void |
1110 | send_keep_alive (void *cls, | 1107 | send_keep_alive (void *cls) |
1111 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1112 | { | 1108 | { |
1113 | struct GSC_KeyExchangeInfo *kx = cls; | 1109 | struct GSC_KeyExchangeInfo *kx = cls; |
1114 | struct GNUNET_TIME_Relative retry; | 1110 | struct GNUNET_TIME_Relative retry; |
@@ -1698,11 +1694,9 @@ sign_ephemeral_key () | |||
1698 | * Task run to trigger rekeying. | 1694 | * Task run to trigger rekeying. |
1699 | * | 1695 | * |
1700 | * @param cls closure, NULL | 1696 | * @param cls closure, NULL |
1701 | * @param tc scheduler context | ||
1702 | */ | 1697 | */ |
1703 | static void | 1698 | static void |
1704 | do_rekey (void *cls, | 1699 | do_rekey (void *cls) |
1705 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1706 | { | 1700 | { |
1707 | struct GSC_KeyExchangeInfo *pos; | 1701 | struct GSC_KeyExchangeInfo *pos; |
1708 | 1702 | ||
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index 78ab8027e..890499394 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c | |||
@@ -264,11 +264,9 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid) | |||
264 | * (Done periodically until the typemap is confirmed). | 264 | * (Done periodically until the typemap is confirmed). |
265 | * | 265 | * |
266 | * @param cls the `struct Session *` | 266 | * @param cls the `struct Session *` |
267 | * @param tc unused | ||
268 | */ | 267 | */ |
269 | static void | 268 | static void |
270 | transmit_typemap_task (void *cls, | 269 | transmit_typemap_task (void *cls) |
271 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
272 | { | 270 | { |
273 | struct Session *session = cls; | 271 | struct Session *session = cls; |
274 | struct GNUNET_MessageHeader *hdr; | 272 | struct GNUNET_MessageHeader *hdr; |
@@ -589,11 +587,9 @@ solicit_messages (struct Session *session, | |||
589 | * Send them now. | 587 | * Send them now. |
590 | * | 588 | * |
591 | * @param cls `struct Session` with the messages to transmit now | 589 | * @param cls `struct Session` with the messages to transmit now |
592 | * @param tc scheduler context (unused) | ||
593 | */ | 590 | */ |
594 | static void | 591 | static void |
595 | pop_cork_task (void *cls, | 592 | pop_cork_task (void *cls) |
596 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
597 | { | 593 | { |
598 | struct Session *session = cls; | 594 | struct Session *session = cls; |
599 | 595 | ||
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 973b97bff..92ee038da 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -99,8 +99,7 @@ terminate_peer (struct PeerContext *p) | |||
99 | 99 | ||
100 | 100 | ||
101 | static void | 101 | static void |
102 | terminate_task (void *cls, | 102 | terminate_task (void *cls) |
103 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
104 | { | 103 | { |
105 | GNUNET_assert (ok == 6); | 104 | GNUNET_assert (ok == 6); |
106 | terminate_peer (&p1); | 105 | terminate_peer (&p1); |
@@ -110,8 +109,7 @@ terminate_task (void *cls, | |||
110 | 109 | ||
111 | 110 | ||
112 | static void | 111 | static void |
113 | terminate_task_error (void *cls, | 112 | terminate_task_error (void *cls) |
114 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
115 | { | 113 | { |
116 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
117 | "ENDING ANGRILY %u\n", | 115 | "ENDING ANGRILY %u\n", |
diff --git a/src/core/test_core_api_mq.c b/src/core/test_core_api_mq.c index 3b063afca..a82465e74 100644 --- a/src/core/test_core_api_mq.c +++ b/src/core/test_core_api_mq.c | |||
@@ -96,8 +96,7 @@ handle_test (void *cls, | |||
96 | 96 | ||
97 | 97 | ||
98 | static void | 98 | static void |
99 | shutdown_task (void *cls, | 99 | shutdown_task (void *cls) |
100 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
101 | { | 100 | { |
102 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); | 101 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); |
103 | GNUNET_MQ_destroy (mq); | 102 | GNUNET_MQ_destroy (mq); |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 5951e6c84..49affdff3 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -128,8 +128,7 @@ terminate_peer (struct PeerContext *p) | |||
128 | 128 | ||
129 | 129 | ||
130 | static void | 130 | static void |
131 | terminate_task (void *cls, | 131 | terminate_task (void *cls) |
132 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
133 | { | 132 | { |
134 | unsigned long long delta; | 133 | unsigned long long delta; |
135 | 134 | ||
@@ -146,8 +145,7 @@ terminate_task (void *cls, | |||
146 | 145 | ||
147 | 146 | ||
148 | static void | 147 | static void |
149 | terminate_task_error (void *cls, | 148 | terminate_task_error (void *cls) |
150 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
151 | { | 149 | { |
152 | GNUNET_break (0); | 150 | GNUNET_break (0); |
153 | terminate_peer (&p1); | 151 | terminate_peer (&p1); |
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c index 4b1a94cea..54dd29ca8 100644 --- a/src/core/test_core_api_send_to_self.c +++ b/src/core/test_core_api_send_to_self.c | |||
@@ -55,7 +55,7 @@ struct GNUNET_CORE_Handle *core; | |||
55 | * Function scheduled as very last function, cleans up after us | 55 | * Function scheduled as very last function, cleans up after us |
56 | */ | 56 | */ |
57 | static void | 57 | static void |
58 | cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tskctx) | 58 | cleanup (void *cls) |
59 | { | 59 | { |
60 | die_task = NULL; | 60 | die_task = NULL; |
61 | 61 | ||
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index 3cd777936..42bf4e452 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -92,7 +92,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
92 | 92 | ||
93 | 93 | ||
94 | static void | 94 | static void |
95 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 95 | shutdown_task (void *cls) |
96 | { | 96 | { |
97 | GNUNET_CORE_disconnect (p1.ch); | 97 | GNUNET_CORE_disconnect (p1.ch); |
98 | p1.ch = NULL; | 98 | p1.ch = NULL; |
@@ -144,7 +144,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
144 | 144 | ||
145 | 145 | ||
146 | static void | 146 | static void |
147 | timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 147 | timeout_task (void *cls) |
148 | { | 148 | { |
149 | FPRINTF (stderr, "%s", "Timeout.\n"); | 149 | FPRINTF (stderr, "%s", "Timeout.\n"); |
150 | if (p1.ch != NULL) | 150 | if (p1.ch != NULL) |
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; |
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index cca67f6bc..832829e24 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -278,11 +278,9 @@ GNUNET_DATASTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
278 | * Task used by 'transmit_drop' to disconnect the datastore. | 278 | * Task used by 'transmit_drop' to disconnect the datastore. |
279 | * | 279 | * |
280 | * @param cls the datastore handle | 280 | * @param cls the datastore handle |
281 | * @param tc scheduler context | ||
282 | */ | 281 | */ |
283 | static void | 282 | static void |
284 | disconnect_after_drop (void *cls, | 283 | disconnect_after_drop (void *cls) |
285 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
286 | { | 284 | { |
287 | struct GNUNET_DATASTORE_Handle *h = cls; | 285 | struct GNUNET_DATASTORE_Handle *h = cls; |
288 | 286 | ||
@@ -383,10 +381,9 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, | |||
383 | * A request has timed out (before being transmitted to the service). | 381 | * A request has timed out (before being transmitted to the service). |
384 | * | 382 | * |
385 | * @param cls the `struct GNUNET_DATASTORE_QueueEntry` | 383 | * @param cls the `struct GNUNET_DATASTORE_QueueEntry` |
386 | * @param tc scheduler context | ||
387 | */ | 384 | */ |
388 | static void | 385 | static void |
389 | timeout_queue_entry (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 386 | timeout_queue_entry (void *cls) |
390 | { | 387 | { |
391 | struct GNUNET_DATASTORE_QueueEntry *qe = cls; | 388 | struct GNUNET_DATASTORE_QueueEntry *qe = cls; |
392 | struct GNUNET_DATASTORE_Handle *h = qe->h; | 389 | struct GNUNET_DATASTORE_Handle *h = qe->h; |
@@ -520,10 +517,9 @@ process_queue (struct GNUNET_DATASTORE_Handle *h); | |||
520 | * Try reconnecting to the datastore service. | 517 | * Try reconnecting to the datastore service. |
521 | * | 518 | * |
522 | * @param cls the `struct GNUNET_DATASTORE_Handle` | 519 | * @param cls the `struct GNUNET_DATASTORE_Handle` |
523 | * @param tc scheduler context | ||
524 | */ | 520 | */ |
525 | static void | 521 | static void |
526 | try_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 522 | try_reconnect (void *cls) |
527 | { | 523 | { |
528 | struct GNUNET_DATASTORE_Handle *h = cls; | 524 | struct GNUNET_DATASTORE_Handle *h = cls; |
529 | 525 | ||
diff --git a/src/datastore/gnunet-datastore.c b/src/datastore/gnunet-datastore.c index 93c23c3fc..186889e4c 100644 --- a/src/datastore/gnunet-datastore.c +++ b/src/datastore/gnunet-datastore.c | |||
@@ -70,8 +70,7 @@ static struct GNUNET_DATASTORE_QueueEntry *qe; | |||
70 | 70 | ||
71 | 71 | ||
72 | static void | 72 | static void |
73 | do_shutdown (void *cls, | 73 | do_shutdown (void *cls) |
74 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
75 | { | 74 | { |
76 | if (NULL != qe) | 75 | if (NULL != qe) |
77 | GNUNET_DATASTORE_cancel (qe); | 76 | GNUNET_DATASTORE_cancel (qe); |
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index 4979f4482..fdccd925e 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c | |||
@@ -303,11 +303,9 @@ static struct GNUNET_SERVER_Handle *server; | |||
303 | * content quickly. | 303 | * content quickly. |
304 | * | 304 | * |
305 | * @param cls not used | 305 | * @param cls not used |
306 | * @param tc task context | ||
307 | */ | 306 | */ |
308 | static void | 307 | static void |
309 | delete_expired (void *cls, | 308 | delete_expired (void *cls); |
310 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
311 | 309 | ||
312 | 310 | ||
313 | /** | 311 | /** |
@@ -388,10 +386,9 @@ expired_processor (void *cls, | |||
388 | * content quickly. | 386 | * content quickly. |
389 | * | 387 | * |
390 | * @param cls not used | 388 | * @param cls not used |
391 | * @param tc task context | ||
392 | */ | 389 | */ |
393 | static void | 390 | static void |
394 | delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 391 | delete_expired (void *cls) |
395 | { | 392 | { |
396 | expired_kill_task = NULL; | 393 | expired_kill_task = NULL; |
397 | plugin->api->get_expiration (plugin->api->cls, &expired_processor, NULL); | 394 | plugin->api->get_expiration (plugin->api->cls, &expired_processor, NULL); |
@@ -1579,8 +1576,7 @@ process_stat_done (void *cls, | |||
1579 | * Task run during shutdown. | 1576 | * Task run during shutdown. |
1580 | */ | 1577 | */ |
1581 | static void | 1578 | static void |
1582 | cleaning_task (void *cls, | 1579 | cleaning_task (void *cls) |
1583 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1584 | { | 1580 | { |
1585 | struct TransmitCallbackContext *tcc; | 1581 | struct TransmitCallbackContext *tcc; |
1586 | 1582 | ||
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index e430bfe93..41cac1283 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -186,11 +186,9 @@ struct CpsRunContext | |||
186 | * depending on the current state. | 186 | * depending on the current state. |
187 | * | 187 | * |
188 | * @param cls the `struct CpsRunContext` | 188 | * @param cls the `struct CpsRunContext` |
189 | * @param tc scheduler context (unused) | ||
190 | */ | 189 | */ |
191 | static void | 190 | static void |
192 | run_continuation (void *cls, | 191 | run_continuation (void *cls); |
193 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
194 | 192 | ||
195 | 193 | ||
196 | /** | 194 | /** |
@@ -344,18 +342,18 @@ delete_value (void *cls, | |||
344 | * depending on the current state. | 342 | * depending on the current state. |
345 | * | 343 | * |
346 | * @param cls the `struct CpsRunContext` | 344 | * @param cls the `struct CpsRunContext` |
347 | * @param tc scheduler context (unused) | ||
348 | */ | 345 | */ |
349 | static void | 346 | static void |
350 | run_continuation (void *cls, | 347 | run_continuation (void *cls) |
351 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
352 | { | 348 | { |
353 | struct CpsRunContext *crc = cls; | 349 | struct CpsRunContext *crc = cls; |
354 | size_t size; | 350 | size_t size; |
355 | static struct GNUNET_HashCode key; | 351 | static struct GNUNET_HashCode key; |
356 | static char data[65536]; | 352 | static char data[65536]; |
357 | char gstr[128]; | 353 | char gstr[128]; |
354 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
358 | 355 | ||
356 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
359 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 357 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
360 | crc->phase = RP_ERROR; | 358 | crc->phase = RP_ERROR; |
361 | ok = (int) crc->phase; | 359 | ok = (int) crc->phase; |
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 4365fbd25..0aeb426ab 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c | |||
@@ -99,8 +99,7 @@ disk_utilization_change_cb (void *cls, int delta) | |||
99 | 99 | ||
100 | 100 | ||
101 | static void | 101 | static void |
102 | test (void *cls, | 102 | test (void *cls); |
103 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
104 | 103 | ||
105 | 104 | ||
106 | /** | 105 | /** |
@@ -115,8 +114,8 @@ test (void *cls, | |||
115 | static void | 114 | static void |
116 | put_continuation (void *cls, | 115 | put_continuation (void *cls, |
117 | const struct GNUNET_HashCode *key, | 116 | const struct GNUNET_HashCode *key, |
118 | uint32_t size, | 117 | uint32_t size, |
119 | int status, | 118 | int status, |
120 | const char *msg) | 119 | const char *msg) |
121 | { | 120 | { |
122 | struct CpsRunContext *crc = cls; | 121 | struct CpsRunContext *crc = cls; |
@@ -376,7 +375,7 @@ unload_plugin (struct GNUNET_DATASTORE_PluginFunctions *api, | |||
376 | * the transport and core. | 375 | * the transport and core. |
377 | */ | 376 | */ |
378 | static void | 377 | static void |
379 | cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 378 | cleaning_task (void *cls) |
380 | { | 379 | { |
381 | struct CpsRunContext *crc = cls; | 380 | struct CpsRunContext *crc = cls; |
382 | 381 | ||
@@ -386,10 +385,12 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
386 | 385 | ||
387 | 386 | ||
388 | static void | 387 | static void |
389 | test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 388 | test (void *cls) |
390 | { | 389 | { |
391 | struct CpsRunContext *crc = cls; | 390 | struct CpsRunContext *crc = cls; |
391 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
392 | 392 | ||
393 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
393 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 394 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
394 | { | 395 | { |
395 | GNUNET_break (0); | 396 | GNUNET_break (0); |
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index 12f2ef762..7d4565de6 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c | |||
@@ -168,11 +168,9 @@ struct CpsRunContext | |||
168 | * depending on the current state. | 168 | * depending on the current state. |
169 | * | 169 | * |
170 | * @param cls the `struct CpsRunContext` | 170 | * @param cls the `struct CpsRunContext` |
171 | * @param tc scheduler context (unused) | ||
172 | */ | 171 | */ |
173 | static void | 172 | static void |
174 | run_continuation (void *cls, | 173 | run_continuation (void *cls); |
175 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
176 | 174 | ||
177 | 175 | ||
178 | /** | 176 | /** |
@@ -394,11 +392,9 @@ check_update (void *cls, | |||
394 | * depending on the current state. | 392 | * depending on the current state. |
395 | * | 393 | * |
396 | * @param cls the `struct CpsRunContext` | 394 | * @param cls the `struct CpsRunContext` |
397 | * @param tc scheduler context (unused) | ||
398 | */ | 395 | */ |
399 | static void | 396 | static void |
400 | run_continuation (void *cls, | 397 | run_continuation (void *cls) |
401 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
402 | { | 398 | { |
403 | struct CpsRunContext *crc = cls; | 399 | struct CpsRunContext *crc = cls; |
404 | 400 | ||
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index 9ef83c55c..c9fec79e3 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -119,7 +119,7 @@ get_expiration (int i) | |||
119 | 119 | ||
120 | 120 | ||
121 | static void | 121 | static void |
122 | run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 122 | run_continuation (void *cls); |
123 | 123 | ||
124 | 124 | ||
125 | static void | 125 | static void |
@@ -182,7 +182,7 @@ check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size, | |||
182 | 182 | ||
183 | 183 | ||
184 | static void | 184 | static void |
185 | run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 185 | run_continuation (void *cls) |
186 | { | 186 | { |
187 | struct CpsRunContext *crc = cls; | 187 | struct CpsRunContext *crc = cls; |
188 | 188 | ||
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c index 4efad74be..d7dff1041 100644 --- a/src/datastore/test_plugin_datastore.c +++ b/src/datastore/test_plugin_datastore.c | |||
@@ -84,8 +84,7 @@ disk_utilization_change_cb (void *cls, int delta) | |||
84 | 84 | ||
85 | 85 | ||
86 | static void | 86 | static void |
87 | test (void *cls, | 87 | test (void *cls); |
88 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
89 | 88 | ||
90 | 89 | ||
91 | /** | 90 | /** |
@@ -98,10 +97,10 @@ test (void *cls, | |||
98 | * @param msg error message on error | 97 | * @param msg error message on error |
99 | */ | 98 | */ |
100 | static void | 99 | static void |
101 | put_continuation (void *cls, | 100 | put_continuation (void *cls, |
102 | const struct GNUNET_HashCode *key, | 101 | const struct GNUNET_HashCode *key, |
103 | uint32_t size, | 102 | uint32_t size, |
104 | int status, | 103 | int status, |
105 | const char *msg) | 104 | const char *msg) |
106 | { | 105 | { |
107 | struct CpsRunContext *crc = cls; | 106 | struct CpsRunContext *crc = cls; |
@@ -241,7 +240,7 @@ unload_plugin (struct GNUNET_DATASTORE_PluginFunctions *api, | |||
241 | * the transport and core. | 240 | * the transport and core. |
242 | */ | 241 | */ |
243 | static void | 242 | static void |
244 | cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 243 | cleaning_task (void *cls) |
245 | { | 244 | { |
246 | struct CpsRunContext *crc = cls; | 245 | struct CpsRunContext *crc = cls; |
247 | 246 | ||
@@ -251,7 +250,7 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
251 | 250 | ||
252 | 251 | ||
253 | static void | 252 | static void |
254 | update_continuation (void *cls, | 253 | update_continuation (void *cls, |
255 | int status, | 254 | int status, |
256 | const char *msg) | 255 | const char *msg) |
257 | { | 256 | { |
@@ -264,11 +263,13 @@ update_continuation (void *cls, | |||
264 | 263 | ||
265 | 264 | ||
266 | static void | 265 | static void |
267 | test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 266 | test (void *cls) |
268 | { | 267 | { |
269 | struct CpsRunContext *crc = cls; | 268 | struct CpsRunContext *crc = cls; |
270 | struct GNUNET_HashCode key; | 269 | struct GNUNET_HashCode key; |
270 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
271 | 271 | ||
272 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
272 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 273 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
273 | { | 274 | { |
274 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test aborted.\n"); | 275 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test aborted.\n"); |
@@ -302,9 +303,9 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
302 | case RP_UPDATE: | 303 | case RP_UPDATE: |
303 | crc->api->update (crc->api->cls, | 304 | crc->api->update (crc->api->cls, |
304 | guid, | 305 | guid, |
305 | 1, | 306 | 1, |
306 | GNUNET_TIME_UNIT_ZERO_ABS, | 307 | GNUNET_TIME_UNIT_ZERO_ABS, |
307 | &update_continuation, | 308 | &update_continuation, |
308 | crc); | 309 | crc); |
309 | break; | 310 | break; |
310 | 311 | ||
@@ -344,8 +345,8 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
344 | char *libname; | 345 | char *libname; |
345 | 346 | ||
346 | if (GNUNET_OK != | 347 | if (GNUNET_OK != |
347 | GNUNET_CONFIGURATION_get_value_string (cfg, | 348 | GNUNET_CONFIGURATION_get_value_string (cfg, |
348 | "DATASTORE", | 349 | "DATASTORE", |
349 | "DATABASE", | 350 | "DATABASE", |
350 | &name)) | 351 | &name)) |
351 | { | 352 | { |
@@ -366,7 +367,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
366 | FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); | 367 | FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); |
367 | GNUNET_free (libname); | 368 | GNUNET_free (libname); |
368 | GNUNET_free (name); | 369 | GNUNET_free (name); |
369 | ok = 77; /* mark test as skipped */ | 370 | ok = 77; /* mark test as skipped */ |
370 | return NULL; | 371 | return NULL; |
371 | } | 372 | } |
372 | GNUNET_free (libname); | 373 | GNUNET_free (libname); |
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 35d9580e9..b5ae2f8ce 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c | |||
@@ -362,7 +362,7 @@ struct GNUNET_DHT_Handle | |||
362 | * Did we start our receive loop yet? | 362 | * Did we start our receive loop yet? |
363 | */ | 363 | */ |
364 | int in_receive; | 364 | int in_receive; |
365 | 365 | ||
366 | #if ENABLE_MALICIOUS | 366 | #if ENABLE_MALICIOUS |
367 | /** | 367 | /** |
368 | * Handle of act malicious request. | 368 | * Handle of act malicious request. |
@@ -496,11 +496,9 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle); | |||
496 | * Try reconnecting to the dht service. | 496 | * Try reconnecting to the dht service. |
497 | * | 497 | * |
498 | * @param cls a `struct GNUNET_DHT_Handle` | 498 | * @param cls a `struct GNUNET_DHT_Handle` |
499 | * @param tc scheduler context | ||
500 | */ | 499 | */ |
501 | static void | 500 | static void |
502 | try_reconnect (void *cls, | 501 | try_reconnect (void *cls) |
503 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
504 | { | 502 | { |
505 | struct GNUNET_DHT_Handle *handle = cls; | 503 | struct GNUNET_DHT_Handle *handle = cls; |
506 | 504 | ||
@@ -650,7 +648,7 @@ transmit_pending (void *cls, | |||
650 | head->in_pending_queue = GNUNET_NO; | 648 | head->in_pending_queue = GNUNET_NO; |
651 | if (NULL != head->cont) | 649 | if (NULL != head->cont) |
652 | { | 650 | { |
653 | head->cont (head->cont_cls, NULL); | 651 | head->cont (head->cont_cls); |
654 | head->cont = NULL; | 652 | head->cont = NULL; |
655 | head->cont_cls = NULL; | 653 | head->cont_cls = NULL; |
656 | } | 654 | } |
@@ -663,7 +661,7 @@ transmit_pending (void *cls, | |||
663 | { | 661 | { |
664 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting to process replies from DHT\n"); | 662 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting to process replies from DHT\n"); |
665 | handle->in_receive = GNUNET_YES; | 663 | handle->in_receive = GNUNET_YES; |
666 | 664 | ||
667 | GNUNET_CLIENT_receive (handle->client, &service_message_handler, handle, | 665 | GNUNET_CLIENT_receive (handle->client, &service_message_handler, handle, |
668 | GNUNET_TIME_UNIT_FOREVER_REL); | 666 | GNUNET_TIME_UNIT_FOREVER_REL); |
669 | } | 667 | } |
@@ -899,7 +897,7 @@ process_act_malicious_confirmation_message (struct GNUNET_DHT_Handle *handle, | |||
899 | struct GNUNET_DHT_ActMaliciousHandle *mh; | 897 | struct GNUNET_DHT_ActMaliciousHandle *mh; |
900 | GNUNET_DHT_PutContinuation cont; | 898 | GNUNET_DHT_PutContinuation cont; |
901 | void *cont_cls; | 899 | void *cont_cls; |
902 | 900 | ||
903 | mh = handle->mh; | 901 | mh = handle->mh; |
904 | if (NULL == mh) | 902 | if (NULL == mh) |
905 | return GNUNET_OK; | 903 | return GNUNET_OK; |
@@ -907,7 +905,7 @@ process_act_malicious_confirmation_message (struct GNUNET_DHT_Handle *handle, | |||
907 | cont_cls = mh->cont_cls; | 905 | cont_cls = mh->cont_cls; |
908 | if (NULL != cont) | 906 | if (NULL != cont) |
909 | cont (cont_cls, GNUNET_OK); | 907 | cont (cont_cls, GNUNET_OK); |
910 | 908 | ||
911 | return GNUNET_OK; | 909 | return GNUNET_OK; |
912 | } | 910 | } |
913 | #endif | 911 | #endif |
@@ -1110,7 +1108,7 @@ GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle) | |||
1110 | pm->in_pending_queue = GNUNET_NO; | 1108 | pm->in_pending_queue = GNUNET_NO; |
1111 | GNUNET_assert (GNUNET_YES == pm->free_on_send); | 1109 | GNUNET_assert (GNUNET_YES == pm->free_on_send); |
1112 | if (NULL != pm->cont) | 1110 | if (NULL != pm->cont) |
1113 | pm->cont (pm->cont_cls, NULL); | 1111 | pm->cont (pm->cont_cls); |
1114 | GNUNET_free (pm); | 1112 | GNUNET_free (pm); |
1115 | } | 1113 | } |
1116 | while (NULL != (ph = handle->put_head)) | 1114 | while (NULL != (ph = handle->put_head)) |
@@ -1137,11 +1135,9 @@ GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle) | |||
1137 | * Timeout for the transmission of a fire&forget-request. Clean it up. | 1135 | * Timeout for the transmission of a fire&forget-request. Clean it up. |
1138 | * | 1136 | * |
1139 | * @param cls the `struct GNUNET_DHT_PutHandle *` | 1137 | * @param cls the `struct GNUNET_DHT_PutHandle *` |
1140 | * @param tc scheduler context | ||
1141 | */ | 1138 | */ |
1142 | static void | 1139 | static void |
1143 | timeout_put_request (void *cls, | 1140 | timeout_put_request (void *cls) |
1144 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1145 | { | 1141 | { |
1146 | struct GNUNET_DHT_PutHandle *ph = cls; | 1142 | struct GNUNET_DHT_PutHandle *ph = cls; |
1147 | struct GNUNET_DHT_Handle *handle = ph->dht_handle; | 1143 | struct GNUNET_DHT_Handle *handle = ph->dht_handle; |
@@ -1168,11 +1164,9 @@ timeout_put_request (void *cls, | |||
1168 | * the message pointer in the put handle to NULL. | 1164 | * the message pointer in the put handle to NULL. |
1169 | * | 1165 | * |
1170 | * @param cls the `struct GNUNET_DHT_PutHandle` | 1166 | * @param cls the `struct GNUNET_DHT_PutHandle` |
1171 | * @param tc unused | ||
1172 | */ | 1167 | */ |
1173 | static void | 1168 | static void |
1174 | mark_put_message_gone (void *cls, | 1169 | mark_put_message_gone (void *cls) |
1175 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1176 | { | 1170 | { |
1177 | struct GNUNET_DHT_PutHandle *ph = cls; | 1171 | struct GNUNET_DHT_PutHandle *ph = cls; |
1178 | 1172 | ||
@@ -1570,10 +1564,10 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle) | |||
1570 | * @param handle the DHT handle | 1564 | * @param handle the DHT handle |
1571 | * @param action 1 to make the service malicious; 0 to make it benign | 1565 | * @param action 1 to make the service malicious; 0 to make it benign |
1572 | * @param cont continuation to call when done (transmitting request to service) | 1566 | * @param cont continuation to call when done (transmitting request to service) |
1573 | * @param cont_cls closure for @a cont | 1567 | * @param cont_cls closure for @a cont |
1574 | */ | 1568 | */ |
1575 | struct GNUNET_DHT_ActMaliciousHandle * | 1569 | struct GNUNET_DHT_ActMaliciousHandle * |
1576 | GNUNET_DHT_act_malicious (struct GNUNET_DHT_Handle *handle, | 1570 | GNUNET_DHT_act_malicious (struct GNUNET_DHT_Handle *handle, |
1577 | unsigned int action, | 1571 | unsigned int action, |
1578 | GNUNET_DHT_PutContinuation cont, | 1572 | GNUNET_DHT_PutContinuation cont, |
1579 | void *cont_cls) | 1573 | void *cont_cls) |
@@ -1582,7 +1576,7 @@ GNUNET_DHT_act_malicious (struct GNUNET_DHT_Handle *handle, | |||
1582 | struct GNUNET_DHT_ActMaliciousHandle *mh; | 1576 | struct GNUNET_DHT_ActMaliciousHandle *mh; |
1583 | struct PendingMessage *pending; | 1577 | struct PendingMessage *pending; |
1584 | size_t msize; | 1578 | size_t msize; |
1585 | 1579 | ||
1586 | msize = sizeof(struct GNUNET_DHT_ActMaliciousMessage); | 1580 | msize = sizeof(struct GNUNET_DHT_ActMaliciousMessage); |
1587 | if (msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 1581 | if (msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
1588 | { | 1582 | { |
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 7349d0c82..6846b3af7 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -87,10 +87,9 @@ static int ret; | |||
87 | * Task run to clean up on timeout. | 87 | * Task run to clean up on timeout. |
88 | * | 88 | * |
89 | * @param cls unused | 89 | * @param cls unused |
90 | * @param tc unused | ||
91 | */ | 90 | */ |
92 | static void | 91 | static void |
93 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 92 | cleanup_task (void *cls) |
94 | { | 93 | { |
95 | if (NULL != get_handle) | 94 | if (NULL != get_handle) |
96 | { | 95 | { |
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c index 9047ba685..0502496d7 100644 --- a/src/dht/gnunet-dht-monitor.c +++ b/src/dht/gnunet-dht-monitor.c | |||
@@ -76,10 +76,9 @@ static int ret; | |||
76 | * Stop monitoring request and start shutdown | 76 | * Stop monitoring request and start shutdown |
77 | * | 77 | * |
78 | * @param cls closure (unused) | 78 | * @param cls closure (unused) |
79 | * @param tc Task Context | ||
80 | */ | 79 | */ |
81 | static void | 80 | static void |
82 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 81 | cleanup_task (void *cls) |
83 | { | 82 | { |
84 | if (verbose) | 83 | if (verbose) |
85 | FPRINTF (stderr, "%s", "Cleaning up!\n"); | 84 | FPRINTF (stderr, "%s", "Cleaning up!\n"); |
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c index c58311876..19e385be1 100644 --- a/src/dht/gnunet-dht-put.c +++ b/src/dht/gnunet-dht-put.c | |||
@@ -87,8 +87,9 @@ static int ret; | |||
87 | */ | 87 | */ |
88 | static char *data; | 88 | static char *data; |
89 | 89 | ||
90 | |||
90 | static void | 91 | static void |
91 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 92 | shutdown_task (void *cls) |
92 | { | 93 | { |
93 | if (NULL != dht_handle) | 94 | if (NULL != dht_handle) |
94 | { | 95 | { |
@@ -101,9 +102,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
101 | * Signature of the main function of a task. | 102 | * Signature of the main function of a task. |
102 | * | 103 | * |
103 | * @param cls closure | 104 | * @param cls closure |
104 | * @param success GNUNET_OK if the PUT was transmitted, | 105 | * @param success #GNUNET_OK if the PUT was transmitted, |
105 | * GNUNET_NO on timeout, | 106 | * #GNUNET_NO on timeout, |
106 | * GNUNET_SYSERR on disconnect from service | 107 | * #GNUNET_SYSERR on disconnect from service |
107 | * after the PUT message was transmitted | 108 | * after the PUT message was transmitted |
108 | * (so we don't know if it was received or not) | 109 | * (so we don't know if it was received or not) |
109 | */ | 110 | */ |
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 006364664..1aeca9b85 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -98,10 +98,9 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message) | |||
98 | * Task run during shutdown. | 98 | * Task run during shutdown. |
99 | * | 99 | * |
100 | * @param cls unused | 100 | * @param cls unused |
101 | * @param tc unused | ||
102 | */ | 101 | */ |
103 | static void | 102 | static void |
104 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 103 | shutdown_task (void *cls) |
105 | { | 104 | { |
106 | if (NULL != ghh) | 105 | if (NULL != ghh) |
107 | { | 106 | { |
@@ -159,10 +158,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
159 | GDS_CLIENTS_init (server); | 158 | GDS_CLIENTS_init (server); |
160 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) | 159 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) |
161 | { | 160 | { |
162 | shutdown_task (NULL, NULL); | 161 | shutdown_task (NULL); |
163 | return; | 162 | return; |
164 | } | 163 | } |
165 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, | 164 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
165 | &shutdown_task, | ||
166 | NULL); | 166 | NULL); |
167 | GDS_transport_handle = | 167 | GDS_transport_handle = |
168 | GNUNET_TRANSPORT_connect (GDS_cfg, NULL, NULL, NULL, NULL, NULL); | 168 | GNUNET_TRANSPORT_connect (GDS_cfg, NULL, NULL, NULL, NULL, NULL); |
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index 30eb6afa6..e42069fe0 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c | |||
@@ -450,16 +450,16 @@ transmit_request (struct ClientQueryRecord *cqr) | |||
450 | * itself (unless the heap is empty). | 450 | * itself (unless the heap is empty). |
451 | * | 451 | * |
452 | * @param cls unused | 452 | * @param cls unused |
453 | * @param tc scheduler context | ||
454 | */ | 453 | */ |
455 | static void | 454 | static void |
456 | transmit_next_request_task (void *cls, | 455 | transmit_next_request_task (void *cls) |
457 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
458 | { | 456 | { |
459 | struct ClientQueryRecord *cqr; | 457 | struct ClientQueryRecord *cqr; |
460 | struct GNUNET_TIME_Relative delay; | 458 | struct GNUNET_TIME_Relative delay; |
459 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
461 | 460 | ||
462 | retry_task = NULL; | 461 | retry_task = NULL; |
462 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
463 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 463 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
464 | return; | 464 | return; |
465 | while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap))) | 465 | while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap))) |
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index cedafbd6c..d82effb34 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -492,11 +492,9 @@ find_bucket (const struct GNUNET_HashCode *hc) | |||
492 | * Clean up the "oh" field in the @a cls | 492 | * Clean up the "oh" field in the @a cls |
493 | * | 493 | * |
494 | * @param cls a `struct ConnectInfo` | 494 | * @param cls a `struct ConnectInfo` |
495 | * @param tc unused | ||
496 | */ | 495 | */ |
497 | static void | 496 | static void |
498 | offer_hello_done (void *cls, | 497 | offer_hello_done (void *cls) |
499 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
500 | { | 498 | { |
501 | struct ConnectInfo *ci = cls; | 499 | struct ConnectInfo *ci = cls; |
502 | 500 | ||
@@ -707,17 +705,17 @@ add_known_to_bloom (void *cls, | |||
707 | * and attempt to connect to them. | 705 | * and attempt to connect to them. |
708 | * | 706 | * |
709 | * @param cls closure for this task | 707 | * @param cls closure for this task |
710 | * @param tc the context under which the task is running | ||
711 | */ | 708 | */ |
712 | static void | 709 | static void |
713 | send_find_peer_message (void *cls, | 710 | send_find_peer_message (void *cls) |
714 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
715 | { | 711 | { |
716 | struct GNUNET_TIME_Relative next_send_time; | 712 | struct GNUNET_TIME_Relative next_send_time; |
717 | struct BloomConstructorContext bcc; | 713 | struct BloomConstructorContext bcc; |
718 | struct GNUNET_CONTAINER_BloomFilter *peer_bf; | 714 | struct GNUNET_CONTAINER_BloomFilter *peer_bf; |
715 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
719 | 716 | ||
720 | find_peer_task = NULL; | 717 | find_peer_task = NULL; |
718 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
721 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 719 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
722 | return; | 720 | return; |
723 | if (newly_found_peers > bucket_size) | 721 | if (newly_found_peers > bucket_size) |
diff --git a/src/dht/gnunet-service-wdht.c b/src/dht/gnunet-service-wdht.c index 339b38aa4..0668c9078 100644 --- a/src/dht/gnunet-service-wdht.c +++ b/src/dht/gnunet-service-wdht.c | |||
@@ -60,10 +60,9 @@ const struct GNUNET_CONFIGURATION_Handle *GDS_cfg; | |||
60 | * Task run during shutdown. | 60 | * Task run during shutdown. |
61 | * | 61 | * |
62 | * @param cls unused | 62 | * @param cls unused |
63 | * @param tc unused | ||
64 | */ | 63 | */ |
65 | static void | 64 | static void |
66 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | shutdown_task (void *cls) |
67 | { | 66 | { |
68 | GDS_NEIGHBOURS_done (); | 67 | GDS_NEIGHBOURS_done (); |
69 | GDS_DATACACHE_done (); | 68 | GDS_DATACACHE_done (); |
@@ -100,7 +99,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
100 | GDS_CLIENTS_init (server); | 99 | GDS_CLIENTS_init (server); |
101 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) | 100 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) |
102 | { | 101 | { |
103 | shutdown_task (NULL, NULL); | 102 | shutdown_task (NULL); |
104 | return; | 103 | return; |
105 | } | 104 | } |
106 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 105 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
diff --git a/src/dht/gnunet-service-wdht_clients.c b/src/dht/gnunet-service-wdht_clients.c index 0662472a8..c3aff03aa 100644 --- a/src/dht/gnunet-service-wdht_clients.c +++ b/src/dht/gnunet-service-wdht_clients.c | |||
@@ -874,16 +874,16 @@ transmit_request (struct ClientQueryRecord *cqr) | |||
874 | * itself (unless the heap is empty). | 874 | * itself (unless the heap is empty). |
875 | * | 875 | * |
876 | * @param cls unused | 876 | * @param cls unused |
877 | * @param tc scheduler context | ||
878 | */ | 877 | */ |
879 | static void | 878 | static void |
880 | transmit_next_request_task (void *cls, | 879 | transmit_next_request_task (void *cls) |
881 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
882 | { | 880 | { |
883 | struct ClientQueryRecord *cqr; | 881 | struct ClientQueryRecord *cqr; |
884 | struct GNUNET_TIME_Relative delay; | 882 | struct GNUNET_TIME_Relative delay; |
883 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
885 | 884 | ||
886 | retry_task = NULL; | 885 | retry_task = NULL; |
886 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
887 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 887 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
888 | return; | 888 | return; |
889 | while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap))) | 889 | while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap))) |
diff --git a/src/dht/gnunet-service-wdht_neighbours.c b/src/dht/gnunet-service-wdht_neighbours.c index ef73c80a9..54c52507e 100644 --- a/src/dht/gnunet-service-wdht_neighbours.c +++ b/src/dht/gnunet-service-wdht_neighbours.c | |||
@@ -931,11 +931,9 @@ pick_random_friend () | |||
931 | * possibly initiate cleanup. | 931 | * possibly initiate cleanup. |
932 | * | 932 | * |
933 | * @param cls NULL | 933 | * @param cls NULL |
934 | * @param tc unused | ||
935 | */ | 934 | */ |
936 | static void | 935 | static void |
937 | trail_timeout_callback (void *cls, | 936 | trail_timeout_callback (void *cls) |
938 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
939 | { | 937 | { |
940 | struct Trail *trail; | 938 | struct Trail *trail; |
941 | struct GNUNET_TIME_Relative left; | 939 | struct GNUNET_TIME_Relative left; |
@@ -974,11 +972,9 @@ get_desired_finger_array_size () | |||
974 | * Initiate a random walk. | 972 | * Initiate a random walk. |
975 | * | 973 | * |
976 | * @param cls NULL | 974 | * @param cls NULL |
977 | * @param tc unused | ||
978 | */ | 975 | */ |
979 | static void | 976 | static void |
980 | do_random_walk (void *cls, | 977 | do_random_walk (void *cls) |
981 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
982 | { | 978 | { |
983 | static unsigned int walk_layer; | 979 | static unsigned int walk_layer; |
984 | struct FriendInfo *friend; | 980 | struct FriendInfo *friend; |
diff --git a/src/dht/gnunet-service-xdht.c b/src/dht/gnunet-service-xdht.c index 3bab7e946..f6c7c5167 100644 --- a/src/dht/gnunet-service-xdht.c +++ b/src/dht/gnunet-service-xdht.c | |||
@@ -73,10 +73,9 @@ unsigned int malicious; | |||
73 | * Task run during shutdown. | 73 | * Task run during shutdown. |
74 | * | 74 | * |
75 | * @param cls unused | 75 | * @param cls unused |
76 | * @param tc unused | ||
77 | */ | 76 | */ |
78 | static void | 77 | static void |
79 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 78 | shutdown_task (void *cls) |
80 | { | 79 | { |
81 | GDS_NEIGHBOURS_done (); | 80 | GDS_NEIGHBOURS_done (); |
82 | GDS_DATACACHE_done (); | 81 | GDS_DATACACHE_done (); |
@@ -123,7 +122,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
123 | } | 122 | } |
124 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) | 123 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) |
125 | { | 124 | { |
126 | shutdown_task (NULL, NULL); | 125 | shutdown_task (NULL); |
127 | return; | 126 | return; |
128 | } | 127 | } |
129 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 128 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
diff --git a/src/dht/gnunet-service-xdht_clients.c b/src/dht/gnunet-service-xdht_clients.c index 1a1ee9e82..e08ccf792 100644 --- a/src/dht/gnunet-service-xdht_clients.c +++ b/src/dht/gnunet-service-xdht_clients.c | |||
@@ -871,16 +871,16 @@ transmit_request (struct ClientQueryRecord *cqr) | |||
871 | * itself (unless the heap is empty). | 871 | * itself (unless the heap is empty). |
872 | * | 872 | * |
873 | * @param cls unused | 873 | * @param cls unused |
874 | * @param tc scheduler context | ||
875 | */ | 874 | */ |
876 | static void | 875 | static void |
877 | transmit_next_request_task (void *cls, | 876 | transmit_next_request_task (void *cls) |
878 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
879 | { | 877 | { |
880 | struct ClientQueryRecord *cqr; | 878 | struct ClientQueryRecord *cqr; |
881 | struct GNUNET_TIME_Relative delay; | 879 | struct GNUNET_TIME_Relative delay; |
880 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
882 | 881 | ||
883 | retry_task = NULL; | 882 | retry_task = NULL; |
883 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
884 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 884 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
885 | return; | 885 | return; |
886 | while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap))) | 886 | while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap))) |
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c index 96fdaa9d7..c6de94a5a 100644 --- a/src/dht/gnunet-service-xdht_neighbours.c +++ b/src/dht/gnunet-service-xdht_neighbours.c | |||
@@ -2674,11 +2674,9 @@ compute_finger_identity_value (unsigned int finger_index) | |||
2674 | * finger identity through this random friend. | 2674 | * finger identity through this random friend. |
2675 | * | 2675 | * |
2676 | * @param cls closure for this task | 2676 | * @param cls closure for this task |
2677 | * @param tc the context under which the task is running | ||
2678 | */ | 2677 | */ |
2679 | static void | 2678 | static void |
2680 | send_find_finger_trail_message (void *cls, | 2679 | send_find_finger_trail_message (void *cls) |
2681 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2682 | { | 2680 | { |
2683 | struct FriendInfo *target_friend; | 2681 | struct FriendInfo *target_friend; |
2684 | struct GNUNET_HashCode trail_id; | 2682 | struct GNUNET_HashCode trail_id; |
@@ -3219,12 +3217,11 @@ add_new_finger (struct GNUNET_PeerIdentity finger_identity, | |||
3219 | * Periodic task to verify current successor. There can be multiple trails to reach | 3217 | * Periodic task to verify current successor. There can be multiple trails to reach |
3220 | * to successor, choose the shortest one and send verify successor message | 3218 | * to successor, choose the shortest one and send verify successor message |
3221 | * across that trail. | 3219 | * across that trail. |
3220 | * | ||
3222 | * @param cls closure for this task | 3221 | * @param cls closure for this task |
3223 | * @param tc the context under which the task is running | ||
3224 | */ | 3222 | */ |
3225 | static void | 3223 | static void |
3226 | send_verify_successor_message (void *cls, | 3224 | send_verify_successor_message (void *cls) |
3227 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3228 | { | 3225 | { |
3229 | struct FriendInfo *target_friend; | 3226 | struct FriendInfo *target_friend; |
3230 | struct GNUNET_HashCode trail_id; | 3227 | struct GNUNET_HashCode trail_id; |
@@ -5077,10 +5074,10 @@ struct SendNotifyContext | |||
5077 | unsigned int num_retries_scheduled; | 5074 | unsigned int num_retries_scheduled; |
5078 | }; | 5075 | }; |
5079 | 5076 | ||
5077 | |||
5080 | void | 5078 | void |
5081 | send_notify_new_successor (void *cls, | 5079 | send_notify_new_successor (void *cls); |
5082 | const struct GNUNET_SCHEDULER_TaskContext | 5080 | |
5083 | * tc); | ||
5084 | 5081 | ||
5085 | /** | 5082 | /** |
5086 | * Check if the peer which sent us verify successor result message is still ours | 5083 | * Check if the peer which sent us verify successor result message is still ours |
@@ -5250,11 +5247,9 @@ compare_and_update_successor (struct GNUNET_PeerIdentity curr_succ, | |||
5250 | 5247 | ||
5251 | 5248 | ||
5252 | void | 5249 | void |
5253 | send_notify_new_successor (void *cls, | 5250 | send_notify_new_successor (void *cls) |
5254 | const struct GNUNET_SCHEDULER_TaskContext | ||
5255 | * tc) | ||
5256 | { | 5251 | { |
5257 | struct SendNotifyContext *ctx = (struct SendNotifyContext *) cls; | 5252 | struct SendNotifyContext *ctx = cls; |
5258 | 5253 | ||
5259 | GDS_NEIGHBOURS_send_notify_new_successor (ctx->source_peer, | 5254 | GDS_NEIGHBOURS_send_notify_new_successor (ctx->source_peer, |
5260 | ctx->successor, | 5255 | ctx->successor, |
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c index 7d6ac685a..f0c4ec7be 100644 --- a/src/dht/gnunet_dht_profiler.c +++ b/src/dht/gnunet_dht_profiler.c | |||
@@ -406,28 +406,30 @@ static int in_shutdown = 0; | |||
406 | */ | 406 | */ |
407 | static unsigned int tries; | 407 | static unsigned int tries; |
408 | 408 | ||
409 | |||
409 | /** | 410 | /** |
410 | * Task that collects successor statistics from all the peers. | 411 | * Task that collects successor statistics from all the peers. |
412 | * | ||
411 | * @param cls | 413 | * @param cls |
412 | * @param tc | ||
413 | */ | 414 | */ |
414 | static void | 415 | static void |
415 | collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 416 | collect_stats (void *cls); |
417 | |||
416 | 418 | ||
417 | /** | 419 | /** |
418 | * Connect to DHT services of active peers | 420 | * Connect to DHT services of active peers |
419 | */ | 421 | */ |
420 | static void | 422 | static void |
421 | start_profiling(); | 423 | start_profiling (void); |
424 | |||
422 | 425 | ||
423 | /** | 426 | /** |
424 | * Shutdown task. Cleanup all resources and operations. | 427 | * Shutdown task. Cleanup all resources and operations. |
425 | * | 428 | * |
426 | * @param cls NULL | 429 | * @param cls NULL |
427 | * @param tc scheduler task context | ||
428 | */ | 430 | */ |
429 | static void | 431 | static void |
430 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 432 | do_shutdown (void *cls) |
431 | { | 433 | { |
432 | struct ActiveContext *ac; | 434 | struct ActiveContext *ac; |
433 | unsigned int cnt; | 435 | unsigned int cnt; |
@@ -546,10 +548,9 @@ summarize () | |||
546 | * Task to cancel DHT GET. | 548 | * Task to cancel DHT GET. |
547 | * | 549 | * |
548 | * @param cls NULL | 550 | * @param cls NULL |
549 | * @param tc scheduler task context | ||
550 | */ | 551 | */ |
551 | static void | 552 | static void |
552 | cancel_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 553 | cancel_get (void *cls) |
553 | { | 554 | { |
554 | struct ActiveContext *ac = cls; | 555 | struct ActiveContext *ac = cls; |
555 | struct Context *ctx = ac->ctx; | 556 | struct Context *ctx = ac->ctx; |
@@ -637,10 +638,9 @@ get_iter (void *cls, | |||
637 | * Task to do DHT GETs | 638 | * Task to do DHT GETs |
638 | * | 639 | * |
639 | * @param cls the active context | 640 | * @param cls the active context |
640 | * @param tc the scheduler task context | ||
641 | */ | 641 | */ |
642 | static void | 642 | static void |
643 | delayed_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 643 | delayed_get (void *cls) |
644 | { | 644 | { |
645 | struct ActiveContext *ac = cls; | 645 | struct ActiveContext *ac = cls; |
646 | struct ActiveContext *get_ac; | 646 | struct ActiveContext *get_ac; |
@@ -681,14 +681,15 @@ delayed_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
681 | * clear the operation during shutdown. | 681 | * clear the operation during shutdown. |
682 | * | 682 | * |
683 | * @param cls the context | 683 | * @param cls the context |
684 | * @return tc scheduler task context. | ||
685 | */ | 684 | */ |
686 | static void | 685 | static void |
687 | teardown_dht_connection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 686 | teardown_dht_connection (void *cls) |
688 | { | 687 | { |
689 | struct Context *ctx = cls; | 688 | struct Context *ctx = cls; |
690 | struct GNUNET_TESTBED_Operation *op; | 689 | struct GNUNET_TESTBED_Operation *op; |
690 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
691 | 691 | ||
692 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
692 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 693 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
693 | return; | 694 | return; |
694 | GNUNET_assert (NULL != ctx); | 695 | GNUNET_assert (NULL != ctx); |
@@ -725,13 +726,12 @@ put_cont (void *cls, int success) | |||
725 | 726 | ||
726 | 727 | ||
727 | /** | 728 | /** |
728 | * Task to do DHT PUTS | 729 | * Task to do DHT PUTs |
729 | * | 730 | * |
730 | * @param cls the active context | 731 | * @param cls the active context |
731 | * @param tc the scheduler task context | ||
732 | */ | 732 | */ |
733 | static void | 733 | static void |
734 | delayed_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 734 | delayed_put (void *cls) |
735 | { | 735 | { |
736 | struct ActiveContext *ac = cls; | 736 | struct ActiveContext *ac = cls; |
737 | 737 | ||
@@ -1210,15 +1210,18 @@ successor_stats_iterator (void *cls, | |||
1210 | * Task that collects peer and its corresponding successors. | 1210 | * Task that collects peer and its corresponding successors. |
1211 | * | 1211 | * |
1212 | * @param cls Closure (NULL). | 1212 | * @param cls Closure (NULL). |
1213 | * @param tc Task Context. | ||
1214 | */ | 1213 | */ |
1215 | static void | 1214 | static void |
1216 | collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1215 | collect_stats (void *cls) |
1217 | { | 1216 | { |
1217 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1218 | |||
1219 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1218 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 1220 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
1219 | return; | 1221 | return; |
1220 | 1222 | ||
1221 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Start collecting statistics...\n"); | 1223 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1224 | "Start collecting statistics...\n"); | ||
1222 | GNUNET_assert(NULL != testbed_handles); | 1225 | GNUNET_assert(NULL != testbed_handles); |
1223 | 1226 | ||
1224 | if (0 != max_searches) | 1227 | if (0 != max_searches) |
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index b2d31d02f..2507ff080 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c | |||
@@ -82,7 +82,7 @@ static struct GNUNET_SCHEDULER_Task * die_task; | |||
82 | 82 | ||
83 | 83 | ||
84 | static void | 84 | static void |
85 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 85 | end (void *cls) |
86 | { | 86 | { |
87 | GNUNET_SCHEDULER_cancel (die_task); | 87 | GNUNET_SCHEDULER_cancel (die_task); |
88 | die_task = NULL; | 88 | die_task = NULL; |
@@ -116,11 +116,9 @@ end_badly () | |||
116 | * Signature of the main function of a task. | 116 | * Signature of the main function of a task. |
117 | * | 117 | * |
118 | * @param cls closure | 118 | * @param cls closure |
119 | * @param tc context information (why was this task triggered now) | ||
120 | */ | 119 | */ |
121 | static void | 120 | static void |
122 | test_get_stop (void *cls, | 121 | test_get_stop (void *cls) |
123 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
124 | { | 122 | { |
125 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 123 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
126 | "Called test_get_stop!\n"); | 124 | "Called test_get_stop!\n"); |
diff --git a/src/dht/test_dht_monitor.c b/src/dht/test_dht_monitor.c index fc4b45a45..6b639e341 100644 --- a/src/dht/test_dht_monitor.c +++ b/src/dht/test_dht_monitor.c | |||
@@ -108,11 +108,9 @@ static unsigned int monitor_counter; | |||
108 | * the testbed. | 108 | * the testbed. |
109 | * | 109 | * |
110 | * @param cls the 'struct GNUNET_DHT_TestContext' | 110 | * @param cls the 'struct GNUNET_DHT_TestContext' |
111 | * @param tc scheduler context | ||
112 | */ | 111 | */ |
113 | static void | 112 | static void |
114 | shutdown_task (void *cls, | 113 | shutdown_task (void *cls) |
115 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
116 | { | 114 | { |
117 | struct GNUNET_DHT_TEST_Context *ctx = cls; | 115 | struct GNUNET_DHT_TEST_Context *ctx = cls; |
118 | unsigned int i; | 116 | unsigned int i; |
@@ -197,11 +195,9 @@ dht_get_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
197 | * Task to put the id of each peer into the DHT. | 195 | * Task to put the id of each peer into the DHT. |
198 | * | 196 | * |
199 | * @param cls array with NUM_PEERS DHT handles | 197 | * @param cls array with NUM_PEERS DHT handles |
200 | * @param tc Task context | ||
201 | */ | 198 | */ |
202 | static void | 199 | static void |
203 | do_puts (void *cls, | 200 | do_puts (void *cls) |
204 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
205 | { | 201 | { |
206 | struct GNUNET_DHT_Handle **hs = cls; | 202 | struct GNUNET_DHT_Handle **hs = cls; |
207 | struct GNUNET_HashCode key; | 203 | struct GNUNET_HashCode key; |
diff --git a/src/dht/test_dht_topo.c b/src/dht/test_dht_topo.c index fe6007a21..23ed21717 100644 --- a/src/dht/test_dht_topo.c +++ b/src/dht/test_dht_topo.c | |||
@@ -220,11 +220,9 @@ handle_stats (void *cls, | |||
220 | * the testbed. | 220 | * the testbed. |
221 | * | 221 | * |
222 | * @param cls the 'struct GNUNET_DHT_TestContext' | 222 | * @param cls the 'struct GNUNET_DHT_TestContext' |
223 | * @param tc scheduler context | ||
224 | */ | 223 | */ |
225 | static void | 224 | static void |
226 | shutdown_task (void *cls, | 225 | shutdown_task (void *cls) |
227 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
228 | { | 226 | { |
229 | struct GNUNET_DHT_TEST_Context *ctx = cls; | 227 | struct GNUNET_DHT_TEST_Context *ctx = cls; |
230 | struct GetOperation *get_op; | 228 | struct GetOperation *get_op; |
@@ -323,8 +321,7 @@ dht_get_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
323 | * @param tc Task context | 321 | * @param tc Task context |
324 | */ | 322 | */ |
325 | static void | 323 | static void |
326 | do_puts (void *cls, | 324 | do_puts (void *cls) |
327 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
328 | { | 325 | { |
329 | struct GNUNET_DHT_Handle **hs = cls; | 326 | struct GNUNET_DHT_Handle **hs = cls; |
330 | struct GNUNET_HashCode key; | 327 | struct GNUNET_HashCode key; |
diff --git a/src/dns/dns_api.c b/src/dns/dns_api.c index 984aa1a4c..f96ac3142 100644 --- a/src/dns/dns_api.c +++ b/src/dns/dns_api.c | |||
@@ -162,8 +162,7 @@ queue_reply (struct GNUNET_DNS_Handle *dh, | |||
162 | * @param tc scheduler context (unused) | 162 | * @param tc scheduler context (unused) |
163 | */ | 163 | */ |
164 | static void | 164 | static void |
165 | reconnect (void *cls, | 165 | reconnect (void *cls) |
166 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
167 | { | 166 | { |
168 | struct GNUNET_DNS_Handle *dh = cls; | 167 | struct GNUNET_DNS_Handle *dh = cls; |
169 | struct ReplyQueueEntry *qe; | 168 | struct ReplyQueueEntry *qe; |
@@ -440,7 +439,7 @@ GNUNET_DNS_request_drop (struct GNUNET_DNS_RequestHandle *rh) | |||
440 | * @param reply reply data | 439 | * @param reply reply data |
441 | */ | 440 | */ |
442 | void | 441 | void |
443 | GNUNET_DNS_request_answer (struct GNUNET_DNS_RequestHandle *rh, | 442 | GNUNET_DNS_request_answer (struct GNUNET_DNS_RequestHandle *rh, |
444 | uint16_t reply_length, | 443 | uint16_t reply_length, |
445 | const char *reply) | 444 | const char *reply) |
446 | { | 445 | { |
diff --git a/src/dns/dnsstub.c b/src/dns/dnsstub.c index 32049f66b..957777cba 100644 --- a/src/dns/dnsstub.c +++ b/src/dns/dnsstub.c | |||
@@ -185,11 +185,9 @@ open_socket (int af) | |||
185 | * Read a DNS response from the (unhindered) UDP-Socket | 185 | * Read a DNS response from the (unhindered) UDP-Socket |
186 | * | 186 | * |
187 | * @param cls socket to read from | 187 | * @param cls socket to read from |
188 | * @param tc scheduler context (must be shutdown or read ready) | ||
189 | */ | 188 | */ |
190 | static void | 189 | static void |
191 | read_response (void *cls, | 190 | read_response (void *cls); |
192 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
193 | 191 | ||
194 | 192 | ||
195 | /** | 193 | /** |
@@ -466,16 +464,16 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs, | |||
466 | * Read a DNS response from the (unhindered) UDP-Socket | 464 | * Read a DNS response from the (unhindered) UDP-Socket |
467 | * | 465 | * |
468 | * @param cls socket to read from | 466 | * @param cls socket to read from |
469 | * @param tc scheduler context (must be shutdown or read ready) | ||
470 | */ | 467 | */ |
471 | static void | 468 | static void |
472 | read_response (void *cls, | 469 | read_response (void *cls) |
473 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
474 | { | 470 | { |
475 | struct GNUNET_DNSSTUB_RequestSocket *rs = cls; | 471 | struct GNUNET_DNSSTUB_RequestSocket *rs = cls; |
476 | struct GNUNET_NETWORK_FDSet *rset; | 472 | struct GNUNET_NETWORK_FDSet *rset; |
473 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
477 | 474 | ||
478 | rs->read_task = NULL; | 475 | rs->read_task = NULL; |
476 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
479 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 477 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
480 | { | 478 | { |
481 | /* timeout or shutdown */ | 479 | /* timeout or shutdown */ |
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index a7bc953ee..c9d840325 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c | |||
@@ -303,7 +303,7 @@ display_request (void *cls, | |||
303 | * Shutdown. | 303 | * Shutdown. |
304 | */ | 304 | */ |
305 | static void | 305 | static void |
306 | do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 306 | do_disconnect (void *cls) |
307 | { | 307 | { |
308 | if (NULL != handle) | 308 | if (NULL != handle) |
309 | { | 309 | { |
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c index daf74bf18..8ef69eb91 100644 --- a/src/dns/gnunet-dns-redirector.c +++ b/src/dns/gnunet-dns-redirector.c | |||
@@ -177,7 +177,7 @@ modify_request (void *cls, | |||
177 | * Shutdown. | 177 | * Shutdown. |
178 | */ | 178 | */ |
179 | static void | 179 | static void |
180 | do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 180 | do_disconnect (void *cls) |
181 | { | 181 | { |
182 | if (NULL != handle) | 182 | if (NULL != handle) |
183 | { | 183 | { |
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c index a8fd7b5e2..0f975e82f 100644 --- a/src/dns/gnunet-service-dns.c +++ b/src/dns/gnunet-service-dns.c | |||
@@ -273,11 +273,9 @@ cleanup_rr (struct RequestRecord *rr) | |||
273 | * Task run during shutdown. | 273 | * Task run during shutdown. |
274 | * | 274 | * |
275 | * @param cls unused | 275 | * @param cls unused |
276 | * @param tc unused | ||
277 | */ | 276 | */ |
278 | static void | 277 | static void |
279 | cleanup_task (void *cls GNUNET_UNUSED, | 278 | cleanup_task (void *cls GNUNET_UNUSED) |
280 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
281 | { | 279 | { |
282 | unsigned int i; | 280 | unsigned int i; |
283 | 281 | ||
diff --git a/src/dv/gnunet-dv.c b/src/dv/gnunet-dv.c index 42234ad21..d5d95acca 100644 --- a/src/dv/gnunet-dv.c +++ b/src/dv/gnunet-dv.c | |||
@@ -119,11 +119,9 @@ message_cb (void *cls, | |||
119 | * Task run on shutdown. | 119 | * Task run on shutdown. |
120 | * | 120 | * |
121 | * @param cls NULL | 121 | * @param cls NULL |
122 | * @param tc unused | ||
123 | */ | 122 | */ |
124 | static void | 123 | static void |
125 | shutdown_task (void *cls, | 124 | shutdown_task (void *cls) |
126 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
127 | { | 125 | { |
128 | GNUNET_DV_service_disconnect (sh); | 126 | GNUNET_DV_service_disconnect (sh); |
129 | sh = NULL; | 127 | sh = NULL; |
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 2ddd99197..bd0057ab4 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -398,11 +398,9 @@ static int in_shutdown; | |||
398 | * | 398 | * |
399 | * @param cls the 'struct DirectNeighbor' of the peer we're building | 399 | * @param cls the 'struct DirectNeighbor' of the peer we're building |
400 | * a routing consensus with | 400 | * a routing consensus with |
401 | * @param tc scheduler context | ||
402 | */ | 401 | */ |
403 | static void | 402 | static void |
404 | initiate_set_union (void *cls, | 403 | initiate_set_union (void *cls); |
405 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
406 | 404 | ||
407 | 405 | ||
408 | /** | 406 | /** |
@@ -1132,11 +1130,9 @@ refresh_routes (void *cls, | |||
1132 | * Task to run #refresh_routes() on all direct neighbours. | 1130 | * Task to run #refresh_routes() on all direct neighbours. |
1133 | * | 1131 | * |
1134 | * @param cls NULL | 1132 | * @param cls NULL |
1135 | * @param tc unused | ||
1136 | */ | 1133 | */ |
1137 | static void | 1134 | static void |
1138 | refresh_routes_task (void *cls, | 1135 | refresh_routes_task (void *cls) |
1139 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1140 | { | 1136 | { |
1141 | rr_task = NULL; | 1137 | rr_task = NULL; |
1142 | GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors, | 1138 | GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors, |
@@ -1692,11 +1688,9 @@ listen_set_union (void *cls, | |||
1692 | * | 1688 | * |
1693 | * @param cls the `struct DirectNeighbor *` of the peer we're building | 1689 | * @param cls the `struct DirectNeighbor *` of the peer we're building |
1694 | * a routing consensus with | 1690 | * a routing consensus with |
1695 | * @param tc scheduler context | ||
1696 | */ | 1691 | */ |
1697 | static void | 1692 | static void |
1698 | initiate_set_union (void *cls, | 1693 | initiate_set_union (void *cls) |
1699 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1700 | { | 1694 | { |
1701 | struct DirectNeighbor *neighbor = cls; | 1695 | struct DirectNeighbor *neighbor = cls; |
1702 | 1696 | ||
@@ -2082,11 +2076,9 @@ free_direct_neighbors (void *cls, | |||
2082 | * Task run during shutdown. | 2076 | * Task run during shutdown. |
2083 | * | 2077 | * |
2084 | * @param cls unused | 2078 | * @param cls unused |
2085 | * @param tc unused | ||
2086 | */ | 2079 | */ |
2087 | static void | 2080 | static void |
2088 | shutdown_task (void *cls, | 2081 | shutdown_task (void *cls) |
2089 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2090 | { | 2082 | { |
2091 | unsigned int i; | 2083 | unsigned int i; |
2092 | 2084 | ||
diff --git a/src/dv/test_transport_dv.c b/src/dv/test_transport_dv.c index 245914f07..1afa30fa9 100644 --- a/src/dv/test_transport_dv.c +++ b/src/dv/test_transport_dv.c | |||
@@ -36,8 +36,7 @@ static struct GNUNET_SCHEDULER_Task * shutdown_task; | |||
36 | 36 | ||
37 | 37 | ||
38 | static void | 38 | static void |
39 | do_shutdown (void *cls, | 39 | do_shutdown (void *cls) |
40 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
41 | { | 40 | { |
42 | shutdown_task = NULL; | 41 | shutdown_task = NULL; |
43 | if (NULL != topology_op) | 42 | if (NULL != topology_op) |
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index c44fbbfbd..8456018ab 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -3139,8 +3139,7 @@ free_iterate (void *cls, | |||
3139 | * @param tc scheduler context | 3139 | * @param tc scheduler context |
3140 | */ | 3140 | */ |
3141 | static void | 3141 | static void |
3142 | dummy_task (void *cls, | 3142 | dummy_task (void *cls) |
3143 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3144 | { | 3143 | { |
3145 | /* just terminate */ | 3144 | /* just terminate */ |
3146 | } | 3145 | } |
@@ -3153,8 +3152,7 @@ dummy_task (void *cls, | |||
3153 | * @param tc scheduler context | 3152 | * @param tc scheduler context |
3154 | */ | 3153 | */ |
3155 | static void | 3154 | static void |
3156 | cleanup (void *cls, | 3155 | cleanup (void *cls) |
3157 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3158 | { | 3156 | { |
3159 | unsigned int i; | 3157 | unsigned int i; |
3160 | 3158 | ||
@@ -3428,11 +3426,9 @@ read_service_conf (void *cls, | |||
3428 | * DHT. This task is run periodically to do the DHT PUT. | 3426 | * DHT. This task is run periodically to do the DHT PUT. |
3429 | * | 3427 | * |
3430 | * @param cls closure | 3428 | * @param cls closure |
3431 | * @param tc scheduler context | ||
3432 | */ | 3429 | */ |
3433 | static void | 3430 | static void |
3434 | do_dht_put (void *cls, | 3431 | do_dht_put (void *cls); |
3435 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
3436 | 3432 | ||
3437 | 3433 | ||
3438 | /** | 3434 | /** |
@@ -3458,11 +3454,9 @@ dht_put_cont (void *cls, | |||
3458 | * DHT. This task is run periodically to do the DHT PUT. | 3454 | * DHT. This task is run periodically to do the DHT PUT. |
3459 | * | 3455 | * |
3460 | * @param cls closure | 3456 | * @param cls closure |
3461 | * @param tc scheduler context | ||
3462 | */ | 3457 | */ |
3463 | static void | 3458 | static void |
3464 | do_dht_put (void *cls, | 3459 | do_dht_put (void *cls) |
3465 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3466 | { | 3460 | { |
3467 | struct GNUNET_TIME_Absolute expiration; | 3461 | struct GNUNET_TIME_Absolute expiration; |
3468 | 3462 | ||
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index 5fcf1c441..5433ffb5a 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c | |||
@@ -258,11 +258,9 @@ GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc) | |||
258 | * Send acknowledgement to the other peer now. | 258 | * Send acknowledgement to the other peer now. |
259 | * | 259 | * |
260 | * @param cls the message context | 260 | * @param cls the message context |
261 | * @param tc the scheduler context | ||
262 | */ | 261 | */ |
263 | static void | 262 | static void |
264 | send_ack (void *cls, | 263 | send_ack (void *cls) |
265 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
266 | { | 264 | { |
267 | struct MessageContext *mc = cls; | 265 | struct MessageContext *mc = cls; |
268 | struct GNUNET_DEFRAGMENT_Context *dc = mc->dc; | 266 | struct GNUNET_DEFRAGMENT_Context *dc = mc->dc; |
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index a702fd35d..3a55502e7 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c | |||
@@ -167,11 +167,9 @@ GNUNET_FRAGMENT_print_ack (const struct GNUNET_MessageHeader *ack) | |||
167 | * Transmit the next fragment to the other peer. | 167 | * Transmit the next fragment to the other peer. |
168 | * | 168 | * |
169 | * @param cls the `struct GNUNET_FRAGMENT_Context` | 169 | * @param cls the `struct GNUNET_FRAGMENT_Context` |
170 | * @param tc scheduler context | ||
171 | */ | 170 | */ |
172 | static void | 171 | static void |
173 | transmit_next (void *cls, | 172 | transmit_next (void *cls) |
174 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
175 | { | 173 | { |
176 | struct GNUNET_FRAGMENT_Context *fc = cls; | 174 | struct GNUNET_FRAGMENT_Context *fc = cls; |
177 | char msg[fc->mtu]; | 175 | char msg[fc->mtu]; |
diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c index d3591f4a1..61ba73bb2 100644 --- a/src/fragmentation/test_fragmentation.c +++ b/src/fragmentation/test_fragmentation.c | |||
@@ -68,7 +68,7 @@ static struct GNUNET_TIME_Relative ack_delay; | |||
68 | 68 | ||
69 | 69 | ||
70 | static void | 70 | static void |
71 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 71 | do_shutdown (void *cls) |
72 | { | 72 | { |
73 | ret = 0; | 73 | ret = 0; |
74 | shutdown_task = NULL; | 74 | shutdown_task = NULL; |
diff --git a/src/fragmentation/test_fragmentation_parallel.c b/src/fragmentation/test_fragmentation_parallel.c index 2ade88c05..23349e6f7 100644 --- a/src/fragmentation/test_fragmentation_parallel.c +++ b/src/fragmentation/test_fragmentation_parallel.c | |||
@@ -60,10 +60,11 @@ static struct GNUNET_BANDWIDTH_Tracker trackers[NUM_MSGS]; | |||
60 | 60 | ||
61 | static struct GNUNET_FRAGMENT_Context *frags[NUM_MSGS]; | 61 | static struct GNUNET_FRAGMENT_Context *frags[NUM_MSGS]; |
62 | 62 | ||
63 | static struct GNUNET_SCHEDULER_Task * shutdown_task; | 63 | static struct GNUNET_SCHEDULER_Task *shutdown_task; |
64 | |||
64 | 65 | ||
65 | static void | 66 | static void |
66 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 67 | do_shutdown (void *cls) |
67 | { | 68 | { |
68 | unsigned int i; | 69 | unsigned int i; |
69 | 70 | ||
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index f85b8e739..2db475528 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -108,11 +108,9 @@ stop_job (struct GNUNET_FS_QueueEntry *qe) | |||
108 | * and stopping others. | 108 | * and stopping others. |
109 | * | 109 | * |
110 | * @param cls the `struct GNUNET_FS_Handle *` | 110 | * @param cls the `struct GNUNET_FS_Handle *` |
111 | * @param tc scheduler context | ||
112 | */ | 111 | */ |
113 | static void | 112 | static void |
114 | process_job_queue (void *cls, | 113 | process_job_queue (void *cls) |
115 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
116 | { | 114 | { |
117 | struct GNUNET_FS_Handle *h = cls; | 115 | struct GNUNET_FS_Handle *h = cls; |
118 | struct GNUNET_FS_QueueEntry *qe; | 116 | struct GNUNET_FS_QueueEntry *qe; |
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h index e9f9ab2cb..0e1476f5c 100644 --- a/src/fs/fs_api.h +++ b/src/fs/fs_api.h | |||
@@ -757,11 +757,9 @@ GNUNET_FS_search_probe_progress_ (void *cls, | |||
757 | * Main function that performs the upload. | 757 | * Main function that performs the upload. |
758 | * | 758 | * |
759 | * @param cls `struct GNUNET_FS_PublishContext` identifies the upload | 759 | * @param cls `struct GNUNET_FS_PublishContext` identifies the upload |
760 | * @param tc task context | ||
761 | */ | 760 | */ |
762 | void | 761 | void |
763 | GNUNET_FS_publish_main_ (void *cls, | 762 | GNUNET_FS_publish_main_ (void *cls); |
764 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
765 | 763 | ||
766 | 764 | ||
767 | /** | 765 | /** |
@@ -828,11 +826,9 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
828 | * request for the file. | 826 | * request for the file. |
829 | * | 827 | * |
830 | * @param cls the 'struct GNUNET_FS_DownloadContext' | 828 | * @param cls the 'struct GNUNET_FS_DownloadContext' |
831 | * @param tc scheduler context | ||
832 | */ | 829 | */ |
833 | void | 830 | void |
834 | GNUNET_FS_download_start_task_ (void *cls, | 831 | GNUNET_FS_download_start_task_ (void *cls); |
835 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
836 | 832 | ||
837 | 833 | ||
838 | 834 | ||
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c index 72098957d..2f79c7c05 100644 --- a/src/fs/fs_dirmetascan.c +++ b/src/fs/fs_dirmetascan.c | |||
@@ -222,11 +222,9 @@ expand_tree (struct GNUNET_FS_ShareTreeItem *parent, | |||
222 | * Task run last to shut everything down. | 222 | * Task run last to shut everything down. |
223 | * | 223 | * |
224 | * @param cls the 'struct GNUNET_FS_DirScanner' | 224 | * @param cls the 'struct GNUNET_FS_DirScanner' |
225 | * @param tc unused | ||
226 | */ | 225 | */ |
227 | static void | 226 | static void |
228 | finish_scan (void *cls, | 227 | finish_scan (void *cls) |
229 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
230 | { | 228 | { |
231 | struct GNUNET_FS_DirScanner *ds = cls; | 229 | struct GNUNET_FS_DirScanner *ds = cls; |
232 | 230 | ||
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index f43524553..e8b632a3f 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -1372,10 +1372,9 @@ transmit_download_request (void *cls, size_t size, void *buf) | |||
1372 | * Reconnect to the FS service and transmit our queries NOW. | 1372 | * Reconnect to the FS service and transmit our queries NOW. |
1373 | * | 1373 | * |
1374 | * @param cls our download context | 1374 | * @param cls our download context |
1375 | * @param tc unused | ||
1376 | */ | 1375 | */ |
1377 | static void | 1376 | static void |
1378 | do_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1377 | do_reconnect (void *cls) |
1379 | { | 1378 | { |
1380 | struct GNUNET_FS_DownloadContext *dc = cls; | 1379 | struct GNUNET_FS_DownloadContext *dc = cls; |
1381 | struct GNUNET_CLIENT_Connection *client; | 1380 | struct GNUNET_CLIENT_Connection *client; |
@@ -1625,10 +1624,9 @@ create_download_request (struct DownloadRequest *parent, | |||
1625 | * the current IBlock from the existing file. | 1624 | * the current IBlock from the existing file. |
1626 | * | 1625 | * |
1627 | * @param cls the 'struct ReconstructContext' | 1626 | * @param cls the 'struct ReconstructContext' |
1628 | * @param tc scheduler context | ||
1629 | */ | 1627 | */ |
1630 | static void | 1628 | static void |
1631 | reconstruct_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1629 | reconstruct_cont (void *cls) |
1632 | { | 1630 | { |
1633 | struct GNUNET_FS_DownloadContext *dc = cls; | 1631 | struct GNUNET_FS_DownloadContext *dc = cls; |
1634 | 1632 | ||
@@ -1655,10 +1653,9 @@ reconstruct_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1655 | * Task requesting the next block from the tree encoder. | 1653 | * Task requesting the next block from the tree encoder. |
1656 | * | 1654 | * |
1657 | * @param cls the 'struct GNUJNET_FS_DownloadContext' we're processing | 1655 | * @param cls the 'struct GNUJNET_FS_DownloadContext' we're processing |
1658 | * @param tc task context | ||
1659 | */ | 1656 | */ |
1660 | static void | 1657 | static void |
1661 | get_next_block (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1658 | get_next_block (void *cls) |
1662 | { | 1659 | { |
1663 | struct GNUNET_FS_DownloadContext *dc = cls; | 1660 | struct GNUNET_FS_DownloadContext *dc = cls; |
1664 | 1661 | ||
@@ -1855,11 +1852,9 @@ fh_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg) | |||
1855 | * request for the file. | 1852 | * request for the file. |
1856 | * | 1853 | * |
1857 | * @param cls the 'struct GNUNET_FS_DownloadContext' | 1854 | * @param cls the 'struct GNUNET_FS_DownloadContext' |
1858 | * @param tc scheduler context | ||
1859 | */ | 1855 | */ |
1860 | void | 1856 | void |
1861 | GNUNET_FS_download_start_task_ (void *cls, | 1857 | GNUNET_FS_download_start_task_ (void *cls) |
1862 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1863 | { | 1858 | { |
1864 | struct GNUNET_FS_DownloadContext *dc = cls; | 1859 | struct GNUNET_FS_DownloadContext *dc = cls; |
1865 | struct GNUNET_FS_ProgressInfo pi; | 1860 | struct GNUNET_FS_ProgressInfo pi; |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 1e8e82c71..80843006e 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -413,11 +413,9 @@ block_reader (void *cls, | |||
413 | * the final result. | 413 | * the final result. |
414 | * | 414 | * |
415 | * @param cls our publishing context | 415 | * @param cls our publishing context |
416 | * @param tc scheduler's task context (not used) | ||
417 | */ | 416 | */ |
418 | static void | 417 | static void |
419 | encode_cont (void *cls, | 418 | encode_cont (void *cls) |
420 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
421 | { | 419 | { |
422 | struct GNUNET_FS_PublishContext *pc = cls; | 420 | struct GNUNET_FS_PublishContext *pc = cls; |
423 | struct GNUNET_FS_FileInformation *p; | 421 | struct GNUNET_FS_FileInformation *p; |
@@ -960,11 +958,9 @@ create_loc_uri (struct GNUNET_FS_PublishContext *pc) | |||
960 | * Main function that performs the upload. | 958 | * Main function that performs the upload. |
961 | * | 959 | * |
962 | * @param cls `struct GNUNET_FS_PublishContext *` identifies the upload | 960 | * @param cls `struct GNUNET_FS_PublishContext *` identifies the upload |
963 | * @param tc task context | ||
964 | */ | 961 | */ |
965 | void | 962 | void |
966 | GNUNET_FS_publish_main_ (void *cls, | 963 | GNUNET_FS_publish_main_ (void *cls) |
967 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
968 | { | 964 | { |
969 | struct GNUNET_FS_PublishContext *pc = cls; | 965 | struct GNUNET_FS_PublishContext *pc = cls; |
970 | struct GNUNET_FS_ProgressInfo pi; | 966 | struct GNUNET_FS_ProgressInfo pi; |
diff --git a/src/fs/fs_publish_ksk.c b/src/fs/fs_publish_ksk.c index b3e9de728..a7ad3e91f 100644 --- a/src/fs/fs_publish_ksk.c +++ b/src/fs/fs_publish_ksk.c | |||
@@ -110,11 +110,9 @@ struct GNUNET_FS_PublishKskContext | |||
110 | * of the keywords). | 110 | * of the keywords). |
111 | * | 111 | * |
112 | * @param cls closure of type `struct PublishKskContext *` | 112 | * @param cls closure of type `struct PublishKskContext *` |
113 | * @param tc unused | ||
114 | */ | 113 | */ |
115 | static void | 114 | static void |
116 | publish_ksk_cont (void *cls, | 115 | publish_ksk_cont (void *cls); |
117 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
118 | 116 | ||
119 | 117 | ||
120 | /** | 118 | /** |
@@ -148,11 +146,9 @@ kb_put_cont (void *cls, | |||
148 | * publishing operation (iterating over all of the keywords). | 146 | * publishing operation (iterating over all of the keywords). |
149 | * | 147 | * |
150 | * @param cls closure of type `struct GNUNET_FS_PublishKskContext *` | 148 | * @param cls closure of type `struct GNUNET_FS_PublishKskContext *` |
151 | * @param tc unused | ||
152 | */ | 149 | */ |
153 | static void | 150 | static void |
154 | publish_ksk_cont (void *cls, | 151 | publish_ksk_cont (void *cls) |
155 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
156 | { | 152 | { |
157 | struct GNUNET_FS_PublishKskContext *pkc = cls; | 153 | struct GNUNET_FS_PublishKskContext *pkc = cls; |
158 | const char *keyword; | 154 | const char *keyword; |
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c index 7cdad396b..9ea7bf41b 100644 --- a/src/fs/fs_publish_ublock.c +++ b/src/fs/fs_publish_ublock.c | |||
@@ -147,11 +147,9 @@ ublock_put_cont (void *cls, | |||
147 | * Run the continuation. | 147 | * Run the continuation. |
148 | * | 148 | * |
149 | * @param cls the `struct GNUNET_FS_PublishUblockContext *` | 149 | * @param cls the `struct GNUNET_FS_PublishUblockContext *` |
150 | * @param tc scheduler context | ||
151 | */ | 150 | */ |
152 | static void | 151 | static void |
153 | run_cont (void *cls, | 152 | run_cont (void *cls) |
154 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
155 | { | 153 | { |
156 | struct GNUNET_FS_PublishUblockContext *uc = cls; | 154 | struct GNUNET_FS_PublishUblockContext *uc = cls; |
157 | 155 | ||
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 626d23a72..eaabac746 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -215,11 +215,9 @@ signal_probe_result (struct GNUNET_FS_SearchResult *sr) | |||
215 | * Handle the case where we have failed to receive a response for our probe. | 215 | * Handle the case where we have failed to receive a response for our probe. |
216 | * | 216 | * |
217 | * @param cls our `struct GNUNET_FS_SearchResult *` | 217 | * @param cls our `struct GNUNET_FS_SearchResult *` |
218 | * @param tc scheduler context | ||
219 | */ | 218 | */ |
220 | static void | 219 | static void |
221 | probe_failure_handler (void *cls, | 220 | probe_failure_handler (void *cls) |
222 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
223 | { | 221 | { |
224 | struct GNUNET_FS_SearchResult *sr = cls; | 222 | struct GNUNET_FS_SearchResult *sr = cls; |
225 | 223 | ||
@@ -241,11 +239,9 @@ probe_failure_handler (void *cls, | |||
241 | * Handle the case where we have gotten a response for our probe. | 239 | * Handle the case where we have gotten a response for our probe. |
242 | * | 240 | * |
243 | * @param cls our `struct GNUNET_FS_SearchResult *` | 241 | * @param cls our `struct GNUNET_FS_SearchResult *` |
244 | * @param tc scheduler context | ||
245 | */ | 242 | */ |
246 | static void | 243 | static void |
247 | probe_success_handler (void *cls, | 244 | probe_success_handler (void *cls) |
248 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
249 | { | 245 | { |
250 | struct GNUNET_FS_SearchResult *sr = cls; | 246 | struct GNUNET_FS_SearchResult *sr = cls; |
251 | 247 | ||
@@ -364,11 +360,9 @@ GNUNET_FS_search_probe_progress_ (void *cls, | |||
364 | * Task run periodically to remind clients that a probe is active. | 360 | * Task run periodically to remind clients that a probe is active. |
365 | * | 361 | * |
366 | * @param cls the `struct GNUNET_FS_SearchResult` that we are probing for | 362 | * @param cls the `struct GNUNET_FS_SearchResult` that we are probing for |
367 | * @param tc scheduler context | ||
368 | */ | 363 | */ |
369 | static void | 364 | static void |
370 | probe_ping_task_cb (void *cls, | 365 | probe_ping_task_cb (void *cls) |
371 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
372 | { | 366 | { |
373 | struct GNUNET_FS_Handle *h = cls; | 367 | struct GNUNET_FS_Handle *h = cls; |
374 | struct GNUNET_FS_SearchResult *sr; | 368 | struct GNUNET_FS_SearchResult *sr; |
@@ -1245,10 +1239,9 @@ schedule_transmit_search_request (struct GNUNET_FS_SearchContext *sc) | |||
1245 | * our queries NOW. | 1239 | * our queries NOW. |
1246 | * | 1240 | * |
1247 | * @param cls our search context | 1241 | * @param cls our search context |
1248 | * @param tc unused | ||
1249 | */ | 1242 | */ |
1250 | static void | 1243 | static void |
1251 | do_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1244 | do_reconnect (void *cls) |
1252 | { | 1245 | { |
1253 | struct GNUNET_FS_SearchContext *sc = cls; | 1246 | struct GNUNET_FS_SearchContext *sc = cls; |
1254 | struct GNUNET_CLIENT_Connection *client; | 1247 | struct GNUNET_CLIENT_Connection *client; |
@@ -1637,7 +1630,7 @@ GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc) | |||
1637 | 1630 | ||
1638 | GNUNET_assert (NULL == sc->client); | 1631 | GNUNET_assert (NULL == sc->client); |
1639 | GNUNET_assert (NULL == sc->task); | 1632 | GNUNET_assert (NULL == sc->task); |
1640 | do_reconnect (sc, NULL); | 1633 | do_reconnect (sc); |
1641 | GNUNET_FS_search_sync_ (sc); | 1634 | GNUNET_FS_search_sync_ (sc); |
1642 | pi.status = GNUNET_FS_STATUS_SEARCH_CONTINUED; | 1635 | pi.status = GNUNET_FS_STATUS_SEARCH_CONTINUED; |
1643 | sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); | 1636 | sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); |
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index 6bd156e8b..d03888021 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c | |||
@@ -183,8 +183,7 @@ struct TestDownloadOperation | |||
183 | * @param tc scheduler context (unused) | 183 | * @param tc scheduler context (unused) |
184 | */ | 184 | */ |
185 | static void | 185 | static void |
186 | report_uri (void *cls, | 186 | report_uri (void *cls) |
187 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
188 | { | 187 | { |
189 | struct TestPublishOperation *po = cls; | 188 | struct TestPublishOperation *po = cls; |
190 | 189 | ||
@@ -208,10 +207,9 @@ report_uri (void *cls, | |||
208 | * Task scheduled to run when publish operation times out. | 207 | * Task scheduled to run when publish operation times out. |
209 | * | 208 | * |
210 | * @param cls the publish operation context | 209 | * @param cls the publish operation context |
211 | * @param tc scheduler context (unused) | ||
212 | */ | 210 | */ |
213 | static void | 211 | static void |
214 | publish_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 212 | publish_timeout (void *cls) |
215 | { | 213 | { |
216 | struct TestPublishOperation *po = cls; | 214 | struct TestPublishOperation *po = cls; |
217 | 215 | ||
@@ -480,10 +478,9 @@ GNUNET_FS_TEST_publish (struct GNUNET_TESTBED_Peer *peer, | |||
480 | * Task scheduled to run when download operation times out. | 478 | * Task scheduled to run when download operation times out. |
481 | * | 479 | * |
482 | * @param cls the download operation context | 480 | * @param cls the download operation context |
483 | * @param tc scheduler context (unused) | ||
484 | */ | 481 | */ |
485 | static void | 482 | static void |
486 | download_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 483 | download_timeout (void *cls) |
487 | { | 484 | { |
488 | struct TestDownloadOperation *dop = cls; | 485 | struct TestDownloadOperation *dop = cls; |
489 | 486 | ||
@@ -504,11 +501,9 @@ download_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
504 | * Task scheduled to report on the completion of our download operation. | 501 | * Task scheduled to report on the completion of our download operation. |
505 | * | 502 | * |
506 | * @param cls the download operation context | 503 | * @param cls the download operation context |
507 | * @param tc scheduler context (unused) | ||
508 | */ | 504 | */ |
509 | static void | 505 | static void |
510 | report_success (void *cls, | 506 | report_success (void *cls) |
511 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
512 | { | 507 | { |
513 | struct TestDownloadOperation *dop = cls; | 508 | struct TestDownloadOperation *dop = cls; |
514 | 509 | ||
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 57c4c567f..b3c632203 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -352,7 +352,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te) | |||
352 | te->uri->data.chk.chk = te->chk_tree[off]; | 352 | te->uri->data.chk.chk = te->chk_tree[off]; |
353 | te->uri->data.chk.file_length = GNUNET_htonll (te->size); | 353 | te->uri->data.chk.file_length = GNUNET_htonll (te->size); |
354 | te->in_next = GNUNET_NO; | 354 | te->in_next = GNUNET_NO; |
355 | te->cont (te->cls, NULL); | 355 | te->cont (te->cls); |
356 | return; | 356 | return; |
357 | } | 357 | } |
358 | if (0 == te->current_depth) | 358 | if (0 == te->current_depth) |
@@ -363,7 +363,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te) | |||
363 | te->reader (te->cls, te->publish_offset, pt_size, iob, &te->emsg)) | 363 | te->reader (te->cls, te->publish_offset, pt_size, iob, &te->emsg)) |
364 | { | 364 | { |
365 | te->in_next = GNUNET_NO; | 365 | te->in_next = GNUNET_NO; |
366 | te->cont (te->cls, NULL); | 366 | te->cont (te->cls); |
367 | return; | 367 | return; |
368 | } | 368 | } |
369 | pt_block = iob; | 369 | pt_block = iob; |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 88d3dd0ea..2e9c17217 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -626,11 +626,9 @@ GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc) | |||
626 | * processed all blocks. Clean up. | 626 | * processed all blocks. Clean up. |
627 | * | 627 | * |
628 | * @param cls our unindexing context | 628 | * @param cls our unindexing context |
629 | * @param tc not used | ||
630 | */ | 629 | */ |
631 | static void | 630 | static void |
632 | unindex_extract_keywords (void *cls, | 631 | unindex_extract_keywords (void *cls) |
633 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
634 | { | 632 | { |
635 | struct GNUNET_FS_UnindexContext *uc = cls; | 633 | struct GNUNET_FS_UnindexContext *uc = cls; |
636 | 634 | ||
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c index 3e5c8777c..aef66614c 100644 --- a/src/fs/gnunet-auto-share.c +++ b/src/fs/gnunet-auto-share.c | |||
@@ -317,17 +317,15 @@ save_state () | |||
317 | * Task run on shutdown. Serializes our current state to disk. | 317 | * Task run on shutdown. Serializes our current state to disk. |
318 | * | 318 | * |
319 | * @param cls closure, unused | 319 | * @param cls closure, unused |
320 | * @param tc scheduler context, unused | ||
321 | */ | 320 | */ |
322 | static void | 321 | static void |
323 | do_stop_task (void *cls, | 322 | do_stop_task (void *cls) |
324 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
325 | { | 323 | { |
326 | kill_task = NULL; | 324 | kill_task = NULL; |
327 | do_shutdown = GNUNET_YES; | 325 | do_shutdown = GNUNET_YES; |
328 | if (NULL != publish_proc) | 326 | if (NULL != publish_proc) |
329 | { | 327 | { |
330 | GNUNET_OS_process_kill (publish_proc, | 328 | GNUNET_OS_process_kill (publish_proc, |
331 | SIGKILL); | 329 | SIGKILL); |
332 | return; | 330 | return; |
333 | } | 331 | } |
@@ -351,11 +349,9 @@ schedule_next_task (void); | |||
351 | * process died). | 349 | * process died). |
352 | * | 350 | * |
353 | * @param cls the `struct WorkItem` we were working on | 351 | * @param cls the `struct WorkItem` we were working on |
354 | * @param tc context | ||
355 | */ | 352 | */ |
356 | static void | 353 | static void |
357 | maint_child_death (void *cls, | 354 | maint_child_death (void *cls) |
358 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
359 | { | 355 | { |
360 | struct WorkItem *wi = cls; | 356 | struct WorkItem *wi = cls; |
361 | struct GNUNET_HashCode key; | 357 | struct GNUNET_HashCode key; |
@@ -364,10 +360,12 @@ maint_child_death (void *cls, | |||
364 | int ret; | 360 | int ret; |
365 | char c; | 361 | char c; |
366 | const struct GNUNET_DISK_FileHandle *pr; | 362 | const struct GNUNET_DISK_FileHandle *pr; |
363 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
367 | 364 | ||
368 | run_task = NULL; | 365 | run_task = NULL; |
369 | pr = GNUNET_DISK_pipe_handle (sigpipe, | 366 | pr = GNUNET_DISK_pipe_handle (sigpipe, |
370 | GNUNET_DISK_PIPE_END_READ); | 367 | GNUNET_DISK_PIPE_END_READ); |
368 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
371 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 369 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
372 | { | 370 | { |
373 | /* shutdown scheduled us, someone else will kill child, | 371 | /* shutdown scheduled us, someone else will kill child, |
@@ -389,7 +387,7 @@ maint_child_death (void *cls, | |||
389 | { | 387 | { |
390 | /* process still running? Then where did the SIGCHLD come from? | 388 | /* process still running? Then where did the SIGCHLD come from? |
391 | Well, let's declare it spurious (kernel bug?) and keep rolling. | 389 | Well, let's declare it spurious (kernel bug?) and keep rolling. |
392 | */ | 390 | */ |
393 | GNUNET_break (0); | 391 | GNUNET_break (0); |
394 | run_task = | 392 | run_task = |
395 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 393 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
@@ -398,7 +396,7 @@ maint_child_death (void *cls, | |||
398 | return; | 396 | return; |
399 | } | 397 | } |
400 | GNUNET_assert (GNUNET_OK == ret); | 398 | GNUNET_assert (GNUNET_OK == ret); |
401 | 399 | ||
402 | GNUNET_OS_process_destroy (publish_proc); | 400 | GNUNET_OS_process_destroy (publish_proc); |
403 | publish_proc = NULL; | 401 | publish_proc = NULL; |
404 | 402 | ||
@@ -457,11 +455,9 @@ sighandler_child_death () | |||
457 | * Function called to process work items. | 455 | * Function called to process work items. |
458 | * | 456 | * |
459 | * @param cls closure, NULL | 457 | * @param cls closure, NULL |
460 | * @param tc scheduler context (unused) | ||
461 | */ | 458 | */ |
462 | static void | 459 | static void |
463 | work (void *cls, | 460 | work (void *cls) |
464 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
465 | { | 461 | { |
466 | static char *argv[14]; | 462 | static char *argv[14]; |
467 | static char anon_level[20]; | 463 | static char anon_level[20]; |
@@ -521,7 +517,7 @@ work (void *cls, | |||
521 | NULL); | 517 | NULL); |
522 | return; | 518 | return; |
523 | } | 519 | } |
524 | pr = GNUNET_DISK_pipe_handle (sigpipe, | 520 | pr = GNUNET_DISK_pipe_handle (sigpipe, |
525 | GNUNET_DISK_PIPE_END_READ); | 521 | GNUNET_DISK_PIPE_END_READ); |
526 | run_task = | 522 | run_task = |
527 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 523 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
@@ -549,13 +545,13 @@ determine_id (void *cls, | |||
549 | 545 | ||
550 | if (0 != STAT (filename, &sbuf)) | 546 | if (0 != STAT (filename, &sbuf)) |
551 | { | 547 | { |
552 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, | 548 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, |
553 | "stat", | 549 | "stat", |
554 | filename); | 550 | filename); |
555 | return GNUNET_OK; | 551 | return GNUNET_OK; |
556 | } | 552 | } |
557 | GNUNET_CRYPTO_hash (filename, | 553 | GNUNET_CRYPTO_hash (filename, |
558 | strlen (filename), | 554 | strlen (filename), |
559 | &fx[0]); | 555 | &fx[0]); |
560 | if (!S_ISDIR (sbuf.st_mode)) | 556 | if (!S_ISDIR (sbuf.st_mode)) |
561 | { | 557 | { |
@@ -564,8 +560,8 @@ determine_id (void *cls, | |||
564 | fattr[0] = GNUNET_htonll (sbuf.st_size); | 560 | fattr[0] = GNUNET_htonll (sbuf.st_size); |
565 | fattr[0] = GNUNET_htonll (sbuf.st_mtime); | 561 | fattr[0] = GNUNET_htonll (sbuf.st_mtime); |
566 | 562 | ||
567 | GNUNET_CRYPTO_hash (fattr, | 563 | GNUNET_CRYPTO_hash (fattr, |
568 | sizeof (fattr), | 564 | sizeof (fattr), |
569 | &fx[1]); | 565 | &fx[1]); |
570 | } | 566 | } |
571 | else | 567 | else |
@@ -579,7 +575,7 @@ determine_id (void *cls, | |||
579 | } | 575 | } |
580 | /* use hash here to make hierarchical structure distinct from | 576 | /* use hash here to make hierarchical structure distinct from |
581 | all files on the same level */ | 577 | all files on the same level */ |
582 | GNUNET_CRYPTO_hash (fx, | 578 | GNUNET_CRYPTO_hash (fx, |
583 | sizeof (fx), | 579 | sizeof (fx), |
584 | &ft); | 580 | &ft); |
585 | /* use XOR here so that order of the files in the directory | 581 | /* use XOR here so that order of the files in the directory |
@@ -653,11 +649,9 @@ add_file (void *cls, | |||
653 | * Periodically run task to update our view of the directory to share. | 649 | * Periodically run task to update our view of the directory to share. |
654 | * | 650 | * |
655 | * @param cls NULL | 651 | * @param cls NULL |
656 | * @param tc scheduler context, unused | ||
657 | */ | 652 | */ |
658 | static void | 653 | static void |
659 | scan (void *cls, | 654 | scan (void *cls) |
660 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
661 | { | 655 | { |
662 | run_task = NULL; | 656 | run_task = NULL; |
663 | start_time = GNUNET_TIME_absolute_get (); | 657 | start_time = GNUNET_TIME_absolute_get (); |
@@ -695,7 +689,7 @@ schedule_next_task () | |||
695 | } | 689 | } |
696 | else | 690 | else |
697 | { | 691 | { |
698 | run_task = GNUNET_SCHEDULER_add_now (&work, | 692 | run_task = GNUNET_SCHEDULER_add_now (&work, |
699 | NULL); | 693 | NULL); |
700 | } | 694 | } |
701 | } | 695 | } |
@@ -710,15 +704,15 @@ schedule_next_task () | |||
710 | * @param c configuration | 704 | * @param c configuration |
711 | */ | 705 | */ |
712 | static void | 706 | static void |
713 | run (void *cls, | 707 | run (void *cls, |
714 | char *const *args, | 708 | char *const *args, |
715 | const char *cfgfile, | 709 | const char *cfgfile, |
716 | const struct GNUNET_CONFIGURATION_Handle *c) | 710 | const struct GNUNET_CONFIGURATION_Handle *c) |
717 | { | 711 | { |
718 | /* check arguments */ | 712 | /* check arguments */ |
719 | if ( (NULL == args[0]) || | 713 | if ( (NULL == args[0]) || |
720 | (NULL != args[1]) || | 714 | (NULL != args[1]) || |
721 | (GNUNET_YES != | 715 | (GNUNET_YES != |
722 | GNUNET_DISK_directory_test (args[0], | 716 | GNUNET_DISK_directory_test (args[0], |
723 | GNUNET_YES)) ) | 717 | GNUNET_YES)) ) |
724 | { | 718 | { |
@@ -729,14 +723,14 @@ run (void *cls, | |||
729 | cfg_filename = GNUNET_strdup (cfgfile); | 723 | cfg_filename = GNUNET_strdup (cfgfile); |
730 | cfg = c; | 724 | cfg = c; |
731 | dir_name = args[0]; | 725 | dir_name = args[0]; |
732 | work_finished = GNUNET_CONTAINER_multihashmap_create (1024, | 726 | work_finished = GNUNET_CONTAINER_multihashmap_create (1024, |
733 | GNUNET_NO); | 727 | GNUNET_NO); |
734 | load_state (); | 728 | load_state (); |
735 | run_task = GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, | 729 | run_task = GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, |
736 | &scan, | 730 | &scan, |
737 | NULL); | 731 | NULL); |
738 | kill_task = | 732 | kill_task = |
739 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 733 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
740 | &do_stop_task, | 734 | &do_stop_task, |
741 | NULL); | 735 | NULL); |
742 | } | 736 | } |
@@ -799,17 +793,17 @@ main (int argc, char *const *argv) | |||
799 | int ok; | 793 | int ok; |
800 | struct GNUNET_SIGNAL_Context *shc_chld; | 794 | struct GNUNET_SIGNAL_Context *shc_chld; |
801 | 795 | ||
802 | if (GNUNET_OK != | 796 | if (GNUNET_OK != |
803 | GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 797 | GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
804 | return 2; | 798 | return 2; |
805 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, | 799 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, |
806 | GNUNET_NO, GNUNET_NO); | 800 | GNUNET_NO, GNUNET_NO); |
807 | GNUNET_assert (NULL != sigpipe); | 801 | GNUNET_assert (NULL != sigpipe); |
808 | shc_chld = | 802 | shc_chld = |
809 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, | 803 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, |
810 | &sighandler_child_death); | 804 | &sighandler_child_death); |
811 | ok = (GNUNET_OK == | 805 | ok = (GNUNET_OK == |
812 | GNUNET_PROGRAM_run (argc, argv, | 806 | GNUNET_PROGRAM_run (argc, argv, |
813 | "gnunet-auto-share [OPTIONS] FILENAME", | 807 | "gnunet-auto-share [OPTIONS] FILENAME", |
814 | gettext_noop | 808 | gettext_noop |
815 | ("Automatically publish files from a directory on GNUnet"), | 809 | ("Automatically publish files from a directory on GNUnet"), |
@@ -823,7 +817,7 @@ main (int argc, char *const *argv) | |||
823 | } | 817 | } |
824 | while (NULL != (wi = work_head)) | 818 | while (NULL != (wi = work_head)) |
825 | { | 819 | { |
826 | GNUNET_CONTAINER_DLL_remove (work_head, | 820 | GNUNET_CONTAINER_DLL_remove (work_head, |
827 | work_tail, | 821 | work_tail, |
828 | wi); | 822 | wi); |
829 | GNUNET_free (wi->filename); | 823 | GNUNET_free (wi->filename); |
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c index 77a293a23..326178df9 100644 --- a/src/fs/gnunet-daemon-fsprofiler.c +++ b/src/fs/gnunet-daemon-fsprofiler.c | |||
@@ -267,10 +267,9 @@ make_file (uint64_t length, | |||
267 | * Task run during shutdown. | 267 | * Task run during shutdown. |
268 | * | 268 | * |
269 | * @param cls unused | 269 | * @param cls unused |
270 | * @param tc unused | ||
271 | */ | 270 | */ |
272 | static void | 271 | static void |
273 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 272 | shutdown_task (void *cls) |
274 | { | 273 | { |
275 | struct Pattern *p; | 274 | struct Pattern *p; |
276 | 275 | ||
@@ -313,10 +312,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
313 | * Task run when a publish operation should be stopped. | 312 | * Task run when a publish operation should be stopped. |
314 | * | 313 | * |
315 | * @param cls the 'struct Pattern' of the publish operation to stop | 314 | * @param cls the 'struct Pattern' of the publish operation to stop |
316 | * @param tc unused | ||
317 | */ | 315 | */ |
318 | static void | 316 | static void |
319 | publish_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 317 | publish_stop_task (void *cls) |
320 | { | 318 | { |
321 | struct Pattern *p = cls; | 319 | struct Pattern *p = cls; |
322 | 320 | ||
@@ -329,10 +327,9 @@ publish_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
329 | * Task run when a download operation should be stopped. | 327 | * Task run when a download operation should be stopped. |
330 | * | 328 | * |
331 | * @param cls the 'struct Pattern' of the download operation to stop | 329 | * @param cls the 'struct Pattern' of the download operation to stop |
332 | * @param tc unused | ||
333 | */ | 330 | */ |
334 | static void | 331 | static void |
335 | download_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 332 | download_stop_task (void *cls) |
336 | { | 333 | { |
337 | struct Pattern *p = cls; | 334 | struct Pattern *p = cls; |
338 | 335 | ||
@@ -345,10 +342,9 @@ download_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
345 | * Task run when a download operation should be stopped. | 342 | * Task run when a download operation should be stopped. |
346 | * | 343 | * |
347 | * @param cls the 'struct Pattern' of the download operation to stop | 344 | * @param cls the 'struct Pattern' of the download operation to stop |
348 | * @param tc unused | ||
349 | */ | 345 | */ |
350 | static void | 346 | static void |
351 | search_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 347 | search_stop_task (void *cls) |
352 | { | 348 | { |
353 | struct Pattern *p = cls; | 349 | struct Pattern *p = cls; |
354 | 350 | ||
@@ -498,16 +494,16 @@ progress_cb (void *cls, | |||
498 | * Start publish operation. | 494 | * Start publish operation. |
499 | * | 495 | * |
500 | * @param cls the 'struct Pattern' specifying the operation to perform | 496 | * @param cls the 'struct Pattern' specifying the operation to perform |
501 | * @param tc scheduler context | ||
502 | */ | 497 | */ |
503 | static void | 498 | static void |
504 | start_publish (void *cls, | 499 | start_publish (void *cls) |
505 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
506 | { | 500 | { |
507 | struct Pattern *p = cls; | 501 | struct Pattern *p = cls; |
508 | struct GNUNET_FS_FileInformation *fi; | 502 | struct GNUNET_FS_FileInformation *fi; |
503 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
509 | 504 | ||
510 | p->task = NULL; | 505 | p->task = NULL; |
506 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
511 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 507 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
512 | return; | 508 | return; |
513 | fi = make_file (p->x, p->y, p); | 509 | fi = make_file (p->x, p->y, p); |
@@ -523,16 +519,16 @@ start_publish (void *cls, | |||
523 | * Start download operation. | 519 | * Start download operation. |
524 | * | 520 | * |
525 | * @param cls the 'struct Pattern' specifying the operation to perform | 521 | * @param cls the 'struct Pattern' specifying the operation to perform |
526 | * @param tc scheduler context | ||
527 | */ | 522 | */ |
528 | static void | 523 | static void |
529 | start_download (void *cls, | 524 | start_download (void *cls) |
530 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
531 | { | 525 | { |
532 | struct Pattern *p = cls; | 526 | struct Pattern *p = cls; |
533 | struct GNUNET_FS_Uri *keywords; | 527 | struct GNUNET_FS_Uri *keywords; |
528 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
534 | 529 | ||
535 | p->task = NULL; | 530 | p->task = NULL; |
531 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
536 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 532 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
537 | return; | 533 | return; |
538 | keywords = make_keywords (p->x); | 534 | keywords = make_keywords (p->x); |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 85afbe606..a2b0aa5fc 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -54,7 +54,7 @@ static int local_only; | |||
54 | 54 | ||
55 | 55 | ||
56 | static void | 56 | static void |
57 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 57 | cleanup_task (void *cls) |
58 | { | 58 | { |
59 | GNUNET_FS_stop (ctx); | 59 | GNUNET_FS_stop (ctx); |
60 | ctx = NULL; | 60 | ctx = NULL; |
@@ -62,7 +62,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
62 | 62 | ||
63 | 63 | ||
64 | static void | 64 | static void |
65 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | shutdown_task (void *cls) |
66 | { | 66 | { |
67 | if (NULL != dc) | 67 | if (NULL != dc) |
68 | { | 68 | { |
diff --git a/src/fs/gnunet-fs-profiler.c b/src/fs/gnunet-fs-profiler.c index cd4f9d851..69433346f 100644 --- a/src/fs/gnunet-fs-profiler.c +++ b/src/fs/gnunet-fs-profiler.c | |||
@@ -109,11 +109,9 @@ process_stats (void *cls, | |||
109 | * all statistics. | 109 | * all statistics. |
110 | * | 110 | * |
111 | * @param cls NULL | 111 | * @param cls NULL |
112 | * @param tc unused | ||
113 | */ | 112 | */ |
114 | static void | 113 | static void |
115 | terminate_task (void *cls, | 114 | terminate_task (void *cls) |
116 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
117 | { | 115 | { |
118 | terminate_taskid = NULL; | 116 | terminate_taskid = NULL; |
119 | GNUNET_TESTBED_get_statistics (0, NULL, | 117 | GNUNET_TESTBED_get_statistics (0, NULL, |
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index b5c8acc4c..f058c10b2 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -146,11 +146,9 @@ static struct GNUNET_IDENTITY_Handle *identity; | |||
146 | * FS state. | 146 | * FS state. |
147 | * | 147 | * |
148 | * @param cls NULL | 148 | * @param cls NULL |
149 | * @param tc scheduler context | ||
150 | */ | 149 | */ |
151 | static void | 150 | static void |
152 | do_stop_task (void *cls, | 151 | do_stop_task (void *cls) |
153 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
154 | { | 152 | { |
155 | struct GNUNET_FS_PublishContext *p; | 153 | struct GNUNET_FS_PublishContext *p; |
156 | 154 | ||
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index d9ce456a6..a15d0d883 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -96,7 +96,7 @@ item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | |||
96 | 96 | ||
97 | 97 | ||
98 | static void | 98 | static void |
99 | clean_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 99 | clean_task (void *cls) |
100 | { | 100 | { |
101 | size_t dsize; | 101 | size_t dsize; |
102 | void *ddata; | 102 | void *ddata; |
@@ -210,7 +210,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
210 | 210 | ||
211 | 211 | ||
212 | static void | 212 | static void |
213 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 213 | shutdown_task (void *cls) |
214 | { | 214 | { |
215 | if (sc != NULL) | 215 | if (sc != NULL) |
216 | { | 216 | { |
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index aebbe5854..2ba96334c 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -184,11 +184,9 @@ static struct GNUNET_PeerIdentity my_id; | |||
184 | * Task that periodically ages our cover traffic statistics. | 184 | * Task that periodically ages our cover traffic statistics. |
185 | * | 185 | * |
186 | * @param cls unused closure | 186 | * @param cls unused closure |
187 | * @param tc task context | ||
188 | */ | 187 | */ |
189 | static void | 188 | static void |
190 | age_cover_counters (void *cls, | 189 | age_cover_counters (void *cls) |
191 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
192 | { | 190 | { |
193 | GSF_cover_content_count = (GSF_cover_content_count * 15) / 16; | 191 | GSF_cover_content_count = (GSF_cover_content_count * 15) / 16; |
194 | GSF_cover_query_count = (GSF_cover_query_count * 15) / 16; | 192 | GSF_cover_query_count = (GSF_cover_query_count * 15) / 16; |
@@ -531,11 +529,9 @@ handle_loc_sign (void *cls, | |||
531 | * Task run during shutdown. | 529 | * Task run during shutdown. |
532 | * | 530 | * |
533 | * @param cls unused | 531 | * @param cls unused |
534 | * @param tc unused | ||
535 | */ | 532 | */ |
536 | static void | 533 | static void |
537 | shutdown_task (void *cls, | 534 | shutdown_task (void *cls) |
538 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
539 | { | 535 | { |
540 | GSF_cadet_stop_client (); | 536 | GSF_cadet_stop_client (); |
541 | GSF_cadet_stop_server (); | 537 | GSF_cadet_stop_server (); |
@@ -821,7 +817,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
821 | (GNUNET_OK != main_init (server, cfg))) | 817 | (GNUNET_OK != main_init (server, cfg))) |
822 | { | 818 | { |
823 | GNUNET_SCHEDULER_shutdown (); | 819 | GNUNET_SCHEDULER_shutdown (); |
824 | shutdown_task (NULL, NULL); | 820 | shutdown_task (NULL); |
825 | return; | 821 | return; |
826 | } | 822 | } |
827 | } | 823 | } |
diff --git a/src/fs/gnunet-service-fs_cadet_client.c b/src/fs/gnunet-service-fs_cadet_client.c index 417468970..3ea2efa67 100644 --- a/src/fs/gnunet-service-fs_cadet_client.c +++ b/src/fs/gnunet-service-fs_cadet_client.c | |||
@@ -246,11 +246,9 @@ reset_cadet (struct CadetHandle *mh) | |||
246 | * Task called when it is time to destroy an inactive cadet channel. | 246 | * Task called when it is time to destroy an inactive cadet channel. |
247 | * | 247 | * |
248 | * @param cls the `struct CadetHandle` to tear down | 248 | * @param cls the `struct CadetHandle` to tear down |
249 | * @param tc scheduler context, unused | ||
250 | */ | 249 | */ |
251 | static void | 250 | static void |
252 | cadet_timeout (void *cls, | 251 | cadet_timeout (void *cls) |
253 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
254 | { | 252 | { |
255 | struct CadetHandle *mh = cls; | 253 | struct CadetHandle *mh = cls; |
256 | struct GNUNET_CADET_Channel *tun; | 254 | struct GNUNET_CADET_Channel *tun; |
@@ -270,11 +268,9 @@ cadet_timeout (void *cls, | |||
270 | * Task called when it is time to reset an cadet. | 268 | * Task called when it is time to reset an cadet. |
271 | * | 269 | * |
272 | * @param cls the `struct CadetHandle` to tear down | 270 | * @param cls the `struct CadetHandle` to tear down |
273 | * @param tc scheduler context, unused | ||
274 | */ | 271 | */ |
275 | static void | 272 | static void |
276 | reset_cadet_task (void *cls, | 273 | reset_cadet_task (void *cls) |
277 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
278 | { | 274 | { |
279 | struct CadetHandle *mh = cls; | 275 | struct CadetHandle *mh = cls; |
280 | 276 | ||
diff --git a/src/fs/gnunet-service-fs_cadet_server.c b/src/fs/gnunet-service-fs_cadet_server.c index 46086eec8..ccf6b3c5c 100644 --- a/src/fs/gnunet-service-fs_cadet_server.c +++ b/src/fs/gnunet-service-fs_cadet_server.c | |||
@@ -154,11 +154,9 @@ static unsigned long long sc_count_max; | |||
154 | * Task run to asynchronously terminate the cadet due to timeout. | 154 | * Task run to asynchronously terminate the cadet due to timeout. |
155 | * | 155 | * |
156 | * @param cls the 'struct CadetClient' | 156 | * @param cls the 'struct CadetClient' |
157 | * @param tc scheduler context | ||
158 | */ | 157 | */ |
159 | static void | 158 | static void |
160 | timeout_cadet_task (void *cls, | 159 | timeout_cadet_task (void *cls) |
161 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
162 | { | 160 | { |
163 | struct CadetClient *sc = cls; | 161 | struct CadetClient *sc = cls; |
164 | struct GNUNET_CADET_Channel *tun; | 162 | struct GNUNET_CADET_Channel *tun; |
@@ -324,7 +322,7 @@ continue_writing (struct CadetClient *sc) | |||
324 | static void | 322 | static void |
325 | handle_datastore_reply (void *cls, | 323 | handle_datastore_reply (void *cls, |
326 | const struct GNUNET_HashCode *key, | 324 | const struct GNUNET_HashCode *key, |
327 | size_t size, | 325 | size_t size, |
328 | const void *data, | 326 | const void *data, |
329 | enum GNUNET_BLOCK_Type type, | 327 | enum GNUNET_BLOCK_Type type, |
330 | uint32_t priority, | 328 | uint32_t priority, |
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 3cabfeaaf..e916a73a8 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -522,11 +522,9 @@ peer_transmit_ready_cb (void *cls, | |||
522 | * (re)try to reserve bandwidth from the given peer. | 522 | * (re)try to reserve bandwidth from the given peer. |
523 | * | 523 | * |
524 | * @param cls the `struct GSF_ConnectedPeer` to reserve from | 524 | * @param cls the `struct GSF_ConnectedPeer` to reserve from |
525 | * @param tc scheduler context | ||
526 | */ | 525 | */ |
527 | static void | 526 | static void |
528 | retry_reservation (void *cls, | 527 | retry_reservation (void *cls) |
529 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
530 | { | 528 | { |
531 | struct GSF_ConnectedPeer *cp = cls; | 529 | struct GSF_ConnectedPeer *cp = cls; |
532 | struct GNUNET_PeerIdentity target; | 530 | struct GNUNET_PeerIdentity target; |
@@ -675,11 +673,9 @@ GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, | |||
675 | * peer. Check, and if so, restart migration. | 673 | * peer. Check, and if so, restart migration. |
676 | * | 674 | * |
677 | * @param cls the `struct GSF_ConnectedPeer` | 675 | * @param cls the `struct GSF_ConnectedPeer` |
678 | * @param tc scheduler context | ||
679 | */ | 676 | */ |
680 | static void | 677 | static void |
681 | revive_migration (void *cls, | 678 | revive_migration (void *cls) |
682 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
683 | { | 679 | { |
684 | struct GSF_ConnectedPeer *cp = cls; | 680 | struct GSF_ConnectedPeer *cp = cls; |
685 | struct GNUNET_TIME_Relative bt; | 681 | struct GNUNET_TIME_Relative bt; |
@@ -854,11 +850,9 @@ cancel_pending_request (void *cls, | |||
854 | * Free the given request. | 850 | * Free the given request. |
855 | * | 851 | * |
856 | * @param cls the request to free | 852 | * @param cls the request to free |
857 | * @param tc task context | ||
858 | */ | 853 | */ |
859 | static void | 854 | static void |
860 | peer_request_destroy (void *cls, | 855 | peer_request_destroy (void *cls) |
861 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
862 | { | 856 | { |
863 | struct PeerRequest *peerreq = cls; | 857 | struct PeerRequest *peerreq = cls; |
864 | struct GSF_PendingRequest *pr = peerreq->pr; | 858 | struct GSF_PendingRequest *pr = peerreq->pr; |
@@ -876,19 +870,19 @@ peer_request_destroy (void *cls, | |||
876 | * The artificial delay is over, transmit the message now. | 870 | * The artificial delay is over, transmit the message now. |
877 | * | 871 | * |
878 | * @param cls the `struct GSF_DelayedHandle` with the message | 872 | * @param cls the `struct GSF_DelayedHandle` with the message |
879 | * @param tc scheduler context | ||
880 | */ | 873 | */ |
881 | static void | 874 | static void |
882 | transmit_delayed_now (void *cls, | 875 | transmit_delayed_now (void *cls) |
883 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
884 | { | 876 | { |
885 | struct GSF_DelayedHandle *dh = cls; | 877 | struct GSF_DelayedHandle *dh = cls; |
886 | struct GSF_ConnectedPeer *cp = dh->cp; | 878 | struct GSF_ConnectedPeer *cp = dh->cp; |
879 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
887 | 880 | ||
888 | GNUNET_CONTAINER_DLL_remove (cp->delayed_head, | 881 | GNUNET_CONTAINER_DLL_remove (cp->delayed_head, |
889 | cp->delayed_tail, | 882 | cp->delayed_tail, |
890 | dh); | 883 | dh); |
891 | cp->delay_queue_size--; | 884 | cp->delay_queue_size--; |
885 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
892 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 886 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
893 | { | 887 | { |
894 | GNUNET_free (dh->pm); | 888 | GNUNET_free (dh->pm); |
@@ -1490,11 +1484,9 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1490 | * a transmission request. | 1484 | * a transmission request. |
1491 | * | 1485 | * |
1492 | * @param cls the `struct GSF_PeerTransmitHandle` of the request | 1486 | * @param cls the `struct GSF_PeerTransmitHandle` of the request |
1493 | * @param tc scheduler context | ||
1494 | */ | 1487 | */ |
1495 | static void | 1488 | static void |
1496 | peer_transmit_timeout (void *cls, | 1489 | peer_transmit_timeout (void *cls) |
1497 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1498 | { | 1490 | { |
1499 | struct GSF_PeerTransmitHandle *pth = cls; | 1491 | struct GSF_PeerTransmitHandle *pth = cls; |
1500 | struct GSF_ConnectedPeer *cp; | 1492 | struct GSF_ConnectedPeer *cp; |
@@ -1981,18 +1973,17 @@ GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | |||
1981 | * Call this method periodically to flush respect information to disk. | 1973 | * Call this method periodically to flush respect information to disk. |
1982 | * | 1974 | * |
1983 | * @param cls closure, not used | 1975 | * @param cls closure, not used |
1984 | * @param tc task context, not used | ||
1985 | */ | 1976 | */ |
1986 | static void | 1977 | static void |
1987 | cron_flush_respect (void *cls, | 1978 | cron_flush_respect (void *cls) |
1988 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1989 | { | 1979 | { |
1980 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1981 | |||
1990 | if (NULL == cp_map) | 1982 | if (NULL == cp_map) |
1991 | return; | 1983 | return; |
1992 | GNUNET_CONTAINER_multipeermap_iterate (cp_map, | 1984 | GNUNET_CONTAINER_multipeermap_iterate (cp_map, |
1993 | &flush_respect, NULL); | 1985 | &flush_respect, NULL); |
1994 | if (NULL == tc) | 1986 | tc = GNUNET_SCHEDULER_get_task_context (); |
1995 | return; | ||
1996 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1987 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1997 | return; | 1988 | return; |
1998 | GNUNET_SCHEDULER_add_delayed_with_priority (RESPECT_FLUSH_FREQ, | 1989 | GNUNET_SCHEDULER_add_delayed_with_priority (RESPECT_FLUSH_FREQ, |
@@ -2038,7 +2029,9 @@ clean_peer (void *cls, | |||
2038 | void | 2029 | void |
2039 | GSF_connected_peer_done_ () | 2030 | GSF_connected_peer_done_ () |
2040 | { | 2031 | { |
2041 | cron_flush_respect (NULL, NULL); | 2032 | GNUNET_CONTAINER_multipeermap_iterate (cp_map, |
2033 | &flush_respect, | ||
2034 | NULL); | ||
2042 | GNUNET_CONTAINER_multipeermap_iterate (cp_map, | 2035 | GNUNET_CONTAINER_multipeermap_iterate (cp_map, |
2043 | &clean_peer, NULL); | 2036 | &clean_peer, NULL); |
2044 | GNUNET_CONTAINER_multipeermap_destroy (cp_map); | 2037 | GNUNET_CONTAINER_multipeermap_destroy (cp_map); |
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index f837ad320..2706aea30 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c | |||
@@ -184,11 +184,9 @@ GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client) | |||
184 | * Free the given client request. | 184 | * Free the given client request. |
185 | * | 185 | * |
186 | * @param cls the client request to free | 186 | * @param cls the client request to free |
187 | * @param tc task context | ||
188 | */ | 187 | */ |
189 | static void | 188 | static void |
190 | client_request_destroy (void *cls, | 189 | client_request_destroy (void *cls) |
191 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
192 | { | 190 | { |
193 | struct ClientRequest *cr = cls; | 191 | struct ClientRequest *cr = cls; |
194 | struct GSF_LocalClient *lc; | 192 | struct GSF_LocalClient *lc; |
@@ -510,7 +508,7 @@ GSF_client_disconnect_handler_ (void *cls, | |||
510 | { | 508 | { |
511 | if (NULL != cr->kill_task) | 509 | if (NULL != cr->kill_task) |
512 | GNUNET_SCHEDULER_cancel (cr->kill_task); | 510 | GNUNET_SCHEDULER_cancel (cr->kill_task); |
513 | client_request_destroy (cr, NULL); | 511 | client_request_destroy (cr); |
514 | } | 512 | } |
515 | while (NULL != (res = pos->res_head)) | 513 | while (NULL != (res = pos->res_head)) |
516 | { | 514 | { |
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index 8e414e74a..b338c1a13 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c | |||
@@ -244,11 +244,9 @@ get_rp_key (struct GSF_RequestPlan *rp) | |||
244 | * Figure out when and how to transmit to the given peer. | 244 | * Figure out when and how to transmit to the given peer. |
245 | * | 245 | * |
246 | * @param cls the `struct GSF_ConnectedPeer` for transmission | 246 | * @param cls the `struct GSF_ConnectedPeer` for transmission |
247 | * @param tc scheduler context | ||
248 | */ | 247 | */ |
249 | static void | 248 | static void |
250 | schedule_peer_transmission (void *cls, | 249 | schedule_peer_transmission (void *cls); |
251 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
252 | 250 | ||
253 | 251 | ||
254 | /** | 252 | /** |
@@ -457,11 +455,9 @@ transmit_message_callback (void *cls, | |||
457 | * Figure out when and how to transmit to the given peer. | 455 | * Figure out when and how to transmit to the given peer. |
458 | * | 456 | * |
459 | * @param cls the `struct PeerPlan` | 457 | * @param cls the `struct PeerPlan` |
460 | * @param tc scheduler context | ||
461 | */ | 458 | */ |
462 | static void | 459 | static void |
463 | schedule_peer_transmission (void *cls, | 460 | schedule_peer_transmission (void *cls) |
464 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
465 | { | 461 | { |
466 | struct PeerPlan *pp = cls; | 462 | struct PeerPlan *pp = cls; |
467 | struct GSF_RequestPlan *rp; | 463 | struct GSF_RequestPlan *rp; |
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 8c97e0898..a7a62a743 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -1300,11 +1300,9 @@ GSF_cadet_lookup_ (struct GSF_PendingRequest *pr) | |||
1300 | * Task that issues a warning if the datastore lookup takes too long. | 1300 | * Task that issues a warning if the datastore lookup takes too long. |
1301 | * | 1301 | * |
1302 | * @param cls the `struct GSF_PendingRequest` | 1302 | * @param cls the `struct GSF_PendingRequest` |
1303 | * @param tc task context | ||
1304 | */ | 1303 | */ |
1305 | static void | 1304 | static void |
1306 | warn_delay_task (void *cls, | 1305 | warn_delay_task (void *cls) |
1307 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1308 | { | 1306 | { |
1309 | struct GSF_PendingRequest *pr = cls; | 1307 | struct GSF_PendingRequest *pr = cls; |
1310 | 1308 | ||
@@ -1323,11 +1321,9 @@ warn_delay_task (void *cls, | |||
1323 | * Task that issues a warning if the datastore lookup takes too long. | 1321 | * Task that issues a warning if the datastore lookup takes too long. |
1324 | * | 1322 | * |
1325 | * @param cls the `struct GSF_PendingRequest` | 1323 | * @param cls the `struct GSF_PendingRequest` |
1326 | * @param tc task context | ||
1327 | */ | 1324 | */ |
1328 | static void | 1325 | static void |
1329 | odc_warn_delay_task (void *cls, | 1326 | odc_warn_delay_task (void *cls) |
1330 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1331 | { | 1327 | { |
1332 | struct GSF_PendingRequest *pr = cls; | 1328 | struct GSF_PendingRequest *pr = cls; |
1333 | 1329 | ||
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c index a31a4f626..a76a3827c 100644 --- a/src/fs/gnunet-service-fs_push.c +++ b/src/fs/gnunet-service-fs_push.c | |||
@@ -432,11 +432,9 @@ find_content (struct MigrationReadyPeer *mrp) | |||
432 | * migration | 432 | * migration |
433 | * | 433 | * |
434 | * @param cls unused | 434 | * @param cls unused |
435 | * @param tc scheduler context (also unused) | ||
436 | */ | 435 | */ |
437 | static void | 436 | static void |
438 | gather_migration_blocks (void *cls, | 437 | gather_migration_blocks (void *cls); |
439 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
440 | 438 | ||
441 | 439 | ||
442 | /** | 440 | /** |
@@ -569,11 +567,9 @@ process_migration_content (void *cls, | |||
569 | * migration | 567 | * migration |
570 | * | 568 | * |
571 | * @param cls unused | 569 | * @param cls unused |
572 | * @param tc scheduler context (also unused) | ||
573 | */ | 570 | */ |
574 | static void | 571 | static void |
575 | gather_migration_blocks (void *cls, | 572 | gather_migration_blocks (void *cls) |
576 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
577 | { | 573 | { |
578 | mig_task = NULL; | 574 | mig_task = NULL; |
579 | if (mig_size >= MAX_MIGRATION_QUEUE) | 575 | if (mig_size >= MAX_MIGRATION_QUEUE) |
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c index 3fb2d7abb..fa5aa461d 100644 --- a/src/fs/gnunet-service-fs_put.c +++ b/src/fs/gnunet-service-fs_put.c | |||
@@ -95,8 +95,7 @@ static struct PutOperator operators[] = { | |||
95 | * @param tc scheduler context (unused) | 95 | * @param tc scheduler context (unused) |
96 | */ | 96 | */ |
97 | static void | 97 | static void |
98 | gather_dht_put_blocks (void *cls, | 98 | gather_dht_put_blocks (void *cls); |
99 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
100 | 99 | ||
101 | 100 | ||
102 | /** | 101 | /** |
@@ -151,10 +150,9 @@ delay_dht_put_blocks (void *cls, int success) | |||
151 | * Task that is run periodically to obtain blocks for DHT PUTs. | 150 | * Task that is run periodically to obtain blocks for DHT PUTs. |
152 | * | 151 | * |
153 | * @param cls type of blocks to gather | 152 | * @param cls type of blocks to gather |
154 | * @param tc scheduler context | ||
155 | */ | 153 | */ |
156 | static void | 154 | static void |
157 | delay_dht_put_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 155 | delay_dht_put_task (void *cls) |
158 | { | 156 | { |
159 | struct PutOperator *po = cls; | 157 | struct PutOperator *po = cls; |
160 | 158 | ||
@@ -212,14 +210,15 @@ process_dht_put_content (void *cls, | |||
212 | * Task that is run periodically to obtain blocks for DHT PUTs. | 210 | * Task that is run periodically to obtain blocks for DHT PUTs. |
213 | * | 211 | * |
214 | * @param cls type of blocks to gather | 212 | * @param cls type of blocks to gather |
215 | * @param tc scheduler context (unused) | ||
216 | */ | 213 | */ |
217 | static void | 214 | static void |
218 | gather_dht_put_blocks (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 215 | gather_dht_put_blocks (void *cls) |
219 | { | 216 | { |
220 | struct PutOperator *po = cls; | 217 | struct PutOperator *po = cls; |
218 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
221 | 219 | ||
222 | po->dht_task = NULL; | 220 | po->dht_task = NULL; |
221 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
223 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 222 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
224 | return; | 223 | return; |
225 | po->dht_qe = | 224 | po->dht_qe = |
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index 8a059478c..cab963e0d 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c | |||
@@ -40,7 +40,7 @@ static struct GNUNET_FS_UnindexContext *uc; | |||
40 | 40 | ||
41 | 41 | ||
42 | static void | 42 | static void |
43 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 43 | cleanup_task (void *cls) |
44 | { | 44 | { |
45 | GNUNET_FS_stop (ctx); | 45 | GNUNET_FS_stop (ctx); |
46 | ctx = NULL; | 46 | ctx = NULL; |
@@ -48,7 +48,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
48 | 48 | ||
49 | 49 | ||
50 | static void | 50 | static void |
51 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 51 | shutdown_task (void *cls) |
52 | { | 52 | { |
53 | struct GNUNET_FS_UnindexContext *u; | 53 | struct GNUNET_FS_UnindexContext *u; |
54 | 54 | ||
diff --git a/src/fs/perf_gnunet_service_fs_p2p.c b/src/fs/perf_gnunet_service_fs_p2p.c index 08bfe1b30..40b2b977b 100644 --- a/src/fs/perf_gnunet_service_fs_p2p.c +++ b/src/fs/perf_gnunet_service_fs_p2p.c | |||
@@ -238,8 +238,7 @@ stat_run (void *cls, | |||
238 | 238 | ||
239 | 239 | ||
240 | static void | 240 | static void |
241 | do_report (void *cls, | 241 | do_report (void *cls) |
242 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
243 | { | 242 | { |
244 | char *fn = cls; | 243 | char *fn = cls; |
245 | struct GNUNET_TIME_Relative del; | 244 | struct GNUNET_TIME_Relative del; |
diff --git a/src/fs/perf_gnunet_service_fs_p2p_respect.c b/src/fs/perf_gnunet_service_fs_p2p_respect.c index d20d15aff..2527c8978 100644 --- a/src/fs/perf_gnunet_service_fs_p2p_respect.c +++ b/src/fs/perf_gnunet_service_fs_p2p_respect.c | |||
@@ -279,7 +279,7 @@ stat_run (void *cls, | |||
279 | 279 | ||
280 | 280 | ||
281 | static void | 281 | static void |
282 | do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 282 | do_report (void *cls) |
283 | { | 283 | { |
284 | static int download_counter; | 284 | static int download_counter; |
285 | const char *type = cls; | 285 | const char *type = cls; |
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index e192e8f52..936f001df 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c | |||
@@ -67,7 +67,7 @@ static int err; | |||
67 | 67 | ||
68 | 68 | ||
69 | static void | 69 | static void |
70 | timeout_kill_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 70 | timeout_kill_task (void *cls) |
71 | { | 71 | { |
72 | if (NULL != download) | 72 | if (NULL != download) |
73 | { | 73 | { |
@@ -86,7 +86,7 @@ timeout_kill_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
86 | 86 | ||
87 | 87 | ||
88 | static void | 88 | static void |
89 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 89 | abort_publish_task (void *cls) |
90 | { | 90 | { |
91 | if (NULL != publish) | 91 | if (NULL != publish) |
92 | { | 92 | { |
@@ -97,7 +97,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
97 | 97 | ||
98 | 98 | ||
99 | static void | 99 | static void |
100 | stop_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 100 | stop_fs_task (void *cls) |
101 | { | 101 | { |
102 | GNUNET_FS_stop (fs); | 102 | GNUNET_FS_stop (fs); |
103 | fs = NULL; | 103 | fs = NULL; |
@@ -105,7 +105,7 @@ stop_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | 105 | ||
106 | 106 | ||
107 | static void | 107 | static void |
108 | abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | abort_download_task (void *cls) |
109 | { | 109 | { |
110 | uint64_t size; | 110 | uint64_t size; |
111 | 111 | ||
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index 6b78741e6..76a1ea911 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c | |||
@@ -62,7 +62,7 @@ static int err; | |||
62 | 62 | ||
63 | 63 | ||
64 | static void | 64 | static void |
65 | timeout_kill_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | timeout_kill_task (void *cls) |
66 | { | 66 | { |
67 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Timeout downloading file\n"); | 67 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Timeout downloading file\n"); |
68 | if (download != NULL) | 68 | if (download != NULL) |
@@ -81,7 +81,7 @@ timeout_kill_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
81 | 81 | ||
82 | 82 | ||
83 | static void | 83 | static void |
84 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 84 | abort_publish_task (void *cls) |
85 | { | 85 | { |
86 | if (publish != NULL) | 86 | if (publish != NULL) |
87 | { | 87 | { |
@@ -92,7 +92,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
92 | 92 | ||
93 | 93 | ||
94 | static void | 94 | static void |
95 | abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 95 | abort_download_task (void *cls) |
96 | { | 96 | { |
97 | uint64_t size; | 97 | uint64_t size; |
98 | 98 | ||
@@ -116,7 +116,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event); | |||
116 | 116 | ||
117 | 117 | ||
118 | static void | 118 | static void |
119 | restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 119 | restart_fs_task (void *cls) |
120 | { | 120 | { |
121 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Restarting FS.\n"); | 121 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Restarting FS.\n"); |
122 | GNUNET_FS_stop (fs); | 122 | GNUNET_FS_stop (fs); |
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c index b76e894a5..61e4df512 100644 --- a/src/fs/test_fs_list_indexed.c +++ b/src/fs/test_fs_list_indexed.c | |||
@@ -62,7 +62,7 @@ static int err; | |||
62 | 62 | ||
63 | 63 | ||
64 | static void | 64 | static void |
65 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | abort_publish_task (void *cls) |
66 | { | 66 | { |
67 | GNUNET_FS_publish_stop (publish); | 67 | GNUNET_FS_publish_stop (publish); |
68 | publish = NULL; | 68 | publish = NULL; |
@@ -76,8 +76,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
76 | 76 | ||
77 | 77 | ||
78 | static void | 78 | static void |
79 | list_indexed_task (void *cls, | 79 | list_indexed_task (void *cls) |
80 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
81 | { | 80 | { |
82 | GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL); | 81 | GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL); |
83 | } | 82 | } |
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c index 201acb8f5..b8325d8d8 100644 --- a/src/fs/test_fs_namespace.c +++ b/src/fs/test_fs_namespace.c | |||
@@ -49,7 +49,7 @@ static int err; | |||
49 | 49 | ||
50 | 50 | ||
51 | static void | 51 | static void |
52 | abort_ksk_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 52 | abort_ksk_search_task (void *cls) |
53 | { | 53 | { |
54 | if (ksk_search != NULL) | 54 | if (ksk_search != NULL) |
55 | { | 55 | { |
@@ -66,7 +66,7 @@ abort_ksk_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
66 | 66 | ||
67 | 67 | ||
68 | static void | 68 | static void |
69 | abort_sks_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 69 | abort_sks_search_task (void *cls) |
70 | { | 70 | { |
71 | if (sks_search == NULL) | 71 | if (sks_search == NULL) |
72 | return; | 72 | return; |
@@ -82,13 +82,13 @@ abort_sks_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
82 | 82 | ||
83 | 83 | ||
84 | static void | 84 | static void |
85 | do_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 85 | do_timeout (void *cls) |
86 | { | 86 | { |
87 | err = 1; | 87 | err = 1; |
88 | FPRINTF (stderr, "%s", "Operation timed out\n"); | 88 | FPRINTF (stderr, "%s", "Operation timed out\n"); |
89 | kill_task = NULL; | 89 | kill_task = NULL; |
90 | abort_sks_search_task (NULL, tc); | 90 | abort_sks_search_task (NULL); |
91 | abort_ksk_search_task (NULL, tc); | 91 | abort_ksk_search_task (NULL); |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index a391dbe0d..f4c56e015 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c | |||
@@ -58,7 +58,7 @@ static int err; | |||
58 | 58 | ||
59 | 59 | ||
60 | static void | 60 | static void |
61 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 61 | abort_publish_task (void *cls) |
62 | { | 62 | { |
63 | GNUNET_FS_publish_stop (publish); | 63 | GNUNET_FS_publish_stop (publish); |
64 | publish = NULL; | 64 | publish = NULL; |
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index 9807520a2..be9006d42 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c | |||
@@ -60,11 +60,11 @@ static char *fn2; | |||
60 | 60 | ||
61 | static int err; | 61 | static int err; |
62 | 62 | ||
63 | static struct GNUNET_SCHEDULER_Task * rtask; | 63 | static struct GNUNET_SCHEDULER_Task *rtask; |
64 | 64 | ||
65 | 65 | ||
66 | static void | 66 | static void |
67 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 67 | abort_publish_task (void *cls) |
68 | { | 68 | { |
69 | GNUNET_FS_publish_stop (publish); | 69 | GNUNET_FS_publish_stop (publish); |
70 | publish = NULL; | 70 | publish = NULL; |
@@ -89,7 +89,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event); | |||
89 | 89 | ||
90 | 90 | ||
91 | static void | 91 | static void |
92 | restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 92 | restart_fs_task (void *cls) |
93 | { | 93 | { |
94 | rtask = NULL; | 94 | rtask = NULL; |
95 | GNUNET_FS_stop (fs); | 95 | GNUNET_FS_stop (fs); |
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c index 29a98bbad..0918b4b6b 100644 --- a/src/fs/test_fs_search.c +++ b/src/fs/test_fs_search.c | |||
@@ -58,7 +58,7 @@ static int err; | |||
58 | 58 | ||
59 | 59 | ||
60 | static void | 60 | static void |
61 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 61 | abort_publish_task (void *cls) |
62 | { | 62 | { |
63 | if (NULL != publish) | 63 | if (NULL != publish) |
64 | { | 64 | { |
@@ -74,7 +74,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
74 | 74 | ||
75 | 75 | ||
76 | static void | 76 | static void |
77 | abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 77 | abort_error (void *cls) |
78 | { | 78 | { |
79 | fprintf (stderr, | 79 | fprintf (stderr, |
80 | "Timeout\n"); | 80 | "Timeout\n"); |
@@ -94,7 +94,7 @@ abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
94 | 94 | ||
95 | 95 | ||
96 | static void | 96 | static void |
97 | abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 97 | abort_search_task (void *cls) |
98 | { | 98 | { |
99 | if (NULL != search) | 99 | if (NULL != search) |
100 | { | 100 | { |
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index 756c72557..db084446e 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c | |||
@@ -60,7 +60,7 @@ static int err; | |||
60 | 60 | ||
61 | 61 | ||
62 | static void | 62 | static void |
63 | abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 63 | abort_error (void *cls) |
64 | { | 64 | { |
65 | timeout_task = NULL; | 65 | timeout_task = NULL; |
66 | fprintf (stderr, | 66 | fprintf (stderr, |
@@ -78,8 +78,9 @@ abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
78 | err = 1; | 78 | err = 1; |
79 | } | 79 | } |
80 | 80 | ||
81 | |||
81 | static void | 82 | static void |
82 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 83 | abort_publish_task (void *cls) |
83 | { | 84 | { |
84 | if (NULL != publish) | 85 | if (NULL != publish) |
85 | { | 86 | { |
@@ -95,7 +96,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
95 | 96 | ||
96 | 97 | ||
97 | static void | 98 | static void |
98 | abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 99 | abort_search_task (void *cls) |
99 | { | 100 | { |
100 | if (NULL != search) | 101 | if (NULL != search) |
101 | { | 102 | { |
@@ -110,7 +111,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event); | |||
110 | 111 | ||
111 | 112 | ||
112 | static void | 113 | static void |
113 | restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 114 | restart_fs_task (void *cls) |
114 | { | 115 | { |
115 | GNUNET_FS_stop (fs); | 116 | GNUNET_FS_stop (fs); |
116 | fs = GNUNET_FS_start (cfg, "test-fs-search-persistence", &progress_cb, NULL, | 117 | fs = GNUNET_FS_start (cfg, "test-fs-search-persistence", &progress_cb, NULL, |
diff --git a/src/fs/test_fs_search_probes.c b/src/fs/test_fs_search_probes.c index bcb914d79..eaf804a22 100644 --- a/src/fs/test_fs_search_probes.c +++ b/src/fs/test_fs_search_probes.c | |||
@@ -59,7 +59,7 @@ static int err; | |||
59 | 59 | ||
60 | 60 | ||
61 | static void | 61 | static void |
62 | abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 62 | abort_error (void *cls) |
63 | { | 63 | { |
64 | timeout_task = NULL; | 64 | timeout_task = NULL; |
65 | fprintf (stderr, | 65 | fprintf (stderr, |
@@ -79,7 +79,7 @@ abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
79 | 79 | ||
80 | 80 | ||
81 | static void | 81 | static void |
82 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 82 | abort_publish_task (void *cls) |
83 | { | 83 | { |
84 | if (NULL != publish) | 84 | if (NULL != publish) |
85 | { | 85 | { |
@@ -95,7 +95,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
95 | 95 | ||
96 | 96 | ||
97 | static void | 97 | static void |
98 | abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 98 | abort_search_task (void *cls) |
99 | { | 99 | { |
100 | if (search != NULL) | 100 | if (search != NULL) |
101 | GNUNET_FS_search_stop (search); | 101 | GNUNET_FS_search_stop (search); |
diff --git a/src/fs/test_fs_search_with_and.c b/src/fs/test_fs_search_with_and.c index e25d3786a..83edf2e6c 100644 --- a/src/fs/test_fs_search_with_and.c +++ b/src/fs/test_fs_search_with_and.c | |||
@@ -66,7 +66,7 @@ static int processed_files; | |||
66 | 66 | ||
67 | 67 | ||
68 | static void | 68 | static void |
69 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 69 | abort_publish_task (void *cls) |
70 | { | 70 | { |
71 | if (NULL != publish) | 71 | if (NULL != publish) |
72 | { | 72 | { |
@@ -82,7 +82,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
82 | 82 | ||
83 | 83 | ||
84 | static void | 84 | static void |
85 | abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 85 | abort_error (void *cls) |
86 | { | 86 | { |
87 | fprintf (stderr, | 87 | fprintf (stderr, |
88 | "Timeout\n"); | 88 | "Timeout\n"); |
@@ -102,7 +102,7 @@ abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | 102 | ||
103 | 103 | ||
104 | static void | 104 | static void |
105 | abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 105 | abort_search_task (void *cls) |
106 | { | 106 | { |
107 | if (NULL != search) | 107 | if (NULL != search) |
108 | { | 108 | { |
diff --git a/src/fs/test_fs_test_lib.c b/src/fs/test_fs_test_lib.c index dda990830..c3a03668c 100644 --- a/src/fs/test_fs_test_lib.c +++ b/src/fs/test_fs_test_lib.c | |||
@@ -50,8 +50,7 @@ static int ret; | |||
50 | 50 | ||
51 | 51 | ||
52 | static void | 52 | static void |
53 | do_stop (void *cls, | 53 | do_stop (void *cls) |
54 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
55 | { | 54 | { |
56 | char *fn = cls; | 55 | char *fn = cls; |
57 | 56 | ||
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index 77a70cb20..bd36fcd18 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c | |||
@@ -57,7 +57,7 @@ static char *fn; | |||
57 | 57 | ||
58 | 58 | ||
59 | static void | 59 | static void |
60 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 60 | abort_publish_task (void *cls) |
61 | { | 61 | { |
62 | GNUNET_FS_publish_stop (publish); | 62 | GNUNET_FS_publish_stop (publish); |
63 | publish = NULL; | 63 | publish = NULL; |
@@ -65,7 +65,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
65 | 65 | ||
66 | 66 | ||
67 | static void | 67 | static void |
68 | abort_unindex_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | abort_unindex_task (void *cls) |
69 | { | 69 | { |
70 | GNUNET_FS_unindex_stop (unindex); | 70 | GNUNET_FS_unindex_stop (unindex); |
71 | unindex = NULL; | 71 | unindex = NULL; |
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index cfb08629b..7c76ee227 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c | |||
@@ -58,7 +58,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; | |||
58 | 58 | ||
59 | 59 | ||
60 | static void | 60 | static void |
61 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 61 | abort_publish_task (void *cls) |
62 | { | 62 | { |
63 | GNUNET_FS_publish_stop (publish); | 63 | GNUNET_FS_publish_stop (publish); |
64 | publish = NULL; | 64 | publish = NULL; |
@@ -66,7 +66,7 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
66 | 66 | ||
67 | 67 | ||
68 | static void | 68 | static void |
69 | abort_unindex_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 69 | abort_unindex_task (void *cls) |
70 | { | 70 | { |
71 | if (unindex != NULL) | 71 | if (unindex != NULL) |
72 | { | 72 | { |
@@ -87,7 +87,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event); | |||
87 | 87 | ||
88 | 88 | ||
89 | static void | 89 | static void |
90 | restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 90 | restart_fs_task (void *cls) |
91 | { | 91 | { |
92 | GNUNET_FS_stop (fs); | 92 | GNUNET_FS_stop (fs); |
93 | fs = GNUNET_FS_start (cfg, "test-fs-unindex-persistence", &progress_cb, NULL, | 93 | fs = GNUNET_FS_start (cfg, "test-fs-unindex-persistence", &progress_cb, NULL, |
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index b698506b4..f00290b0d 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c | |||
@@ -64,8 +64,7 @@ struct DownloadContext | |||
64 | 64 | ||
65 | 65 | ||
66 | static void | 66 | static void |
67 | do_stop (void *cls, | 67 | do_stop (void *cls) |
68 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
69 | { | 68 | { |
70 | struct GNUNET_TIME_Relative del; | 69 | struct GNUNET_TIME_Relative del; |
71 | char *fancy; | 70 | char *fancy; |
@@ -140,11 +139,12 @@ do_download (void *cls, | |||
140 | 139 | ||
141 | 140 | ||
142 | static void | 141 | static void |
143 | stop_source_peer (void *cls, | 142 | stop_source_peer (void *cls) |
144 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
145 | { | 143 | { |
146 | struct DownloadContext *dc = cls; | 144 | struct DownloadContext *dc = cls; |
145 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
147 | 146 | ||
147 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
148 | /* Do not interact with testbed when shutting down */ | 148 | /* Do not interact with testbed when shutting down */ |
149 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 149 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
150 | return; | 150 | return; |
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c index f2b3f7516..3f6ec2497 100644 --- a/src/fs/test_gnunet_service_fs_p2p.c +++ b/src/fs/test_gnunet_service_fs_p2p.c | |||
@@ -54,7 +54,7 @@ static struct GNUNET_TIME_Absolute start_time; | |||
54 | 54 | ||
55 | 55 | ||
56 | static void | 56 | static void |
57 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 57 | do_stop (void *cls) |
58 | { | 58 | { |
59 | char *fn = cls; | 59 | char *fn = cls; |
60 | struct GNUNET_TIME_Relative del; | 60 | struct GNUNET_TIME_Relative del; |
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index da64b3a3a..6696158c9 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -203,10 +203,9 @@ reconnect (struct GNUNET_GNS_Handle *handle) | |||
203 | * Reconnect to GNS | 203 | * Reconnect to GNS |
204 | * | 204 | * |
205 | * @param cls the handle | 205 | * @param cls the handle |
206 | * @param tc task context | ||
207 | */ | 206 | */ |
208 | static void | 207 | static void |
209 | reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 208 | reconnect_task (void *cls) |
210 | { | 209 | { |
211 | struct GNUNET_GNS_Handle *handle = cls; | 210 | struct GNUNET_GNS_Handle *handle = cls; |
212 | 211 | ||
diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c index 24014f204..e7be8fd84 100644 --- a/src/gns/gnunet-bcd.c +++ b/src/gns/gnunet-bcd.c | |||
@@ -287,11 +287,13 @@ prepare_daemon (struct MHD_Daemon *daemon_handle); | |||
287 | * and schedule the next run. | 287 | * and schedule the next run. |
288 | */ | 288 | */ |
289 | static void | 289 | static void |
290 | run_daemon (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 290 | run_daemon (void *cls) |
291 | { | 291 | { |
292 | struct MHD_Daemon *daemon_handle = cls; | 292 | struct MHD_Daemon *daemon_handle = cls; |
293 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
293 | 294 | ||
294 | http_task = NULL; | 295 | http_task = NULL; |
296 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
295 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 297 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
296 | return; | 298 | return; |
297 | GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); | 299 | GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); |
@@ -384,8 +386,7 @@ server_start () | |||
384 | * Stop HTTP server. | 386 | * Stop HTTP server. |
385 | */ | 387 | */ |
386 | static void | 388 | static void |
387 | server_stop (void *cls, | 389 | server_stop (void *cls) |
388 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
389 | { | 390 | { |
390 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 391 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
391 | "HTTP server shutdown\n"); | 392 | "HTTP server shutdown\n"); |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 7b5613234..119bda91a 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -170,11 +170,9 @@ static struct GNUNET_IDENTITY_Operation *id_op; | |||
170 | * Task run on shutdown. Cleans up everything. | 170 | * Task run on shutdown. Cleans up everything. |
171 | * | 171 | * |
172 | * @param cls unused | 172 | * @param cls unused |
173 | * @param tc scheduler context | ||
174 | */ | 173 | */ |
175 | static void | 174 | static void |
176 | do_shutdown (void *cls, | 175 | do_shutdown (void *cls) |
177 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
178 | { | 176 | { |
179 | if (NULL != t4) | 177 | if (NULL != t4) |
180 | GNUNET_SCHEDULER_cancel (t4); | 178 | GNUNET_SCHEDULER_cancel (t4); |
@@ -252,12 +250,10 @@ send_response (struct Request *request) | |||
252 | /** | 250 | /** |
253 | * Task run on timeout. Cleans up request. | 251 | * Task run on timeout. Cleans up request. |
254 | * | 252 | * |
255 | * @param cls 'struct Request' of the request to clean up | 253 | * @param cls `struct Request *` of the request to clean up |
256 | * @param tc scheduler context | ||
257 | */ | 254 | */ |
258 | static void | 255 | static void |
259 | do_timeout (void *cls, | 256 | do_timeout (void *cls) |
260 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
261 | { | 257 | { |
262 | struct Request *request = cls; | 258 | struct Request *request = cls; |
263 | 259 | ||
@@ -507,21 +503,21 @@ handle_request (struct GNUNET_NETWORK_Handle *lsock, | |||
507 | * Task to read IPv4 DNS packets. | 503 | * Task to read IPv4 DNS packets. |
508 | * | 504 | * |
509 | * @param cls the 'listen_socket4' | 505 | * @param cls the 'listen_socket4' |
510 | * @param tc scheduler context | ||
511 | */ | 506 | */ |
512 | static void | 507 | static void |
513 | read_dns4 (void *cls, | 508 | read_dns4 (void *cls) |
514 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
515 | { | 509 | { |
516 | struct sockaddr_in v4; | 510 | struct sockaddr_in v4; |
517 | socklen_t addrlen; | 511 | socklen_t addrlen; |
518 | ssize_t size; | 512 | ssize_t size; |
513 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
519 | 514 | ||
520 | GNUNET_assert (listen_socket4 == cls); | 515 | GNUNET_assert (listen_socket4 == cls); |
521 | t4 = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, | 516 | t4 = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, |
522 | listen_socket4, | 517 | listen_socket4, |
523 | &read_dns4, | 518 | &read_dns4, |
524 | listen_socket4); | 519 | listen_socket4); |
520 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
525 | if (0 == (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)) | 521 | if (0 == (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)) |
526 | return; /* shutdown? */ | 522 | return; /* shutdown? */ |
527 | size = GNUNET_NETWORK_socket_recvfrom_amount (listen_socket4); | 523 | size = GNUNET_NETWORK_socket_recvfrom_amount (listen_socket4); |
@@ -550,21 +546,21 @@ read_dns4 (void *cls, | |||
550 | * Task to read IPv6 DNS packets. | 546 | * Task to read IPv6 DNS packets. |
551 | * | 547 | * |
552 | * @param cls the 'listen_socket6' | 548 | * @param cls the 'listen_socket6' |
553 | * @param tc scheduler context | ||
554 | */ | 549 | */ |
555 | static void | 550 | static void |
556 | read_dns6 (void *cls, | 551 | read_dns6 (void *cls) |
557 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
558 | { | 552 | { |
559 | struct sockaddr_in6 v6; | 553 | struct sockaddr_in6 v6; |
560 | socklen_t addrlen; | 554 | socklen_t addrlen; |
561 | ssize_t size; | 555 | ssize_t size; |
556 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
562 | 557 | ||
563 | GNUNET_assert (listen_socket6 == cls); | 558 | GNUNET_assert (listen_socket6 == cls); |
564 | t6 = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, | 559 | t6 = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, |
565 | listen_socket6, | 560 | listen_socket6, |
566 | &read_dns6, | 561 | &read_dns6, |
567 | listen_socket6); | 562 | listen_socket6); |
563 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
568 | if (0 == (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)) | 564 | if (0 == (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)) |
569 | return; /* shutdown? */ | 565 | return; /* shutdown? */ |
570 | size = GNUNET_NETWORK_socket_recvfrom_amount (listen_socket6); | 566 | size = GNUNET_NETWORK_socket_recvfrom_amount (listen_socket6); |
diff --git a/src/gns/gnunet-gns-helper-service-w32.c b/src/gns/gnunet-gns-helper-service-w32.c index e4fc2f304..112bcd258 100644 --- a/src/gns/gnunet-gns-helper-service-w32.c +++ b/src/gns/gnunet-gns-helper-service-w32.c | |||
@@ -112,11 +112,9 @@ static int got_egos = 0; | |||
112 | * Task run on shutdown. Cleans up everything. | 112 | * Task run on shutdown. Cleans up everything. |
113 | * | 113 | * |
114 | * @param cls unused | 114 | * @param cls unused |
115 | * @param tc scheduler context | ||
116 | */ | 115 | */ |
117 | static void | 116 | static void |
118 | do_shutdown (void *cls, | 117 | do_shutdown (void *cls) |
119 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
120 | { | 118 | { |
121 | struct request *rq; | 119 | struct request *rq; |
122 | if (NULL != id_op) | 120 | if (NULL != id_op) |
diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c index ad874cfeb..5f94e7792 100644 --- a/src/gns/gnunet-gns-import.c +++ b/src/gns/gnunet-gns-import.c | |||
@@ -344,11 +344,9 @@ get_ego (void *cls, | |||
344 | * Task run on shutdown. | 344 | * Task run on shutdown. |
345 | * | 345 | * |
346 | * @param cls NULL | 346 | * @param cls NULL |
347 | * @param tc unused | ||
348 | */ | 347 | */ |
349 | static void | 348 | static void |
350 | shutdown_task (void *cls, | 349 | shutdown_task (void *cls) |
351 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
352 | { | 350 | { |
353 | GNUNET_free_non_null (master_zone_pkey); | 351 | GNUNET_free_non_null (master_zone_pkey); |
354 | master_zone_pkey = NULL; | 352 | master_zone_pkey = NULL; |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 3b5adc8b1..9a34c83af 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -1257,10 +1257,9 @@ curl_upload_cb (void *buf, size_t size, size_t nmemb, void *cls) | |||
1257 | * from curl | 1257 | * from curl |
1258 | * | 1258 | * |
1259 | * @param cls closure | 1259 | * @param cls closure |
1260 | * @param tc task context | ||
1261 | */ | 1260 | */ |
1262 | static void | 1261 | static void |
1263 | curl_task_download (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 1262 | curl_task_download (void *cls); |
1264 | 1263 | ||
1265 | 1264 | ||
1266 | /** | 1265 | /** |
@@ -1328,11 +1327,9 @@ curl_download_prepare () | |||
1328 | * Task that is run when we are ready to receive more data from curl. | 1327 | * Task that is run when we are ready to receive more data from curl. |
1329 | * | 1328 | * |
1330 | * @param cls closure, NULL | 1329 | * @param cls closure, NULL |
1331 | * @param tc task context | ||
1332 | */ | 1330 | */ |
1333 | static void | 1331 | static void |
1334 | curl_task_download (void *cls, | 1332 | curl_task_download (void *cls) |
1335 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1336 | { | 1333 | { |
1337 | int running; | 1334 | int running; |
1338 | int msgnum; | 1335 | int msgnum; |
@@ -1821,11 +1818,9 @@ kill_httpd (struct MhdHttpList *hd) | |||
1821 | * Task run whenever HTTP server is idle for too long. Kill it. | 1818 | * Task run whenever HTTP server is idle for too long. Kill it. |
1822 | * | 1819 | * |
1823 | * @param cls the `struct MhdHttpList *` | 1820 | * @param cls the `struct MhdHttpList *` |
1824 | * @param tc sched context | ||
1825 | */ | 1821 | */ |
1826 | static void | 1822 | static void |
1827 | kill_httpd_task (void *cls, | 1823 | kill_httpd_task (void *cls) |
1828 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1829 | { | 1824 | { |
1830 | struct MhdHttpList *hd = cls; | 1825 | struct MhdHttpList *hd = cls; |
1831 | 1826 | ||
@@ -1838,11 +1833,9 @@ kill_httpd_task (void *cls, | |||
1838 | * Task run whenever HTTP server operations are pending. | 1833 | * Task run whenever HTTP server operations are pending. |
1839 | * | 1834 | * |
1840 | * @param cls the `struct MhdHttpList *` of the daemon that is being run | 1835 | * @param cls the `struct MhdHttpList *` of the daemon that is being run |
1841 | * @param tc sched context | ||
1842 | */ | 1836 | */ |
1843 | static void | 1837 | static void |
1844 | do_httpd (void *cls, | 1838 | do_httpd (void *cls); |
1845 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
1846 | 1839 | ||
1847 | 1840 | ||
1848 | /** | 1841 | /** |
@@ -1920,11 +1913,9 @@ schedule_httpd (struct MhdHttpList *hd) | |||
1920 | * Task run whenever HTTP server operations are pending. | 1913 | * Task run whenever HTTP server operations are pending. |
1921 | * | 1914 | * |
1922 | * @param cls the `struct MhdHttpList` of the daemon that is being run | 1915 | * @param cls the `struct MhdHttpList` of the daemon that is being run |
1923 | * @param tc scheduler context | ||
1924 | */ | 1916 | */ |
1925 | static void | 1917 | static void |
1926 | do_httpd (void *cls, | 1918 | do_httpd (void *cls) |
1927 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1928 | { | 1919 | { |
1929 | struct MhdHttpList *hd = cls; | 1920 | struct MhdHttpList *hd = cls; |
1930 | 1921 | ||
@@ -2171,11 +2162,9 @@ lookup_ssl_httpd (const char* domain) | |||
2171 | * the SOCKS5 handshake). Clean up. | 2162 | * the SOCKS5 handshake). Clean up. |
2172 | * | 2163 | * |
2173 | * @param cls the `struct Socks5Request *` | 2164 | * @param cls the `struct Socks5Request *` |
2174 | * @param tc sched context | ||
2175 | */ | 2165 | */ |
2176 | static void | 2166 | static void |
2177 | timeout_s5r_handshake (void *cls, | 2167 | timeout_s5r_handshake (void *cls) |
2178 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2179 | { | 2168 | { |
2180 | struct Socks5Request *s5r = cls; | 2169 | struct Socks5Request *s5r = cls; |
2181 | 2170 | ||
@@ -2245,11 +2234,9 @@ setup_data_transfer (struct Socks5Request *s5r) | |||
2245 | * Write data from buffer to socks5 client, then continue with state machine. | 2234 | * Write data from buffer to socks5 client, then continue with state machine. |
2246 | * | 2235 | * |
2247 | * @param cls the closure with the `struct Socks5Request` | 2236 | * @param cls the closure with the `struct Socks5Request` |
2248 | * @param tc scheduler context | ||
2249 | */ | 2237 | */ |
2250 | static void | 2238 | static void |
2251 | do_write (void *cls, | 2239 | do_write (void *cls) |
2252 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2253 | { | 2240 | { |
2254 | struct Socks5Request *s5r = cls; | 2241 | struct Socks5Request *s5r = cls; |
2255 | ssize_t len; | 2242 | ssize_t len; |
@@ -2502,11 +2489,9 @@ clear_from_s5r_rbuf (struct Socks5Request *s5r, | |||
2502 | * Read data from incoming Socks5 connection | 2489 | * Read data from incoming Socks5 connection |
2503 | * | 2490 | * |
2504 | * @param cls the closure with the `struct Socks5Request` | 2491 | * @param cls the closure with the `struct Socks5Request` |
2505 | * @param tc the scheduler context | ||
2506 | */ | 2492 | */ |
2507 | static void | 2493 | static void |
2508 | do_s5r_read (void *cls, | 2494 | do_s5r_read (void *cls) |
2509 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2510 | { | 2495 | { |
2511 | struct Socks5Request *s5r = cls; | 2496 | struct Socks5Request *s5r = cls; |
2512 | const struct Socks5ClientHelloMessage *c_hello; | 2497 | const struct Socks5ClientHelloMessage *c_hello; |
@@ -2514,8 +2499,10 @@ do_s5r_read (void *cls, | |||
2514 | const struct Socks5ClientRequestMessage *c_req; | 2499 | const struct Socks5ClientRequestMessage *c_req; |
2515 | ssize_t rlen; | 2500 | ssize_t rlen; |
2516 | size_t alen; | 2501 | size_t alen; |
2502 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
2517 | 2503 | ||
2518 | s5r->rtask = NULL; | 2504 | s5r->rtask = NULL; |
2505 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
2519 | if ( (NULL != tc->read_ready) && | 2506 | if ( (NULL != tc->read_ready) && |
2520 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, s5r->sock)) ) | 2507 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, s5r->sock)) ) |
2521 | { | 2508 | { |
@@ -2721,17 +2708,18 @@ do_s5r_read (void *cls, | |||
2721 | * @param tc the scheduler context | 2708 | * @param tc the scheduler context |
2722 | */ | 2709 | */ |
2723 | static void | 2710 | static void |
2724 | do_accept (void *cls, | 2711 | do_accept (void *cls) |
2725 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2726 | { | 2712 | { |
2727 | struct GNUNET_NETWORK_Handle *lsock = cls; | 2713 | struct GNUNET_NETWORK_Handle *lsock = cls; |
2728 | struct GNUNET_NETWORK_Handle *s; | 2714 | struct GNUNET_NETWORK_Handle *s; |
2729 | struct Socks5Request *s5r; | 2715 | struct Socks5Request *s5r; |
2716 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
2730 | 2717 | ||
2731 | if (lsock == lsock4) | 2718 | if (lsock == lsock4) |
2732 | ltask4 = NULL; | 2719 | ltask4 = NULL; |
2733 | else | 2720 | else |
2734 | ltask6 = NULL; | 2721 | ltask6 = NULL; |
2722 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
2735 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 2723 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
2736 | return; | 2724 | return; |
2737 | if (lsock == lsock4) | 2725 | if (lsock == lsock4) |
@@ -2769,11 +2757,9 @@ do_accept (void *cls, | |||
2769 | * Task run on shutdown | 2757 | * Task run on shutdown |
2770 | * | 2758 | * |
2771 | * @param cls closure | 2759 | * @param cls closure |
2772 | * @param tc task context | ||
2773 | */ | 2760 | */ |
2774 | static void | 2761 | static void |
2775 | do_shutdown (void *cls, | 2762 | do_shutdown (void *cls) |
2776 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2777 | { | 2763 | { |
2778 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 2764 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
2779 | "Shutting down...\n"); | 2765 | "Shutting down...\n"); |
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index 5d083cdb6..c8310db46 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -105,11 +105,9 @@ static struct GNUNET_IDENTITY_Operation *id_op; | |||
105 | * Task run on shutdown. Cleans up everything. | 105 | * Task run on shutdown. Cleans up everything. |
106 | * | 106 | * |
107 | * @param cls unused | 107 | * @param cls unused |
108 | * @param tc scheduler context | ||
109 | */ | 108 | */ |
110 | static void | 109 | static void |
111 | do_shutdown (void *cls, | 110 | do_shutdown (void *cls) |
112 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
113 | { | 111 | { |
114 | if (NULL != el) | 112 | if (NULL != el) |
115 | { | 113 | { |
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 076475d2c..87b0fd04e 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -260,8 +260,7 @@ static struct GNUNET_STATISTICS_Handle *statistics; | |||
260 | * @param tc unused | 260 | * @param tc unused |
261 | */ | 261 | */ |
262 | static void | 262 | static void |
263 | shutdown_task (void *cls, | 263 | shutdown_task (void *cls) |
264 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
265 | { | 264 | { |
266 | struct ClientLookupHandle *clh; | 265 | struct ClientLookupHandle *clh; |
267 | struct MonitorActivity *ma; | 266 | struct MonitorActivity *ma; |
@@ -349,11 +348,9 @@ shutdown_task (void *cls, | |||
349 | * Method called periodically that triggers iteration over authoritative records | 348 | * Method called periodically that triggers iteration over authoritative records |
350 | * | 349 | * |
351 | * @param cls closure | 350 | * @param cls closure |
352 | * @param tc task context | ||
353 | */ | 351 | */ |
354 | static void | 352 | static void |
355 | publish_zone_dht_next (void *cls, | 353 | publish_zone_dht_next (void *cls) |
356 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
357 | { | 354 | { |
358 | zone_publish_task = NULL; | 355 | zone_publish_task = NULL; |
359 | GNUNET_NAMESTORE_zone_iterator_next (namestore_iter); | 356 | GNUNET_NAMESTORE_zone_iterator_next (namestore_iter); |
@@ -364,11 +361,9 @@ publish_zone_dht_next (void *cls, | |||
364 | * Periodically iterate over our zone and store everything in dht | 361 | * Periodically iterate over our zone and store everything in dht |
365 | * | 362 | * |
366 | * @param cls NULL | 363 | * @param cls NULL |
367 | * @param tc task context | ||
368 | */ | 364 | */ |
369 | static void | 365 | static void |
370 | publish_zone_dht_start (void *cls, | 366 | publish_zone_dht_start (void *cls); |
371 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
372 | 367 | ||
373 | 368 | ||
374 | /** | 369 | /** |
@@ -629,11 +624,9 @@ put_gns_record (void *cls, | |||
629 | * Periodically iterate over all zones and store everything in DHT | 624 | * Periodically iterate over all zones and store everything in DHT |
630 | * | 625 | * |
631 | * @param cls NULL | 626 | * @param cls NULL |
632 | * @param tc task context | ||
633 | */ | 627 | */ |
634 | static void | 628 | static void |
635 | publish_zone_dht_start (void *cls, | 629 | publish_zone_dht_start (void *cls) |
636 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
637 | { | 630 | { |
638 | zone_publish_task = NULL; | 631 | zone_publish_task = NULL; |
639 | 632 | ||
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 9a54a8080..daae46ab7 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -541,11 +541,9 @@ translate_dot_plus (struct GNS_ResolverHandle *rh, | |||
541 | * Task scheduled to asynchronously fail a resolution. | 541 | * Task scheduled to asynchronously fail a resolution. |
542 | * | 542 | * |
543 | * @param cls the 'struct GNS_ResolverHandle' of the resolution to fail | 543 | * @param cls the 'struct GNS_ResolverHandle' of the resolution to fail |
544 | * @param tc task context | ||
545 | */ | 544 | */ |
546 | static void | 545 | static void |
547 | fail_resolution (void *cls, | 546 | fail_resolution (void *cls) |
548 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
549 | { | 547 | { |
550 | struct GNS_ResolverHandle *rh = cls; | 548 | struct GNS_ResolverHandle *rh = cls; |
551 | 549 | ||
@@ -808,8 +806,7 @@ handle_dns_result (void *cls, | |||
808 | * @param tc task context | 806 | * @param tc task context |
809 | */ | 807 | */ |
810 | static void | 808 | static void |
811 | recursive_resolution (void *cls, | 809 | recursive_resolution (void *cls); |
812 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
813 | 810 | ||
814 | 811 | ||
815 | /** | 812 | /** |
@@ -2229,11 +2226,9 @@ recursive_gns_resolution_revocation (struct GNS_ResolverHandle *rh) | |||
2229 | * Task scheduled to continue with the resolution process. | 2226 | * Task scheduled to continue with the resolution process. |
2230 | * | 2227 | * |
2231 | * @param cls the `struct GNS_ResolverHandle` of the resolution | 2228 | * @param cls the `struct GNS_ResolverHandle` of the resolution |
2232 | * @param tc task context | ||
2233 | */ | 2229 | */ |
2234 | static void | 2230 | static void |
2235 | recursive_resolution (void *cls, | 2231 | recursive_resolution (void *cls) |
2236 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2237 | { | 2232 | { |
2238 | struct GNS_ResolverHandle *rh = cls; | 2233 | struct GNS_ResolverHandle *rh = cls; |
2239 | 2234 | ||
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index 4878669e4..8a3f26041 100644 --- a/src/gns/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c | |||
@@ -211,11 +211,12 @@ cleanup_handle (struct LookupHandle *handle) | |||
211 | * @param tc scheduler context | 211 | * @param tc scheduler context |
212 | */ | 212 | */ |
213 | static void | 213 | static void |
214 | do_error (void *cls, | 214 | do_error (void *cls) |
215 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
216 | { | 215 | { |
217 | struct LookupHandle *handle = cls; | 216 | struct LookupHandle *handle = cls; |
218 | struct MHD_Response *resp = GNUNET_REST_create_json_response (NULL); | 217 | struct MHD_Response *resp; |
218 | |||
219 | resp = GNUNET_REST_create_json_response (NULL); | ||
219 | handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST); | 220 | handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST); |
220 | cleanup_handle (handle); | 221 | cleanup_handle (handle); |
221 | } | 222 | } |
@@ -550,7 +551,7 @@ get_gns_cont (struct RestConnectionDataHandle *conndata_handle, | |||
550 | GNUNET_CONTAINER_multihashmap_contains (conndata_handle->url_param_map, | 551 | GNUNET_CONTAINER_multihashmap_contains (conndata_handle->url_param_map, |
551 | &key) ) | 552 | &key) ) |
552 | { | 553 | { |
553 | handle->type = GNUNET_GNSRECORD_typename_to_number | 554 | handle->type = GNUNET_GNSRECORD_typename_to_number |
554 | (GNUNET_CONTAINER_multihashmap_get (conndata_handle->url_param_map, | 555 | (GNUNET_CONTAINER_multihashmap_get (conndata_handle->url_param_map, |
555 | &key)); | 556 | &key)); |
556 | } | 557 | } |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 72e8ff20b..0afc3ea0b 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -165,8 +165,7 @@ curl_main (void); | |||
165 | 165 | ||
166 | 166 | ||
167 | static void | 167 | static void |
168 | curl_task (void *cls, | 168 | curl_task (void *cls) |
169 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
170 | { | 169 | { |
171 | curl_task_id = NULL; | 170 | curl_task_id = NULL; |
172 | curl_main (); | 171 | curl_main (); |
@@ -247,7 +246,7 @@ curl_main () | |||
247 | } | 246 | } |
248 | 247 | ||
249 | static void | 248 | static void |
250 | start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 249 | start_curl (void *cls) |
251 | { | 250 | { |
252 | GNUNET_asprintf (&url, | 251 | GNUNET_asprintf (&url, |
253 | "http://%s:%d/hello_world", | 252 | "http://%s:%d/hello_world", |
@@ -269,12 +268,14 @@ start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
269 | curl_main (); | 268 | curl_main (); |
270 | } | 269 | } |
271 | 270 | ||
271 | |||
272 | static void | 272 | static void |
273 | disco_ns (void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 273 | disco_ns (void* cls) |
274 | { | 274 | { |
275 | GNUNET_NAMESTORE_disconnect (namestore); | 275 | GNUNET_NAMESTORE_disconnect (namestore); |
276 | } | 276 | } |
277 | 277 | ||
278 | |||
278 | /** | 279 | /** |
279 | * Callback invoked from the namestore service once record is | 280 | * Callback invoked from the namestore service once record is |
280 | * created. | 281 | * created. |
@@ -315,8 +316,7 @@ mhd_main (void); | |||
315 | 316 | ||
316 | 317 | ||
317 | static void | 318 | static void |
318 | mhd_task (void *cls, | 319 | mhd_task (void *cls) |
319 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
320 | { | 320 | { |
321 | mhd_task_id = NULL; | 321 | mhd_task_id = NULL; |
322 | MHD_run (mhd); | 322 | MHD_run (mhd); |
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 42b5959f2..6a4689af1 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c | |||
@@ -212,11 +212,9 @@ disconnect_handler (void *cls, | |||
212 | * the other services. | 212 | * the other services. |
213 | * | 213 | * |
214 | * @param cls NULL | 214 | * @param cls NULL |
215 | * @param tc scheduler context | ||
216 | */ | 215 | */ |
217 | static void | 216 | static void |
218 | cleaning_task (void *cls, | 217 | cleaning_task (void *cls) |
219 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
220 | { | 218 | { |
221 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 219 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
222 | "Hostlist daemon is shutting down\n"); | 220 | "Hostlist daemon is shutting down\n"); |
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c index e0a73f0f0..dbf6eaeda 100644 --- a/src/hostlist/gnunet-daemon-hostlist_client.c +++ b/src/hostlist/gnunet-daemon-hostlist_client.c | |||
@@ -774,8 +774,7 @@ clean_up () | |||
774 | * @param tc task context, unused | 774 | * @param tc task context, unused |
775 | */ | 775 | */ |
776 | static void | 776 | static void |
777 | task_download (void *cls, | 777 | task_download (void *cls); |
778 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
779 | 778 | ||
780 | 779 | ||
781 | /** | 780 | /** |
@@ -841,17 +840,17 @@ download_prepare () | |||
841 | * server. | 840 | * server. |
842 | * | 841 | * |
843 | * @param cls closure, unused | 842 | * @param cls closure, unused |
844 | * @param tc task context, unused | ||
845 | */ | 843 | */ |
846 | static void | 844 | static void |
847 | task_download (void *cls, | 845 | task_download (void *cls) |
848 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
849 | { | 846 | { |
850 | int running; | 847 | int running; |
851 | struct CURLMsg *msg; | 848 | struct CURLMsg *msg; |
852 | CURLMcode mret; | 849 | CURLMcode mret; |
850 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
853 | 851 | ||
854 | ti_download = NULL; | 852 | ti_download = NULL; |
853 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
855 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 854 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
856 | { | 855 | { |
857 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 856 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1046,10 +1045,12 @@ download_hostlist () | |||
1046 | 1045 | ||
1047 | 1046 | ||
1048 | static void | 1047 | static void |
1049 | task_download_dispatcher (void *cls, | 1048 | task_download_dispatcher (void *cls) |
1050 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1051 | { | 1049 | { |
1050 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1051 | |||
1052 | ti_download_dispatcher_task = NULL; | 1052 | ti_download_dispatcher_task = NULL; |
1053 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1053 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1054 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1054 | return; | 1055 | return; |
1055 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Download is initiated...\n"); | 1056 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Download is initiated...\n"); |
@@ -1075,12 +1076,14 @@ task_download_dispatcher (void *cls, | |||
1075 | * this task again for a later time. | 1076 | * this task again for a later time. |
1076 | */ | 1077 | */ |
1077 | static void | 1078 | static void |
1078 | task_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1079 | task_check (void *cls) |
1079 | { | 1080 | { |
1080 | static int once; | 1081 | static int once; |
1081 | struct GNUNET_TIME_Relative delay; | 1082 | struct GNUNET_TIME_Relative delay; |
1083 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1082 | 1084 | ||
1083 | ti_check_download = NULL; | 1085 | ti_check_download = NULL; |
1086 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1084 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1087 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1085 | return; | 1088 | return; |
1086 | if (stats == NULL) | 1089 | if (stats == NULL) |
@@ -1125,13 +1128,14 @@ task_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1125 | * This tasks sets hostlist testing to allowed after intervall between to testings is reached | 1128 | * This tasks sets hostlist testing to allowed after intervall between to testings is reached |
1126 | * | 1129 | * |
1127 | * @param cls closure | 1130 | * @param cls closure |
1128 | * @param tc TaskContext | ||
1129 | */ | 1131 | */ |
1130 | static void | 1132 | static void |
1131 | task_testing_intervall_reset (void *cls, | 1133 | task_testing_intervall_reset (void *cls) |
1132 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1133 | { | 1134 | { |
1135 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1136 | |||
1134 | ti_testing_intervall_task = NULL; | 1137 | ti_testing_intervall_task = NULL; |
1138 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1135 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1139 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1136 | return; | 1140 | return; |
1137 | stat_testing_allowed = GNUNET_OK; | 1141 | stat_testing_allowed = GNUNET_OK; |
@@ -1144,12 +1148,14 @@ task_testing_intervall_reset (void *cls, | |||
1144 | * Task that writes hostlist entries to a file on a regular base | 1148 | * Task that writes hostlist entries to a file on a regular base |
1145 | * | 1149 | * |
1146 | * @param cls closure | 1150 | * @param cls closure |
1147 | * @param tc TaskContext | ||
1148 | */ | 1151 | */ |
1149 | static void | 1152 | static void |
1150 | task_hostlist_saving (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1153 | task_hostlist_saving (void *cls) |
1151 | { | 1154 | { |
1155 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1156 | |||
1152 | ti_saving_task = NULL; | 1157 | ti_saving_task = NULL; |
1158 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1153 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1159 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1154 | return; | 1160 | return; |
1155 | save_hostlist_file (GNUNET_NO); | 1161 | save_hostlist_file (GNUNET_NO); |
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c index 7c5b18605..6e2cb7ee4 100644 --- a/src/hostlist/gnunet-daemon-hostlist_server.c +++ b/src/hostlist/gnunet-daemon-hostlist_server.c | |||
@@ -627,19 +627,18 @@ prepare_daemon (struct MHD_Daemon *daemon_handle); | |||
627 | * and schedule the next run. | 627 | * and schedule the next run. |
628 | * | 628 | * |
629 | * @param cls the `struct MHD_Daemon` of the HTTP server to run | 629 | * @param cls the `struct MHD_Daemon` of the HTTP server to run |
630 | * @param tc scheduler context | ||
631 | */ | 630 | */ |
632 | static void | 631 | static void |
633 | run_daemon (void *cls, | 632 | run_daemon (void *cls) |
634 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
635 | { | 633 | { |
636 | struct MHD_Daemon *daemon_handle = cls; | 634 | struct MHD_Daemon *daemon_handle = cls; |
635 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
637 | 636 | ||
638 | if (daemon_handle == daemon_handle_v4) | 637 | if (daemon_handle == daemon_handle_v4) |
639 | hostlist_task_v4 = NULL; | 638 | hostlist_task_v4 = NULL; |
640 | else | 639 | else |
641 | hostlist_task_v6 = NULL; | 640 | hostlist_task_v6 = NULL; |
642 | 641 | tc = GNUNET_SCHEDULER_get_task_context (); | |
643 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 642 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
644 | return; | 643 | return; |
645 | GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); | 644 | GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index 05e05e24e..2f99b887d 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c | |||
@@ -52,7 +52,7 @@ static struct PeerContext p2; | |||
52 | 52 | ||
53 | 53 | ||
54 | static void | 54 | static void |
55 | clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 55 | clean_up (void *cls) |
56 | { | 56 | { |
57 | if (p1.th != NULL) | 57 | if (p1.th != NULL) |
58 | { | 58 | { |
@@ -81,12 +81,12 @@ clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
81 | * Timeout, give up. | 81 | * Timeout, give up. |
82 | */ | 82 | */ |
83 | static void | 83 | static void |
84 | timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 84 | timeout_error (void *cls) |
85 | { | 85 | { |
86 | timeout_task = NULL; | 86 | timeout_task = NULL; |
87 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 87 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
88 | "Timeout trying to connect peers, test failed.\n"); | 88 | "Timeout trying to connect peers, test failed.\n"); |
89 | clean_up (NULL, tc); | 89 | clean_up (NULL); |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
@@ -150,7 +150,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
150 | 150 | ||
151 | 151 | ||
152 | static void | 152 | static void |
153 | waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 153 | waitpid_task (void *cls) |
154 | { | 154 | { |
155 | struct PeerContext *p = cls; | 155 | struct PeerContext *p = cls; |
156 | 156 | ||
@@ -179,7 +179,7 @@ stop_arm (struct PeerContext *p) | |||
179 | * Try again to connect to transport service. | 179 | * Try again to connect to transport service. |
180 | */ | 180 | */ |
181 | static void | 181 | static void |
182 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 182 | shutdown_task (void *cls) |
183 | { | 183 | { |
184 | stop_arm (&p1); | 184 | stop_arm (&p1); |
185 | stop_arm (&p2); | 185 | stop_arm (&p2); |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index d04c5c57f..a71b8ecae 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -166,7 +166,7 @@ shutdown_testcase () | |||
166 | * Timeout, give up. | 166 | * Timeout, give up. |
167 | */ | 167 | */ |
168 | static void | 168 | static void |
169 | timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 169 | timeout_error (void *cls) |
170 | { | 170 | { |
171 | timeout_task = NULL; | 171 | timeout_task = NULL; |
172 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 172 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -184,8 +184,7 @@ process_downloads_done (void *cls, int success) | |||
184 | 184 | ||
185 | 185 | ||
186 | static void | 186 | static void |
187 | do_shutdown (void *cls, | 187 | do_shutdown (void *cls) |
188 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
189 | { | 188 | { |
190 | shutdown_testcase (); | 189 | shutdown_testcase (); |
191 | } | 190 | } |
@@ -265,11 +264,13 @@ process_adv_sent (void *cls, const char *subsystem, const char *name, | |||
265 | * Check the server statistics regularly | 264 | * Check the server statistics regularly |
266 | */ | 265 | */ |
267 | static void | 266 | static void |
268 | check_statistics (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 267 | check_statistics (void *cls) |
269 | { | 268 | { |
270 | char *stat; | 269 | char *stat; |
270 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
271 | 271 | ||
272 | check_task = NULL; | 272 | check_task = NULL; |
273 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
273 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 274 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
274 | return; | 275 | return; |
275 | GNUNET_asprintf (&stat, gettext_noop ("# advertised URI `%s' downloaded"), | 276 | GNUNET_asprintf (&stat, gettext_noop ("# advertised URI `%s' downloaded"), |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index e7ac9b2bc..0af16e065 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -52,7 +52,7 @@ static struct PeerContext p2; | |||
52 | 52 | ||
53 | 53 | ||
54 | static void | 54 | static void |
55 | clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 55 | clean_up (void *cls) |
56 | { | 56 | { |
57 | if (NULL != p1.ghh) | 57 | if (NULL != p1.ghh) |
58 | { | 58 | { |
@@ -81,12 +81,12 @@ clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
81 | * Timeout, give up. | 81 | * Timeout, give up. |
82 | */ | 82 | */ |
83 | static void | 83 | static void |
84 | timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 84 | timeout_error (void *cls) |
85 | { | 85 | { |
86 | timeout_task = NULL; | 86 | timeout_task = NULL; |
87 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 87 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
88 | "Timeout trying to connect peers, test failed.\n"); | 88 | "Timeout trying to connect peers, test failed.\n"); |
89 | clean_up (NULL, tc); | 89 | clean_up (NULL); |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
@@ -150,7 +150,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
150 | 150 | ||
151 | 151 | ||
152 | static void | 152 | static void |
153 | waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 153 | waitpid_task (void *cls) |
154 | { | 154 | { |
155 | struct PeerContext *p = cls; | 155 | struct PeerContext *p = cls; |
156 | 156 | ||
@@ -179,7 +179,7 @@ stop_arm (struct PeerContext *p) | |||
179 | * Try again to connect to transport service. | 179 | * Try again to connect to transport service. |
180 | */ | 180 | */ |
181 | static void | 181 | static void |
182 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 182 | shutdown_task (void *cls) |
183 | { | 183 | { |
184 | stop_arm (&p1); | 184 | stop_arm (&p1); |
185 | stop_arm (&p2); | 185 | stop_arm (&p2); |
diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/identity-provider/gnunet-service-identity-provider.c index 3328035e6..59e678b24 100644 --- a/src/identity-provider/gnunet-service-identity-provider.c +++ b/src/identity-provider/gnunet-service-identity-provider.c | |||
@@ -182,7 +182,7 @@ struct ExchangeHandle | |||
182 | * LookupRequest | 182 | * LookupRequest |
183 | */ | 183 | */ |
184 | struct GNUNET_GNS_LookupRequest *lookup_request; | 184 | struct GNUNET_GNS_LookupRequest *lookup_request; |
185 | 185 | ||
186 | /** | 186 | /** |
187 | * Audience Key | 187 | * Audience Key |
188 | */ | 188 | */ |
@@ -324,11 +324,9 @@ store_token_cont (void *cls, | |||
324 | * removes deleted attributes and expiration times. | 324 | * removes deleted attributes and expiration times. |
325 | * | 325 | * |
326 | * @param cls the ego entry | 326 | * @param cls the ego entry |
327 | * @param tc task context | ||
328 | */ | 327 | */ |
329 | static void | 328 | static void |
330 | handle_token_update (void *cls, | 329 | handle_token_update (void *cls) |
331 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
332 | { | 330 | { |
333 | char *token_metadata; | 331 | char *token_metadata; |
334 | char *write_ptr; | 332 | char *write_ptr; |
@@ -428,13 +426,13 @@ handle_token_update (void *cls, | |||
428 | attr->name, | 426 | attr->name, |
429 | attr->val_head->value); | 427 | attr->val_head->value); |
430 | } | 428 | } |
431 | else | 429 | else |
432 | { | 430 | { |
433 | GNUNET_CRYPTO_hash (attr->name, | 431 | GNUNET_CRYPTO_hash (attr->name, |
434 | strlen (attr->name), | 432 | strlen (attr->name), |
435 | &key_hash); | 433 | &key_hash); |
436 | //Check if attr still exists. omit of not | 434 | //Check if attr still exists. omit of not |
437 | if (GNUNET_NO != | 435 | if (GNUNET_NO != |
438 | GNUNET_CONTAINER_multihashmap_contains (ego_entry->attr_map, | 436 | GNUNET_CONTAINER_multihashmap_contains (ego_entry->attr_map, |
439 | &key_hash)) | 437 | &key_hash)) |
440 | { | 438 | { |
@@ -497,8 +495,7 @@ handle_token_update (void *cls, | |||
497 | } | 495 | } |
498 | 496 | ||
499 | static void | 497 | static void |
500 | update_identities(void *cls, | 498 | update_identities(void *cls); |
501 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
502 | 499 | ||
503 | /** | 500 | /** |
504 | * | 501 | * |
@@ -568,7 +565,7 @@ token_collect (void *cls, | |||
568 | GNUNET_CONTAINER_multihashmap_clear (ego_entry->attr_map); | 565 | GNUNET_CONTAINER_multihashmap_clear (ego_entry->attr_map); |
569 | update_task = GNUNET_SCHEDULER_add_now (&update_identities, | 566 | update_task = GNUNET_SCHEDULER_add_now (&update_identities, |
570 | ego_entry->next); | 567 | ego_entry->next); |
571 | return; | 568 | return; |
572 | } | 569 | } |
573 | 570 | ||
574 | //There should be only a single record for a token under a label | 571 | //There should be only a single record for a token under a label |
@@ -607,7 +604,7 @@ token_collect (void *cls, | |||
607 | aud_key, | 604 | aud_key, |
608 | &token); | 605 | &token); |
609 | 606 | ||
610 | label = GNUNET_strdup (lbl); | 607 | label = GNUNET_strdup (lbl); |
611 | rd_exp = token_record->expiration_time; | 608 | rd_exp = token_record->expiration_time; |
612 | 609 | ||
613 | GNUNET_SCHEDULER_add_now (&handle_token_update, ego_entry); | 610 | GNUNET_SCHEDULER_add_now (&handle_token_update, ego_entry); |
@@ -711,12 +708,9 @@ attribute_collect (void *cls, | |||
711 | * dirty, first update the attributes. | 708 | * dirty, first update the attributes. |
712 | * | 709 | * |
713 | * @param cls the ego to update | 710 | * @param cls the ego to update |
714 | * param tc task context | ||
715 | * | ||
716 | */ | 711 | */ |
717 | static void | 712 | static void |
718 | update_identities(void *cls, | 713 | update_identities(void *cls) |
719 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
720 | { | 714 | { |
721 | struct EgoEntry *next_ego = cls; | 715 | struct EgoEntry *next_ego = cls; |
722 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key; | 716 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key; |
@@ -866,8 +860,7 @@ cleanup() | |||
866 | * @param tc task context | 860 | * @param tc task context |
867 | */ | 861 | */ |
868 | static void | 862 | static void |
869 | do_shutdown (void *cls, | 863 | do_shutdown (void *cls) |
870 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
871 | { | 864 | { |
872 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 865 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
873 | "Shutting down...\n"); | 866 | "Shutting down...\n"); |
@@ -882,10 +875,10 @@ create_exchange_result_message (const char* token, | |||
882 | { | 875 | { |
883 | struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage *erm; | 876 | struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage *erm; |
884 | uint16_t token_len = strlen (token) + 1; | 877 | uint16_t token_len = strlen (token) + 1; |
885 | erm = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage) | 878 | erm = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage) |
886 | + token_len); | 879 | + token_len); |
887 | erm->header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT); | 880 | erm->header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT); |
888 | erm->header.size = htons (sizeof (struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage) | 881 | erm->header.size = htons (sizeof (struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage) |
889 | + token_len); | 882 | + token_len); |
890 | erm->ticket_nonce = htonl (ticket_nonce); | 883 | erm->ticket_nonce = htonl (ticket_nonce); |
891 | memcpy (&erm[1], token, token_len); | 884 | memcpy (&erm[1], token, token_len); |
@@ -901,12 +894,12 @@ create_issue_result_message (const char* label, | |||
901 | struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage *irm; | 894 | struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage *irm; |
902 | char *tmp_str; | 895 | char *tmp_str; |
903 | 896 | ||
904 | irm = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage) | 897 | irm = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage) |
905 | + strlen (label) + 1 | 898 | + strlen (label) + 1 |
906 | + strlen (ticket) + 1 | 899 | + strlen (ticket) + 1 |
907 | + strlen (token) + 1); | 900 | + strlen (token) + 1); |
908 | irm->header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT); | 901 | irm->header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT); |
909 | irm->header.size = htons (sizeof (struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage) | 902 | irm->header.size = htons (sizeof (struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage) |
910 | + strlen (label) + 1 | 903 | + strlen (label) + 1 |
911 | + strlen (ticket) + 1 | 904 | + strlen (ticket) + 1 |
912 | + strlen (token) + 1); | 905 | + strlen (token) + 1); |
@@ -957,7 +950,7 @@ store_token_issue_cont (void *cls, | |||
957 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", | 950 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", |
958 | "Error serializing ticket\n"); | 951 | "Error serializing ticket\n"); |
959 | cleanup_issue_handle (handle); | 952 | cleanup_issue_handle (handle); |
960 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | 953 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
961 | return; | 954 | return; |
962 | } | 955 | } |
963 | if (GNUNET_OK != token_to_string (handle->token, | 956 | if (GNUNET_OK != token_to_string (handle->token, |
@@ -968,7 +961,7 @@ store_token_issue_cont (void *cls, | |||
968 | "Error serializing token\n"); | 961 | "Error serializing token\n"); |
969 | GNUNET_free (ticket_str); | 962 | GNUNET_free (ticket_str); |
970 | cleanup_issue_handle (handle); | 963 | cleanup_issue_handle (handle); |
971 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | 964 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
972 | return; | 965 | return; |
973 | } | 966 | } |
974 | irm = create_issue_result_message (handle->label, ticket_str, token_str); | 967 | irm = create_issue_result_message (handle->label, ticket_str, token_str); |
@@ -983,8 +976,12 @@ store_token_issue_cont (void *cls, | |||
983 | GNUNET_free (token_str); | 976 | GNUNET_free (token_str); |
984 | } | 977 | } |
985 | 978 | ||
979 | |||
986 | /** | 980 | /** |
987 | * Build a GNUid token for identity | 981 | * Build a GNUid token for identity |
982 | * | ||
983 | * FIXME: doxygen is very wrong here! | ||
984 | * | ||
988 | * @param handle the handle | 985 | * @param handle the handle |
989 | * @param ego_entry the ego to build the token for | 986 | * @param ego_entry the ego to build the token for |
990 | * @param name name of the ego | 987 | * @param name name of the ego |
@@ -993,8 +990,7 @@ store_token_issue_cont (void *cls, | |||
993 | * @return identifier string of token (label) | 990 | * @return identifier string of token (label) |
994 | */ | 991 | */ |
995 | static void | 992 | static void |
996 | sign_and_return_token (void *cls, | 993 | sign_and_return_token (void *cls) |
997 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
998 | { | 994 | { |
999 | struct GNUNET_CRYPTO_EcdsaPublicKey pub_key; | 995 | struct GNUNET_CRYPTO_EcdsaPublicKey pub_key; |
1000 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; | 996 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; |
@@ -1008,7 +1004,7 @@ sign_and_return_token (void *cls, | |||
1008 | uint64_t exp_time; | 1004 | uint64_t exp_time; |
1009 | size_t token_metadata_len; | 1005 | size_t token_metadata_len; |
1010 | 1006 | ||
1011 | //Remote nonce | 1007 | //Remote nonce |
1012 | nonce_str = NULL; | 1008 | nonce_str = NULL; |
1013 | GNUNET_asprintf (&nonce_str, "%lu", handle->nonce); | 1009 | GNUNET_asprintf (&nonce_str, "%lu", handle->nonce); |
1014 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Request nonce: %s\n", nonce_str); | 1010 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Request nonce: %s\n", nonce_str); |
@@ -1028,7 +1024,7 @@ sign_and_return_token (void *cls, | |||
1028 | token_add_attr_int (handle->token, "exp", exp_time); | 1024 | token_add_attr_int (handle->token, "exp", exp_time); |
1029 | token_add_attr (handle->token, "nonce", nonce_str); | 1025 | token_add_attr (handle->token, "nonce", nonce_str); |
1030 | 1026 | ||
1031 | //Token in a serialized encrypted format | 1027 | //Token in a serialized encrypted format |
1032 | GNUNET_assert (token_serialize (handle->token, | 1028 | GNUNET_assert (token_serialize (handle->token, |
1033 | &handle->iss_key, | 1029 | &handle->iss_key, |
1034 | &ecdhe_privkey, | 1030 | &ecdhe_privkey, |
@@ -1150,7 +1146,7 @@ attr_collect (void *cls, | |||
1150 | static void | 1146 | static void |
1151 | cleanup_exchange_handle (struct ExchangeHandle *handle) | 1147 | cleanup_exchange_handle (struct ExchangeHandle *handle) |
1152 | { | 1148 | { |
1153 | if (NULL != handle->ticket) | 1149 | if (NULL != handle->ticket) |
1154 | ticket_destroy (handle->ticket); | 1150 | ticket_destroy (handle->ticket); |
1155 | if (NULL != handle->token) | 1151 | if (NULL != handle->token) |
1156 | token_destroy (handle->token); | 1152 | token_destroy (handle->token); |
@@ -1177,7 +1173,7 @@ process_lookup_result (void *cls, uint32_t rd_count, | |||
1177 | return; | 1173 | return; |
1178 | } | 1174 | } |
1179 | 1175 | ||
1180 | record_str = | 1176 | record_str = |
1181 | GNUNET_GNSRECORD_value_to_string (GNUNET_GNSRECORD_TYPE_ID_TOKEN, | 1177 | GNUNET_GNSRECORD_value_to_string (GNUNET_GNSRECORD_TYPE_ID_TOKEN, |
1182 | rd->data, | 1178 | rd->data, |
1183 | rd->data_size); | 1179 | rd->data_size); |
@@ -1307,7 +1303,7 @@ find_existing_token (void *cls, | |||
1307 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1303 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1308 | ">>> No existing token found\n"); | 1304 | ">>> No existing token found\n"); |
1309 | //Label | 1305 | //Label |
1310 | rnd_key = | 1306 | rnd_key = |
1311 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, | 1307 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, |
1312 | UINT64_MAX); | 1308 | UINT64_MAX); |
1313 | GNUNET_STRINGS_base64_encode ((char*)&rnd_key, | 1309 | GNUNET_STRINGS_base64_encode ((char*)&rnd_key, |
@@ -1318,7 +1314,7 @@ find_existing_token (void *cls, | |||
1318 | &handle->iss_key, | 1314 | &handle->iss_key, |
1319 | &attr_collect, | 1315 | &attr_collect, |
1320 | handle); | 1316 | handle); |
1321 | return; | 1317 | return; |
1322 | } | 1318 | } |
1323 | 1319 | ||
1324 | //There should be only a single record for a token under a label | 1320 | //There should be only a single record for a token under a label |
@@ -1340,7 +1336,7 @@ find_existing_token (void *cls, | |||
1340 | return; | 1336 | return; |
1341 | } | 1337 | } |
1342 | ecdhe_privkey = *((struct GNUNET_CRYPTO_EcdhePrivateKey *)token_metadata_record->data); | 1338 | ecdhe_privkey = *((struct GNUNET_CRYPTO_EcdhePrivateKey *)token_metadata_record->data); |
1343 | aud_key = | 1339 | aud_key = |
1344 | (struct GNUNET_CRYPTO_EcdsaPublicKey *)(token_metadata_record->data+sizeof(struct GNUNET_CRYPTO_EcdhePrivateKey)); | 1340 | (struct GNUNET_CRYPTO_EcdsaPublicKey *)(token_metadata_record->data+sizeof(struct GNUNET_CRYPTO_EcdhePrivateKey)); |
1345 | tmp_scopes = GNUNET_strdup ((char*) aud_key+sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); | 1341 | tmp_scopes = GNUNET_strdup ((char*) aud_key+sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); |
1346 | 1342 | ||
@@ -1435,12 +1431,11 @@ handle_issue_message (void *cls, | |||
1435 | } | 1431 | } |
1436 | im = (const struct GNUNET_IDENTITY_PROVIDER_IssueMessage *) message; | 1432 | im = (const struct GNUNET_IDENTITY_PROVIDER_IssueMessage *) message; |
1437 | scopes = (const char *) &im[1]; | 1433 | scopes = (const char *) &im[1]; |
1438 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1439 | "Received ISSUE of `%s' from client\n", | ||
1440 | scope); | ||
1441 | issue_handle = GNUNET_malloc (sizeof (struct IssueHandle)); | 1434 | issue_handle = GNUNET_malloc (sizeof (struct IssueHandle)); |
1442 | issue_handle->attr_map = GNUNET_CONTAINER_multihashmap_create (5, | 1435 | issue_handle->attr_map = GNUNET_CONTAINER_multihashmap_create (5, |
1443 | GNUNET_NO); | 1436 | GNUNET_NO); |
1437 | /* FIXME: check that scopes is 0-termianted, Out-of-bounds access | ||
1438 | possible here!!! */ | ||
1444 | scopes_tmp = GNUNET_strdup (scopes); | 1439 | scopes_tmp = GNUNET_strdup (scopes); |
1445 | scope = strtok(scopes_tmp, ","); | 1440 | scope = strtok(scopes_tmp, ","); |
1446 | for (; NULL != scope; scope = strtok (NULL, ",")) | 1441 | for (; NULL != scope; scope = strtok (NULL, ",")) |
@@ -1484,7 +1479,7 @@ handle_issue_message (void *cls, | |||
1484 | * @param c configuration | 1479 | * @param c configuration |
1485 | */ | 1480 | */ |
1486 | static void | 1481 | static void |
1487 | run (void *cls, | 1482 | run (void *cls, |
1488 | struct GNUNET_SERVER_Handle *server, | 1483 | struct GNUNET_SERVER_Handle *server, |
1489 | const struct GNUNET_CONFIGURATION_Handle *c) | 1484 | const struct GNUNET_CONFIGURATION_Handle *c) |
1490 | { | 1485 | { |
@@ -1519,7 +1514,7 @@ run (void *cls, | |||
1519 | &list_ego, | 1514 | &list_ego, |
1520 | NULL); | 1515 | NULL); |
1521 | 1516 | ||
1522 | if (GNUNET_OK == | 1517 | if (GNUNET_OK == |
1523 | GNUNET_CONFIGURATION_get_value_time (cfg, | 1518 | GNUNET_CONFIGURATION_get_value_time (cfg, |
1524 | "identity-provider", | 1519 | "identity-provider", |
1525 | "TOKEN_EXPIRATION_INTERVAL", | 1520 | "TOKEN_EXPIRATION_INTERVAL", |
diff --git a/src/identity-provider/identity_provider_api.c b/src/identity-provider/identity_provider_api.c index f702ba890..f3280cb18 100644 --- a/src/identity-provider/identity_provider_api.c +++ b/src/identity-provider/identity_provider_api.c | |||
@@ -138,11 +138,9 @@ struct GNUNET_IDENTITY_PROVIDER_Handle | |||
138 | * Try again to connect to the service. | 138 | * Try again to connect to the service. |
139 | * | 139 | * |
140 | * @param cls handle to the service. | 140 | * @param cls handle to the service. |
141 | * @param tc scheduler context | ||
142 | */ | 141 | */ |
143 | static void | 142 | static void |
144 | reconnect (void *cls, | 143 | reconnect (void *cls); |
145 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
146 | 144 | ||
147 | 145 | ||
148 | /** | 146 | /** |
@@ -233,7 +231,7 @@ message_handler (void *cls, | |||
233 | str = NULL; | 231 | str = NULL; |
234 | } | 232 | } |
235 | label_str = strtok (str, ","); | 233 | label_str = strtok (str, ","); |
236 | 234 | ||
237 | if (NULL == label_str) | 235 | if (NULL == label_str) |
238 | { | 236 | { |
239 | GNUNET_free (str); | 237 | GNUNET_free (str); |
@@ -301,7 +299,7 @@ message_handler (void *cls, | |||
301 | op->ex_cb (op->cls, &token, ticket_nonce); | 299 | op->ex_cb (op->cls, &token, ticket_nonce); |
302 | GNUNET_free (op); | 300 | GNUNET_free (op); |
303 | break; | 301 | break; |
304 | 302 | ||
305 | default: | 303 | default: |
306 | GNUNET_break (0); | 304 | GNUNET_break (0); |
307 | reschedule_connect (h); | 305 | reschedule_connect (h); |
@@ -397,10 +395,9 @@ transmit_next (struct GNUNET_IDENTITY_PROVIDER_Handle *h) | |||
397 | * Try again to connect to the service. | 395 | * Try again to connect to the service. |
398 | * | 396 | * |
399 | * @param cls handle to the identity provider service. | 397 | * @param cls handle to the identity provider service. |
400 | * @param tc scheduler context | ||
401 | */ | 398 | */ |
402 | static void | 399 | static void |
403 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 400 | reconnect (void *cls) |
404 | { | 401 | { |
405 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = cls; | 402 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = cls; |
406 | 403 | ||
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c index 3a6151682..b104950ba 100644 --- a/src/identity-provider/plugin_rest_identity_provider.c +++ b/src/identity-provider/plugin_rest_identity_provider.c | |||
@@ -150,12 +150,12 @@ struct EgoEntry | |||
150 | * DLL | 150 | * DLL |
151 | */ | 151 | */ |
152 | struct EgoEntry *next; | 152 | struct EgoEntry *next; |
153 | 153 | ||
154 | /** | 154 | /** |
155 | * DLL | 155 | * DLL |
156 | */ | 156 | */ |
157 | struct EgoEntry *prev; | 157 | struct EgoEntry *prev; |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * Ego Identifier | 160 | * Ego Identifier |
161 | */ | 161 | */ |
@@ -165,7 +165,7 @@ struct EgoEntry | |||
165 | * Public key string | 165 | * Public key string |
166 | */ | 166 | */ |
167 | char *keystring; | 167 | char *keystring; |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * The Ego | 170 | * The Ego |
171 | */ | 171 | */ |
@@ -189,7 +189,7 @@ struct RequestHandle | |||
189 | * Selected ego | 189 | * Selected ego |
190 | */ | 190 | */ |
191 | struct EgoEntry *ego_entry; | 191 | struct EgoEntry *ego_entry; |
192 | 192 | ||
193 | /** | 193 | /** |
194 | * Ptr to current ego private key | 194 | * Ptr to current ego private key |
195 | */ | 195 | */ |
@@ -199,7 +199,7 @@ struct RequestHandle | |||
199 | * Handle to the rest connection | 199 | * Handle to the rest connection |
200 | */ | 200 | */ |
201 | struct RestConnectionDataHandle *conndata_handle; | 201 | struct RestConnectionDataHandle *conndata_handle; |
202 | 202 | ||
203 | /** | 203 | /** |
204 | * The processing state | 204 | * The processing state |
205 | */ | 205 | */ |
@@ -248,8 +248,8 @@ struct RequestHandle | |||
248 | /** | 248 | /** |
249 | * ID of a task associated with the resolution process. | 249 | * ID of a task associated with the resolution process. |
250 | */ | 250 | */ |
251 | struct GNUNET_SCHEDULER_Task * timeout_task; | 251 | struct GNUNET_SCHEDULER_Task * timeout_task; |
252 | 252 | ||
253 | /** | 253 | /** |
254 | * The plugin result processor | 254 | * The plugin result processor |
255 | */ | 255 | */ |
@@ -289,7 +289,7 @@ cleanup_handle (struct RequestHandle *handle) | |||
289 | struct EgoEntry *ego_tmp; | 289 | struct EgoEntry *ego_tmp; |
290 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 290 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
291 | "Cleaning up\n"); | 291 | "Cleaning up\n"); |
292 | if (NULL != handle->resp_object) | 292 | if (NULL != handle->resp_object) |
293 | GNUNET_REST_jsonapi_object_delete (handle->resp_object); | 293 | GNUNET_REST_jsonapi_object_delete (handle->resp_object); |
294 | if (NULL != handle->timeout_task) | 294 | if (NULL != handle->timeout_task) |
295 | GNUNET_SCHEDULER_cancel (handle->timeout_task); | 295 | GNUNET_SCHEDULER_cancel (handle->timeout_task); |
@@ -324,11 +324,9 @@ cleanup_handle (struct RequestHandle *handle) | |||
324 | * Task run on shutdown. Cleans up everything. | 324 | * Task run on shutdown. Cleans up everything. |
325 | * | 325 | * |
326 | * @param cls unused | 326 | * @param cls unused |
327 | * @param tc scheduler context | ||
328 | */ | 327 | */ |
329 | static void | 328 | static void |
330 | do_error (void *cls, | 329 | do_error (void *cls) |
331 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
332 | { | 330 | { |
333 | struct RequestHandle *handle = cls; | 331 | struct RequestHandle *handle = cls; |
334 | struct MHD_Response *resp; | 332 | struct MHD_Response *resp; |
@@ -347,11 +345,9 @@ do_error (void *cls, | |||
347 | * Task run on shutdown. Cleans up everything. | 345 | * Task run on shutdown. Cleans up everything. |
348 | * | 346 | * |
349 | * @param cls unused | 347 | * @param cls unused |
350 | * @param tc scheduler context | ||
351 | */ | 348 | */ |
352 | static void | 349 | static void |
353 | do_cleanup_handle_delayed (void *cls, | 350 | do_cleanup_handle_delayed (void *cls) |
354 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
355 | { | 351 | { |
356 | struct RequestHandle *handle = cls; | 352 | struct RequestHandle *handle = cls; |
357 | cleanup_handle(handle); | 353 | cleanup_handle(handle); |
@@ -377,7 +373,7 @@ token_creat_cont (void *cls, | |||
377 | char *ticket_str; | 373 | char *ticket_str; |
378 | char *token_str; | 374 | char *token_str; |
379 | char *result_str; | 375 | char *result_str; |
380 | 376 | ||
381 | if (NULL == ticket) | 377 | if (NULL == ticket) |
382 | { | 378 | { |
383 | handle->emsg = GNUNET_strdup ("Error in token issue"); | 379 | handle->emsg = GNUNET_strdup ("Error in token issue"); |
@@ -536,7 +532,7 @@ issue_token_cont (struct RestConnectionDataHandle *con, | |||
536 | &aud_key, | 532 | &aud_key, |
537 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); | 533 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); |
538 | 534 | ||
539 | //Remote nonce | 535 | //Remote nonce |
540 | nonce_str = NULL; | 536 | nonce_str = NULL; |
541 | GNUNET_CRYPTO_hash (GNUNET_IDENTITY_TOKEN_REQUEST_NONCE, | 537 | GNUNET_CRYPTO_hash (GNUNET_IDENTITY_TOKEN_REQUEST_NONCE, |
542 | strlen (GNUNET_IDENTITY_TOKEN_REQUEST_NONCE), | 538 | strlen (GNUNET_IDENTITY_TOKEN_REQUEST_NONCE), |
@@ -600,11 +596,9 @@ issue_token_cont (struct RestConnectionDataHandle *con, | |||
600 | * Build a GNUid token for identity | 596 | * Build a GNUid token for identity |
601 | * | 597 | * |
602 | * @param cls the request handle | 598 | * @param cls the request handle |
603 | * @param tc task context | ||
604 | */ | 599 | */ |
605 | static void | 600 | static void |
606 | return_token_list (void *cls, | 601 | return_token_list (void *cls) |
607 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
608 | { | 602 | { |
609 | char* result_str; | 603 | char* result_str; |
610 | struct RequestHandle *handle = cls; | 604 | struct RequestHandle *handle = cls; |
@@ -784,7 +778,7 @@ exchange_cont (void *cls, | |||
784 | char* token_str; | 778 | char* token_str; |
785 | char* nonce_str; | 779 | char* nonce_str; |
786 | uint64_t expected_nonce; | 780 | uint64_t expected_nonce; |
787 | 781 | ||
788 | //Get nonce | 782 | //Get nonce |
789 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_IDENTITY_PROVIDER_EXPECTED_NONCE, | 783 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_IDENTITY_PROVIDER_EXPECTED_NONCE, |
790 | strlen (GNUNET_REST_JSONAPI_IDENTITY_PROVIDER_EXPECTED_NONCE), | 784 | strlen (GNUNET_REST_JSONAPI_IDENTITY_PROVIDER_EXPECTED_NONCE), |
@@ -823,7 +817,7 @@ exchange_cont (void *cls, | |||
823 | GNUNET_free (result); | 817 | GNUNET_free (result); |
824 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 818 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
825 | cleanup_handle (handle); | 819 | cleanup_handle (handle); |
826 | json_decref (root); | 820 | json_decref (root); |
827 | } | 821 | } |
828 | 822 | ||
829 | 823 | ||
@@ -1010,7 +1004,7 @@ list_ego (void *cls, | |||
1010 | if (ID_REST_STATE_INIT == handle->state) { | 1004 | if (ID_REST_STATE_INIT == handle->state) { |
1011 | ego_entry = GNUNET_new (struct EgoEntry); | 1005 | ego_entry = GNUNET_new (struct EgoEntry); |
1012 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 1006 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
1013 | ego_entry->keystring = | 1007 | ego_entry->keystring = |
1014 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 1008 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); |
1015 | ego_entry->ego = ego; | 1009 | ego_entry->ego = ego; |
1016 | GNUNET_asprintf (&ego_entry->identifier, "%s", identifier); | 1010 | GNUNET_asprintf (&ego_entry->identifier, "%s", identifier); |
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index 574586b40..dc9174d21 100644 --- a/src/identity/gnunet-identity.c +++ b/src/identity/gnunet-identity.c | |||
@@ -84,11 +84,9 @@ static struct GNUNET_IDENTITY_Operation *delete_op; | |||
84 | * Task run on shutdown. | 84 | * Task run on shutdown. |
85 | * | 85 | * |
86 | * @param cls NULL | 86 | * @param cls NULL |
87 | * @param tc unused | ||
88 | */ | 87 | */ |
89 | static void | 88 | static void |
90 | shutdown_task (void *cls, | 89 | shutdown_task (void *cls) |
91 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
92 | { | 90 | { |
93 | if (NULL != set_op) | 91 | if (NULL != set_op) |
94 | { | 92 | { |
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c index 8a26fb8c3..d36319a99 100644 --- a/src/identity/gnunet-service-identity.c +++ b/src/identity/gnunet-service-identity.c | |||
@@ -134,10 +134,9 @@ get_ego_filename (struct Ego *ego) | |||
134 | * Task run during shutdown. | 134 | * Task run during shutdown. |
135 | * | 135 | * |
136 | * @param cls unused | 136 | * @param cls unused |
137 | * @param tc unused | ||
138 | */ | 137 | */ |
139 | static void | 138 | static void |
140 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 139 | shutdown_task (void *cls) |
141 | { | 140 | { |
142 | struct Ego *e; | 141 | struct Ego *e; |
143 | 142 | ||
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c index 6b7ca5c44..1406ddd41 100644 --- a/src/identity/identity_api.c +++ b/src/identity/identity_api.c | |||
@@ -195,11 +195,9 @@ GNUNET_IDENTITY_ego_get_anonymous () | |||
195 | * Try again to connect to the identity service. | 195 | * Try again to connect to the identity service. |
196 | * | 196 | * |
197 | * @param cls handle to the identity service. | 197 | * @param cls handle to the identity service. |
198 | * @param tc scheduler context | ||
199 | */ | 198 | */ |
200 | static void | 199 | static void |
201 | reconnect (void *cls, | 200 | reconnect (void *cls); |
202 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
203 | 201 | ||
204 | 202 | ||
205 | /** | 203 | /** |
@@ -533,10 +531,9 @@ transmit_next (struct GNUNET_IDENTITY_Handle *h) | |||
533 | * Try again to connect to the identity service. | 531 | * Try again to connect to the identity service. |
534 | * | 532 | * |
535 | * @param cls handle to the identity service. | 533 | * @param cls handle to the identity service. |
536 | * @param tc scheduler context | ||
537 | */ | 534 | */ |
538 | static void | 535 | static void |
539 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 536 | reconnect (void *cls) |
540 | { | 537 | { |
541 | struct GNUNET_IDENTITY_Handle *h = cls; | 538 | struct GNUNET_IDENTITY_Handle *h = cls; |
542 | struct GNUNET_IDENTITY_Operation *op; | 539 | struct GNUNET_IDENTITY_Operation *op; |
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 9ab3a8772..22ade6a0e 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c | |||
@@ -107,12 +107,12 @@ struct EgoEntry | |||
107 | * DLL | 107 | * DLL |
108 | */ | 108 | */ |
109 | struct EgoEntry *next; | 109 | struct EgoEntry *next; |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * DLL | 112 | * DLL |
113 | */ | 113 | */ |
114 | struct EgoEntry *prev; | 114 | struct EgoEntry *prev; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Ego Identifier | 117 | * Ego Identifier |
118 | */ | 118 | */ |
@@ -122,7 +122,7 @@ struct EgoEntry | |||
122 | * Public key string | 122 | * Public key string |
123 | */ | 123 | */ |
124 | char *keystring; | 124 | char *keystring; |
125 | 125 | ||
126 | /** | 126 | /** |
127 | * The Ego | 127 | * The Ego |
128 | */ | 128 | */ |
@@ -146,7 +146,7 @@ struct RequestHandle | |||
146 | * Handle to the rest connection | 146 | * Handle to the rest connection |
147 | */ | 147 | */ |
148 | struct RestConnectionDataHandle *conndata_handle; | 148 | struct RestConnectionDataHandle *conndata_handle; |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * The processing state | 151 | * The processing state |
152 | */ | 152 | */ |
@@ -170,7 +170,7 @@ struct RequestHandle | |||
170 | /** | 170 | /** |
171 | * ID of a task associated with the resolution process. | 171 | * ID of a task associated with the resolution process. |
172 | */ | 172 | */ |
173 | struct GNUNET_SCHEDULER_Task * timeout_task; | 173 | struct GNUNET_SCHEDULER_Task * timeout_task; |
174 | 174 | ||
175 | /** | 175 | /** |
176 | * The plugin result processor | 176 | * The plugin result processor |
@@ -260,11 +260,9 @@ cleanup_handle (struct RequestHandle *handle) | |||
260 | * Task run on shutdown. Cleans up everything. | 260 | * Task run on shutdown. Cleans up everything. |
261 | * | 261 | * |
262 | * @param cls unused | 262 | * @param cls unused |
263 | * @param tc scheduler context | ||
264 | */ | 263 | */ |
265 | static void | 264 | static void |
266 | do_error (void *cls, | 265 | do_error (void *cls) |
267 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
268 | { | 266 | { |
269 | struct RequestHandle *handle = cls; | 267 | struct RequestHandle *handle = cls; |
270 | struct MHD_Response *resp; | 268 | struct MHD_Response *resp; |
@@ -528,7 +526,7 @@ ego_create_cont (struct RestConnectionDataHandle *con, | |||
528 | egoname_json = GNUNET_REST_jsonapi_resource_read_attr (json_res, GNUNET_REST_JSONAPI_IDENTITY_NAME); | 526 | egoname_json = GNUNET_REST_jsonapi_resource_read_attr (json_res, GNUNET_REST_JSONAPI_IDENTITY_NAME); |
529 | if (!json_is_string (egoname_json)) | 527 | if (!json_is_string (egoname_json)) |
530 | { | 528 | { |
531 | GNUNET_REST_jsonapi_object_delete (json_obj); | 529 | GNUNET_REST_jsonapi_object_delete (json_obj); |
532 | handle->emsg = GNUNET_strdup ("No name provided"); | 530 | handle->emsg = GNUNET_strdup ("No name provided"); |
533 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 531 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
534 | return; | 532 | return; |
@@ -563,7 +561,7 @@ ego_create_cont (struct RestConnectionDataHandle *con, | |||
563 | * @param url the url that is requested | 561 | * @param url the url that is requested |
564 | * @param cls the RequestHandle | 562 | * @param cls the RequestHandle |
565 | */ | 563 | */ |
566 | static void | 564 | static void |
567 | ego_edit_cont (struct RestConnectionDataHandle *con, | 565 | ego_edit_cont (struct RestConnectionDataHandle *con, |
568 | const char *url, | 566 | const char *url, |
569 | void *cls) | 567 | void *cls) |
@@ -633,7 +631,7 @@ ego_edit_cont (struct RestConnectionDataHandle *con, | |||
633 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 631 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
634 | return; | 632 | return; |
635 | } | 633 | } |
636 | json_res = GNUNET_REST_jsonapi_object_get_resource (json_obj, 0); | 634 | json_res = GNUNET_REST_jsonapi_object_get_resource (json_obj, 0); |
637 | 635 | ||
638 | if (GNUNET_NO == GNUNET_REST_jsonapi_resource_check_type (json_res, GNUNET_REST_JSONAPI_IDENTITY_EGO)) | 636 | if (GNUNET_NO == GNUNET_REST_jsonapi_resource_check_type (json_res, GNUNET_REST_JSONAPI_IDENTITY_EGO)) |
639 | { | 637 | { |
@@ -692,7 +690,7 @@ ego_edit_cont (struct RestConnectionDataHandle *con, | |||
692 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 690 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
693 | } | 691 | } |
694 | 692 | ||
695 | void | 693 | void |
696 | ego_delete_cont (struct RestConnectionDataHandle *con_handle, | 694 | ego_delete_cont (struct RestConnectionDataHandle *con_handle, |
697 | const char* url, | 695 | const char* url, |
698 | void *cls) | 696 | void *cls) |
@@ -836,7 +834,7 @@ list_ego (void *cls, | |||
836 | if (ID_REST_STATE_INIT == handle->state) { | 834 | if (ID_REST_STATE_INIT == handle->state) { |
837 | ego_entry = GNUNET_new (struct EgoEntry); | 835 | ego_entry = GNUNET_new (struct EgoEntry); |
838 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 836 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
839 | ego_entry->keystring = | 837 | ego_entry->keystring = |
840 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 838 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); |
841 | ego_entry->ego = ego; | 839 | ego_entry->ego = ego; |
842 | GNUNET_asprintf (&ego_entry->identifier, "%s", identifier); | 840 | GNUNET_asprintf (&ego_entry->identifier, "%s", identifier); |
diff --git a/src/identity/test_identity.c b/src/identity/test_identity.c index 12d182c65..6eaa86e91 100644 --- a/src/identity/test_identity.c +++ b/src/identity/test_identity.c | |||
@@ -77,10 +77,9 @@ cleanup () | |||
77 | * Termiante the testcase (failure). | 77 | * Termiante the testcase (failure). |
78 | * | 78 | * |
79 | * @param cls NULL | 79 | * @param cls NULL |
80 | * @param tc scheduler context | ||
81 | */ | 80 | */ |
82 | static void | 81 | static void |
83 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 82 | endbadly (void *cls) |
84 | { | 83 | { |
85 | cleanup (); | 84 | cleanup (); |
86 | res = 1; | 85 | res = 1; |
@@ -91,10 +90,9 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
91 | * Termiante the testcase (success). | 90 | * Termiante the testcase (success). |
92 | * | 91 | * |
93 | * @param cls NULL | 92 | * @param cls NULL |
94 | * @param tc scheduler context | ||
95 | */ | 93 | */ |
96 | static void | 94 | static void |
97 | end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 95 | end_normally (void *cls) |
98 | { | 96 | { |
99 | cleanup (); | 97 | cleanup (); |
100 | res = 0; | 98 | res = 0; |
diff --git a/src/identity/test_identity_defaults.c b/src/identity/test_identity_defaults.c index 961066627..207db321f 100644 --- a/src/identity/test_identity_defaults.c +++ b/src/identity/test_identity_defaults.c | |||
@@ -77,10 +77,9 @@ cleanup () | |||
77 | * Termiante the testcase (failure). | 77 | * Termiante the testcase (failure). |
78 | * | 78 | * |
79 | * @param cls NULL | 79 | * @param cls NULL |
80 | * @param tc scheduler context | ||
81 | */ | 80 | */ |
82 | static void | 81 | static void |
83 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 82 | endbadly (void *cls) |
84 | { | 83 | { |
85 | cleanup (); | 84 | cleanup (); |
86 | res = 1; | 85 | res = 1; |
@@ -91,10 +90,9 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
91 | * Termiante the testcase (success). | 90 | * Termiante the testcase (success). |
92 | * | 91 | * |
93 | * @param cls NULL | 92 | * @param cls NULL |
94 | * @param tc scheduler context | ||
95 | */ | 93 | */ |
96 | static void | 94 | static void |
97 | end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 95 | end_normally (void *cls) |
98 | { | 96 | { |
99 | cleanup (); | 97 | cleanup (); |
100 | res = 0; | 98 | res = 0; |
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index 3fa2497d6..1cb01d038 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h | |||
@@ -572,12 +572,9 @@ GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc); | |||
572 | * variable) and raise those signals. | 572 | * variable) and raise those signals. |
573 | * | 573 | * |
574 | * @param cls closure (unused) | 574 | * @param cls closure (unused) |
575 | * @param tc scheduler context (unused) | ||
576 | */ | 575 | */ |
577 | void | 576 | void |
578 | GNUNET_OS_install_parent_control_handler (void *cls, | 577 | GNUNET_OS_install_parent_control_handler (void *cls); |
579 | const struct | ||
580 | GNUNET_SCHEDULER_TaskContext *tc); | ||
581 | 578 | ||
582 | 579 | ||
583 | /** | 580 | /** |
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index e93eab41f..d9b63775a 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | Copyright (C) 2009-2015 GNUnet e.V. | 3 | Copyright (C) 2009-2016 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -131,8 +131,7 @@ struct GNUNET_SCHEDULER_TaskContext | |||
131 | * @param tc context information (why was this task triggered now) | 131 | * @param tc context information (why was this task triggered now) |
132 | */ | 132 | */ |
133 | typedef void | 133 | typedef void |
134 | (*GNUNET_SCHEDULER_TaskCallback) (void *cls, | 134 | (*GNUNET_SCHEDULER_TaskCallback) (void *cls); |
135 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
136 | 135 | ||
137 | 136 | ||
138 | /** | 137 | /** |
@@ -200,14 +199,13 @@ GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p); | |||
200 | 199 | ||
201 | 200 | ||
202 | /** | 201 | /** |
203 | * Obtain the reason code for why the current task was | 202 | * Obtain the reasoning why the current task was |
204 | * started. Will return the same value as | 203 | * started. |
205 | * the GNUNET_SCHEDULER_TaskContext's reason field. | ||
206 | * | 204 | * |
207 | * @return reason(s) why the current task is run | 205 | * @return task context with information why the current task is run |
208 | */ | 206 | */ |
209 | enum GNUNET_SCHEDULER_Reason | 207 | const struct GNUNET_SCHEDULER_TaskContext * |
210 | GNUNET_SCHEDULER_get_reason (void); | 208 | GNUNET_SCHEDULER_get_task_context (void); |
211 | 209 | ||
212 | 210 | ||
213 | /** | 211 | /** |
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index f70f28116..1ad2fc8b7 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h | |||
@@ -453,8 +453,9 @@ GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client, | |||
453 | * @param client identification of the client; NULL | 453 | * @param client identification of the client; NULL |
454 | * for the last call when the server is destroyed | 454 | * for the last call when the server is destroyed |
455 | */ | 455 | */ |
456 | typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, | 456 | typedef void |
457 | struct GNUNET_SERVER_Client *client); | 457 | (*GNUNET_SERVER_DisconnectCallback) (void *cls, |
458 | struct GNUNET_SERVER_Client *client); | ||
458 | 459 | ||
459 | 460 | ||
460 | /** | 461 | /** |
@@ -464,8 +465,9 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, | |||
464 | * @param cls closure | 465 | * @param cls closure |
465 | * @param client identification of the client | 466 | * @param client identification of the client |
466 | */ | 467 | */ |
467 | typedef void (*GNUNET_SERVER_ConnectCallback) (void *cls, | 468 | typedef void |
468 | struct GNUNET_SERVER_Client *client); | 469 | (*GNUNET_SERVER_ConnectCallback) (void *cls, |
470 | struct GNUNET_SERVER_Client *client); | ||
469 | 471 | ||
470 | 472 | ||
471 | /** | 473 | /** |
@@ -799,8 +801,9 @@ GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer *mst); | |||
799 | * @param client handle to client the tokenzier will be used for | 801 | * @param client handle to client the tokenzier will be used for |
800 | * @return handle to custom tokenizer ('mst') | 802 | * @return handle to custom tokenizer ('mst') |
801 | */ | 803 | */ |
802 | typedef void* (*GNUNET_SERVER_MstCreateCallback) (void *cls, | 804 | typedef void* |
803 | struct GNUNET_SERVER_Client *client); | 805 | (*GNUNET_SERVER_MstCreateCallback) (void *cls, |
806 | struct GNUNET_SERVER_Client *client); | ||
804 | 807 | ||
805 | 808 | ||
806 | /** | 809 | /** |
@@ -809,7 +812,9 @@ typedef void* (*GNUNET_SERVER_MstCreateCallback) (void *cls, | |||
809 | * @param cls closure from #GNUNET_SERVER_set_callbacks | 812 | * @param cls closure from #GNUNET_SERVER_set_callbacks |
810 | * @param mst custom tokenizer handle | 813 | * @param mst custom tokenizer handle |
811 | */ | 814 | */ |
812 | typedef void (*GNUNET_SERVER_MstDestroyCallback) (void *cls, void *mst); | 815 | typedef void |
816 | (*GNUNET_SERVER_MstDestroyCallback) (void *cls, | ||
817 | void *mst); | ||
813 | 818 | ||
814 | 819 | ||
815 | /** | 820 | /** |
@@ -828,10 +833,13 @@ typedef void (*GNUNET_SERVER_MstDestroyCallback) (void *cls, void *mst); | |||
828 | * #GNUNET_NO if one_shot was set and we have another message ready | 833 | * #GNUNET_NO if one_shot was set and we have another message ready |
829 | * #GNUNET_SYSERR if the data stream is corrupt | 834 | * #GNUNET_SYSERR if the data stream is corrupt |
830 | */ | 835 | */ |
831 | typedef int (*GNUNET_SERVER_MstReceiveCallback) (void *cls, void *mst, | 836 | typedef int |
832 | struct GNUNET_SERVER_Client *client, | 837 | (*GNUNET_SERVER_MstReceiveCallback) (void *cls, void *mst, |
833 | const char *buf, size_t size, | 838 | struct GNUNET_SERVER_Client *client, |
834 | int purge, int one_shot); | 839 | const char *buf, |
840 | size_t size, | ||
841 | int purge, | ||
842 | int one_shot); | ||
835 | 843 | ||
836 | 844 | ||
837 | /** | 845 | /** |
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c index 69a0d3fd7..8041119b0 100644 --- a/src/multicast/gnunet-service-multicast.c +++ b/src/multicast/gnunet-service-multicast.c | |||
@@ -327,10 +327,9 @@ struct ReplayRequestKey | |||
327 | * Task run during shutdown. | 327 | * Task run during shutdown. |
328 | * | 328 | * |
329 | * @param cls unused | 329 | * @param cls unused |
330 | * @param tc unused | ||
331 | */ | 330 | */ |
332 | static void | 331 | static void |
333 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 332 | shutdown_task (void *cls) |
334 | { | 333 | { |
335 | if (NULL != core) | 334 | if (NULL != core) |
336 | { | 335 | { |
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c index a81c1f379..9550b8894 100644 --- a/src/multicast/test_multicast.c +++ b/src/multicast/test_multicast.c | |||
@@ -132,10 +132,9 @@ cleanup () | |||
132 | * Terminate the test case (failure). | 132 | * Terminate the test case (failure). |
133 | * | 133 | * |
134 | * @param cls NULL | 134 | * @param cls NULL |
135 | * @param tc scheduler context | ||
136 | */ | 135 | */ |
137 | static void | 136 | static void |
138 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 137 | end_badly (void *cls) |
139 | { | 138 | { |
140 | res = 1; | 139 | res = 1; |
141 | cleanup (); | 140 | cleanup (); |
@@ -147,10 +146,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
147 | * Terminate the test case (success). | 146 | * Terminate the test case (success). |
148 | * | 147 | * |
149 | * @param cls NULL | 148 | * @param cls NULL |
150 | * @param tc scheduler context | ||
151 | */ | 149 | */ |
152 | static void | 150 | static void |
153 | end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 151 | end_normally (void *cls) |
154 | { | 152 | { |
155 | res = 0; | 153 | res = 0; |
156 | cleanup (); | 154 | cleanup (); |
@@ -176,8 +174,8 @@ end () | |||
176 | } | 174 | } |
177 | 175 | ||
178 | 176 | ||
179 | void | 177 | static void |
180 | tmit_resume (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 178 | tmit_resume (void *cls) |
181 | { | 179 | { |
182 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n"); | 180 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n"); |
183 | struct TransmitClosure *tmit = cls; | 181 | struct TransmitClosure *tmit = cls; |
@@ -254,7 +252,7 @@ origin_stopped (void *cls) | |||
254 | 252 | ||
255 | 253 | ||
256 | static void | 254 | static void |
257 | schedule_origin_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 255 | schedule_origin_stop (void *cls) |
258 | { | 256 | { |
259 | test = TEST_ORIGIN_STOP; | 257 | test = TEST_ORIGIN_STOP; |
260 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 258 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -290,7 +288,7 @@ member_parted (void *cls) | |||
290 | 288 | ||
291 | 289 | ||
292 | static void | 290 | static void |
293 | schedule_member_part (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 291 | schedule_member_part (void *cls) |
294 | { | 292 | { |
295 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 293 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
296 | "Test #%u: schedule_member_part()\n", test); | 294 | "Test #%u: schedule_member_part()\n", test); |
diff --git a/src/namecache/gnunet-namecache.c b/src/namecache/gnunet-namecache.c index eed40da22..6abcb7b92 100644 --- a/src/namecache/gnunet-namecache.c +++ b/src/namecache/gnunet-namecache.c | |||
@@ -68,11 +68,9 @@ static int ret; | |||
68 | * Task run on shutdown. Cleans up everything. | 68 | * Task run on shutdown. Cleans up everything. |
69 | * | 69 | * |
70 | * @param cls unused | 70 | * @param cls unused |
71 | * @param tc scheduler context | ||
72 | */ | 71 | */ |
73 | static void | 72 | static void |
74 | do_shutdown (void *cls, | 73 | do_shutdown (void *cls) |
75 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
76 | { | 74 | { |
77 | if (NULL != qe) | 75 | if (NULL != qe) |
78 | { | 76 | { |
diff --git a/src/namecache/gnunet-service-namecache.c b/src/namecache/gnunet-service-namecache.c index 3eedb18a5..81b1cce9b 100644 --- a/src/namecache/gnunet-service-namecache.c +++ b/src/namecache/gnunet-service-namecache.c | |||
@@ -105,10 +105,9 @@ static struct GNUNET_SERVER_NotificationContext *monitor_nc; | |||
105 | * Task run during shutdown. | 105 | * Task run during shutdown. |
106 | * | 106 | * |
107 | * @param cls unused | 107 | * @param cls unused |
108 | * @param tc unused | ||
109 | */ | 108 | */ |
110 | static void | 109 | static void |
111 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 110 | cleanup_task (void *cls) |
112 | { | 111 | { |
113 | struct NamecacheClient *nc; | 112 | struct NamecacheClient *nc; |
114 | 113 | ||
@@ -426,4 +425,3 @@ main (int argc, char *const *argv) | |||
426 | } | 425 | } |
427 | 426 | ||
428 | /* end of gnunet-service-namecache.c */ | 427 | /* end of gnunet-service-namecache.c */ |
429 | |||
diff --git a/src/namecache/namecache_api.c b/src/namecache/namecache_api.c index 7f9baf1b4..15a750448 100644 --- a/src/namecache/namecache_api.c +++ b/src/namecache/namecache_api.c | |||
@@ -495,11 +495,9 @@ reconnect (struct GNUNET_NAMECACHE_Handle *h) | |||
495 | * Re-establish the connection to the service. | 495 | * Re-establish the connection to the service. |
496 | * | 496 | * |
497 | * @param cls handle to use to re-connect. | 497 | * @param cls handle to use to re-connect. |
498 | * @param tc scheduler context | ||
499 | */ | 498 | */ |
500 | static void | 499 | static void |
501 | reconnect_task (void *cls, | 500 | reconnect_task (void *cls) |
502 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
503 | { | 501 | { |
504 | struct GNUNET_NAMECACHE_Handle *h = cls; | 502 | struct GNUNET_NAMECACHE_Handle *h = cls; |
505 | 503 | ||
diff --git a/src/namecache/test_namecache_api_cache_block.c b/src/namecache/test_namecache_api_cache_block.c index ff4d93b4f..5522b207d 100644 --- a/src/namecache/test_namecache_api_cache_block.c +++ b/src/namecache/test_namecache_api_cache_block.c | |||
@@ -68,10 +68,9 @@ cleanup () | |||
68 | * Re-establish the connection to the service. | 68 | * Re-establish the connection to the service. |
69 | * | 69 | * |
70 | * @param cls handle to use to re-connect. | 70 | * @param cls handle to use to re-connect. |
71 | * @param tc scheduler context | ||
72 | */ | 71 | */ |
73 | static void | 72 | static void |
74 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 73 | endbadly (void *cls) |
75 | { | 74 | { |
76 | if (NULL != nsqe) | 75 | if (NULL != nsqe) |
77 | { | 76 | { |
@@ -84,7 +83,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
84 | 83 | ||
85 | 84 | ||
86 | static void | 85 | static void |
87 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 86 | end (void *cls) |
88 | { | 87 | { |
89 | cleanup (); | 88 | cleanup (); |
90 | res = 0; | 89 | res = 0; |
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index b00510ae7..82d73f6de 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -226,11 +226,9 @@ static unsigned long long port; | |||
226 | * Task run whenever HTTP server operations are pending. | 226 | * Task run whenever HTTP server operations are pending. |
227 | * | 227 | * |
228 | * @param cls unused | 228 | * @param cls unused |
229 | * @param tc scheduler context | ||
230 | */ | 229 | */ |
231 | static void | 230 | static void |
232 | do_httpd (void *cls, | 231 | do_httpd (void *cls); |
233 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
234 | 232 | ||
235 | 233 | ||
236 | /** | 234 | /** |
@@ -840,11 +838,9 @@ run_httpd () | |||
840 | * Task run whenever HTTP server operations are pending. | 838 | * Task run whenever HTTP server operations are pending. |
841 | * | 839 | * |
842 | * @param cls unused | 840 | * @param cls unused |
843 | * @param tc scheduler context | ||
844 | */ | 841 | */ |
845 | static void | 842 | static void |
846 | do_httpd (void *cls, | 843 | do_httpd (void *cls) |
847 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
848 | { | 844 | { |
849 | httpd_task = NULL; | 845 | httpd_task = NULL; |
850 | MHD_run (httpd); | 846 | MHD_run (httpd); |
@@ -856,11 +852,9 @@ do_httpd (void *cls, | |||
856 | * Task run on shutdown. Cleans up everything. | 852 | * Task run on shutdown. Cleans up everything. |
857 | * | 853 | * |
858 | * @param cls unused | 854 | * @param cls unused |
859 | * @param tc scheduler context | ||
860 | */ | 855 | */ |
861 | static void | 856 | static void |
862 | do_shutdown (void *cls, | 857 | do_shutdown (void *cls) |
863 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
864 | { | 858 | { |
865 | if (NULL != httpd_task) | 859 | if (NULL != httpd_task) |
866 | { | 860 | { |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 378832a65..0965d8cbe 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -199,11 +199,9 @@ static int monitor; | |||
199 | * Task run on shutdown. Cleans up everything. | 199 | * Task run on shutdown. Cleans up everything. |
200 | * | 200 | * |
201 | * @param cls unused | 201 | * @param cls unused |
202 | * @param tc scheduler context | ||
203 | */ | 202 | */ |
204 | static void | 203 | static void |
205 | do_shutdown (void *cls, | 204 | do_shutdown (void *cls) |
206 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
207 | { | 205 | { |
208 | if (NULL != get_default) | 206 | if (NULL != get_default) |
209 | { | 207 | { |
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 4d60c8ea5..0bfd002f5 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -270,10 +270,9 @@ static struct GNUNET_SERVER_NotificationContext *monitor_nc; | |||
270 | * Task run during shutdown. | 270 | * Task run during shutdown. |
271 | * | 271 | * |
272 | * @param cls unused | 272 | * @param cls unused |
273 | * @param tc unused | ||
274 | */ | 273 | */ |
275 | static void | 274 | static void |
276 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 275 | cleanup_task (void *cls) |
277 | { | 276 | { |
278 | struct ZoneIteration *no; | 277 | struct ZoneIteration *no; |
279 | struct NamestoreClient *nc; | 278 | struct NamestoreClient *nc; |
@@ -1525,11 +1524,9 @@ monitor_sync (struct ZoneMonitor *zm) | |||
1525 | * Obtain the next datum during the zone monitor's zone intiial iteration. | 1524 | * Obtain the next datum during the zone monitor's zone intiial iteration. |
1526 | * | 1525 | * |
1527 | * @param cls zone monitor that does its initial iteration | 1526 | * @param cls zone monitor that does its initial iteration |
1528 | * @param tc scheduler context | ||
1529 | */ | 1527 | */ |
1530 | static void | 1528 | static void |
1531 | monitor_next (void *cls, | 1529 | monitor_next (void *cls); |
1532 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
1533 | 1530 | ||
1534 | 1531 | ||
1535 | /** | 1532 | /** |
@@ -1606,11 +1603,9 @@ handle_monitor_start (void *cls, | |||
1606 | * Obtain the next datum during the zone monitor's zone intiial iteration. | 1603 | * Obtain the next datum during the zone monitor's zone intiial iteration. |
1607 | * | 1604 | * |
1608 | * @param cls zone monitor that does its initial iteration | 1605 | * @param cls zone monitor that does its initial iteration |
1609 | * @param tc scheduler context | ||
1610 | */ | 1606 | */ |
1611 | static void | 1607 | static void |
1612 | monitor_next (void *cls, | 1608 | monitor_next (void *cls) |
1613 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1614 | { | 1609 | { |
1615 | struct ZoneMonitor *zm = cls; | 1610 | struct ZoneMonitor *zm = cls; |
1616 | int ret; | 1611 | int ret; |
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 70695b85a..f65c45e85 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -866,11 +866,9 @@ reconnect (struct GNUNET_NAMESTORE_Handle *h) | |||
866 | * Re-establish the connection to the service. | 866 | * Re-establish the connection to the service. |
867 | * | 867 | * |
868 | * @param cls handle to use to re-connect. | 868 | * @param cls handle to use to re-connect. |
869 | * @param tc scheduler context | ||
870 | */ | 869 | */ |
871 | static void | 870 | static void |
872 | reconnect_task (void *cls, | 871 | reconnect_task (void *cls) |
873 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
874 | { | 872 | { |
875 | struct GNUNET_NAMESTORE_Handle *h = cls; | 873 | struct GNUNET_NAMESTORE_Handle *h = cls; |
876 | 874 | ||
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index a3938cfd8..cfebd63a7 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -82,12 +82,12 @@ struct RecordEntry | |||
82 | * DLL | 82 | * DLL |
83 | */ | 83 | */ |
84 | struct RecordEntry *next; | 84 | struct RecordEntry *next; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * DLL | 87 | * DLL |
88 | */ | 88 | */ |
89 | struct RecordEntry *prev; | 89 | struct RecordEntry *prev; |
90 | 90 | ||
91 | }; | 91 | }; |
92 | 92 | ||
93 | struct RequestHandle | 93 | struct RequestHandle |
@@ -106,12 +106,12 @@ struct RequestHandle | |||
106 | * JSON response object | 106 | * JSON response object |
107 | */ | 107 | */ |
108 | struct JsonApiObject *resp_object; | 108 | struct JsonApiObject *resp_object; |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * Rest connection | 111 | * Rest connection |
112 | */ | 112 | */ |
113 | struct RestConnectionDataHandle *conndata_handle; | 113 | struct RestConnectionDataHandle *conndata_handle; |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * Handle to GNS service. | 116 | * Handle to GNS service. |
117 | */ | 117 | */ |
@@ -121,12 +121,12 @@ struct RequestHandle | |||
121 | * Handle to NAMESTORE | 121 | * Handle to NAMESTORE |
122 | */ | 122 | */ |
123 | struct GNUNET_NAMESTORE_Handle *ns_handle; | 123 | struct GNUNET_NAMESTORE_Handle *ns_handle; |
124 | 124 | ||
125 | /** | 125 | /** |
126 | * Handle to NAMESTORE it | 126 | * Handle to NAMESTORE it |
127 | */ | 127 | */ |
128 | struct GNUNET_NAMESTORE_ZoneIterator *list_it; | 128 | struct GNUNET_NAMESTORE_ZoneIterator *list_it; |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Private key for the zone | 131 | * Private key for the zone |
132 | */ | 132 | */ |
@@ -205,7 +205,7 @@ struct RequestHandle | |||
205 | /** | 205 | /** |
206 | * ID of a task associated with the resolution process. | 206 | * ID of a task associated with the resolution process. |
207 | */ | 207 | */ |
208 | struct GNUNET_SCHEDULER_Task * timeout_task; | 208 | struct GNUNET_SCHEDULER_Task * timeout_task; |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * The plugin result processor | 211 | * The plugin result processor |
@@ -353,25 +353,25 @@ gnsrecord_to_json (const struct GNUNET_GNSRECORD_Data *rd) | |||
353 | * Task run on shutdown. Cleans up everything. | 353 | * Task run on shutdown. Cleans up everything. |
354 | * | 354 | * |
355 | * @param cls unused | 355 | * @param cls unused |
356 | * @param tc scheduler context | ||
357 | */ | 356 | */ |
358 | static void | 357 | static void |
359 | do_error (void *cls, | 358 | do_error (void *cls) |
360 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
361 | { | 359 | { |
362 | struct RequestHandle *handle = cls; | 360 | struct RequestHandle *handle = cls; |
363 | struct MHD_Response *resp = GNUNET_REST_create_json_response (NULL); | 361 | struct MHD_Response *resp = GNUNET_REST_create_json_response (NULL); |
362 | |||
364 | handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST); | 363 | handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST); |
365 | cleanup_handle (handle); | 364 | cleanup_handle (handle); |
366 | } | 365 | } |
367 | 366 | ||
367 | |||
368 | static void | 368 | static void |
369 | cleanup_handle_delayed (void *cls, | 369 | cleanup_handle_delayed (void *cls) |
370 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
371 | { | 370 | { |
372 | cleanup_handle (cls); | 371 | cleanup_handle (cls); |
373 | } | 372 | } |
374 | 373 | ||
374 | |||
375 | /** | 375 | /** |
376 | * Create a response with requested records | 376 | * Create a response with requested records |
377 | * | 377 | * |
@@ -688,7 +688,7 @@ json_to_gnsrecord (const json_t *records_json, | |||
688 | { | 688 | { |
689 | (*rd)[i].expiration_time = etime_abs.abs_value_us; | 689 | (*rd)[i].expiration_time = etime_abs.abs_value_us; |
690 | } | 690 | } |
691 | else | 691 | else |
692 | { | 692 | { |
693 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Value `%s' invalid for record type `%s'\n"), | 693 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Value `%s' invalid for record type `%s'\n"), |
694 | value, typestring); | 694 | value, typestring); |
@@ -760,7 +760,7 @@ namestore_create_cont (struct RestConnectionDataHandle *con, | |||
760 | { | 760 | { |
761 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 761 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
762 | "Name property is no string\n"); | 762 | "Name property is no string\n"); |
763 | GNUNET_REST_jsonapi_object_delete (json_obj); | 763 | GNUNET_REST_jsonapi_object_delete (json_obj); |
764 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 764 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
765 | return; | 765 | return; |
766 | } | 766 | } |
@@ -844,7 +844,7 @@ namestore_zkey_cont (struct RestConnectionDataHandle *con, | |||
844 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_NAMESTORE_ZKEY, | 844 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_NAMESTORE_ZKEY, |
845 | strlen (GNUNET_REST_JSONAPI_NAMESTORE_ZKEY), | 845 | strlen (GNUNET_REST_JSONAPI_NAMESTORE_ZKEY), |
846 | &key); | 846 | &key); |
847 | if ( GNUNET_NO == | 847 | if ( GNUNET_NO == |
848 | GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, | 848 | GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, |
849 | &key) ) | 849 | &key) ) |
850 | { | 850 | { |
@@ -1058,7 +1058,7 @@ testservice_id_task (void *cls, int result) | |||
1058 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_NAMESTORE_EGO, | 1058 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_NAMESTORE_EGO, |
1059 | strlen (GNUNET_REST_JSONAPI_NAMESTORE_EGO), | 1059 | strlen (GNUNET_REST_JSONAPI_NAMESTORE_EGO), |
1060 | &key); | 1060 | &key); |
1061 | if ( GNUNET_YES == | 1061 | if ( GNUNET_YES == |
1062 | GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, | 1062 | GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, |
1063 | &key) ) | 1063 | &key) ) |
1064 | { | 1064 | { |
@@ -1070,7 +1070,7 @@ testservice_id_task (void *cls, int result) | |||
1070 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_NAMESTORE_RECORD_TYPE, | 1070 | GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_NAMESTORE_RECORD_TYPE, |
1071 | strlen (GNUNET_REST_JSONAPI_NAMESTORE_RECORD_TYPE), | 1071 | strlen (GNUNET_REST_JSONAPI_NAMESTORE_RECORD_TYPE), |
1072 | &key); | 1072 | &key); |
1073 | if ( GNUNET_YES == | 1073 | if ( GNUNET_YES == |
1074 | GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, | 1074 | GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, |
1075 | &key) ) | 1075 | &key) ) |
1076 | { | 1076 | { |
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 804b6fc42..d6d3945b7 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -79,7 +79,7 @@ cleanup () | |||
79 | * @param tc scheduler context | 79 | * @param tc scheduler context |
80 | */ | 80 | */ |
81 | static void | 81 | static void |
82 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 82 | endbadly (void *cls) |
83 | { | 83 | { |
84 | if (NULL != nsqe) | 84 | if (NULL != nsqe) |
85 | { | 85 | { |
@@ -92,17 +92,19 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
92 | 92 | ||
93 | 93 | ||
94 | static void | 94 | static void |
95 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 95 | end (void *cls) |
96 | { | 96 | { |
97 | cleanup (); | 97 | cleanup (); |
98 | res = 0; | 98 | res = 0; |
99 | } | 99 | } |
100 | 100 | ||
101 | void lookup_it (void *cls, | 101 | |
102 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 102 | static void |
103 | const char *label, | 103 | lookup_it (void *cls, |
104 | unsigned int rd_count, | 104 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
105 | const struct GNUNET_GNSRECORD_Data *rd) | 105 | const char *label, |
106 | unsigned int rd_count, | ||
107 | const struct GNUNET_GNSRECORD_Data *rd) | ||
106 | { | 108 | { |
107 | nsqe = NULL; | 109 | nsqe = NULL; |
108 | int c; | 110 | int c; |
diff --git a/src/namestore/test_namestore_api_lookup_private.c b/src/namestore/test_namestore_api_lookup_private.c index 6d99f738a..92b2cad6f 100644 --- a/src/namestore/test_namestore_api_lookup_private.c +++ b/src/namestore/test_namestore_api_lookup_private.c | |||
@@ -74,7 +74,7 @@ cleanup () | |||
74 | * @param tc scheduler context | 74 | * @param tc scheduler context |
75 | */ | 75 | */ |
76 | static void | 76 | static void |
77 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 77 | endbadly (void *cls) |
78 | { | 78 | { |
79 | if (NULL != nsqe) | 79 | if (NULL != nsqe) |
80 | { | 80 | { |
@@ -87,17 +87,19 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
87 | 87 | ||
88 | 88 | ||
89 | static void | 89 | static void |
90 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 90 | end (void *cls) |
91 | { | 91 | { |
92 | cleanup (); | 92 | cleanup (); |
93 | res = 0; | 93 | res = 0; |
94 | } | 94 | } |
95 | 95 | ||
96 | void lookup_it (void *cls, | 96 | |
97 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 97 | static void |
98 | const char *label, | 98 | lookup_it (void *cls, |
99 | unsigned int rd_count, | 99 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
100 | const struct GNUNET_GNSRECORD_Data *rd) | 100 | const char *label, |
101 | unsigned int rd_count, | ||
102 | const struct GNUNET_GNSRECORD_Data *rd) | ||
101 | { | 103 | { |
102 | nsqe = NULL; | 104 | nsqe = NULL; |
103 | 105 | ||
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index ef63b94f1..09d6b302d 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -79,10 +79,9 @@ cleanup () | |||
79 | * Re-establish the connection to the service. | 79 | * Re-establish the connection to the service. |
80 | * | 80 | * |
81 | * @param cls handle to use to re-connect. | 81 | * @param cls handle to use to re-connect. |
82 | * @param tc scheduler context | ||
83 | */ | 82 | */ |
84 | static void | 83 | static void |
85 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 84 | endbadly (void *cls) |
86 | { | 85 | { |
87 | if (NULL != nsqe) | 86 | if (NULL != nsqe) |
88 | { | 87 | { |
@@ -100,7 +99,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
100 | 99 | ||
101 | 100 | ||
102 | static void | 101 | static void |
103 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 102 | end (void *cls) |
104 | { | 103 | { |
105 | cleanup (); | 104 | cleanup (); |
106 | res = 0; | 105 | res = 0; |
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c index b7f89c0ff..7f9a90704 100644 --- a/src/namestore/test_namestore_api_lookup_shadow.c +++ b/src/namestore/test_namestore_api_lookup_shadow.c | |||
@@ -81,10 +81,9 @@ cleanup () | |||
81 | * Re-establish the connection to the service. | 81 | * Re-establish the connection to the service. |
82 | * | 82 | * |
83 | * @param cls handle to use to re-connect. | 83 | * @param cls handle to use to re-connect. |
84 | * @param tc scheduler context | ||
85 | */ | 84 | */ |
86 | static void | 85 | static void |
87 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 86 | endbadly (void *cls) |
88 | { | 87 | { |
89 | if (NULL != nsqe) | 88 | if (NULL != nsqe) |
90 | { | 89 | { |
@@ -102,7 +101,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | 101 | ||
103 | 102 | ||
104 | static void | 103 | static void |
105 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 104 | end (void *cls) |
106 | { | 105 | { |
107 | cleanup (); | 106 | cleanup (); |
108 | res = 0; | 107 | res = 0; |
diff --git a/src/namestore/test_namestore_api_lookup_shadow_filter.c b/src/namestore/test_namestore_api_lookup_shadow_filter.c index fd3d573f6..a22baa17b 100644 --- a/src/namestore/test_namestore_api_lookup_shadow_filter.c +++ b/src/namestore/test_namestore_api_lookup_shadow_filter.c | |||
@@ -94,10 +94,9 @@ cleanup () | |||
94 | * Re-establish the connection to the service. | 94 | * Re-establish the connection to the service. |
95 | * | 95 | * |
96 | * @param cls handle to use to re-connect. | 96 | * @param cls handle to use to re-connect. |
97 | * @param tc scheduler context | ||
98 | */ | 97 | */ |
99 | static void | 98 | static void |
100 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 99 | endbadly (void *cls) |
101 | { | 100 | { |
102 | if (NULL != delayed_lookup_task) | 101 | if (NULL != delayed_lookup_task) |
103 | { | 102 | { |
@@ -120,7 +119,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
120 | 119 | ||
121 | 120 | ||
122 | static void | 121 | static void |
123 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 122 | end (void *cls) |
124 | { | 123 | { |
125 | cleanup (); | 124 | cleanup (); |
126 | res = 0; | 125 | res = 0; |
@@ -244,8 +243,9 @@ name_lookup_active_proc (void *cls, | |||
244 | &pubkey, TEST_NAME, &rd_decrypt_cb, expected_rd)); | 243 | &pubkey, TEST_NAME, &rd_decrypt_cb, expected_rd)); |
245 | } | 244 | } |
246 | 245 | ||
246 | |||
247 | static void | 247 | static void |
248 | name_lookup_shadow (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 248 | name_lookup_shadow (void *cls) |
249 | { | 249 | { |
250 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 250 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
251 | "Performing lookup for shadow record \n"); | 251 | "Performing lookup for shadow record \n"); |
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index 85d1659b4..2ea271d50 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -126,10 +126,9 @@ do_shutdown () | |||
126 | * Re-establish the connection to the service. | 126 | * Re-establish the connection to the service. |
127 | * | 127 | * |
128 | * @param cls handle to use to re-connect. | 128 | * @param cls handle to use to re-connect. |
129 | * @param tc scheduler context | ||
130 | */ | 129 | */ |
131 | static void | 130 | static void |
132 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 131 | endbadly (void *cls) |
133 | { | 132 | { |
134 | do_shutdown (); | 133 | do_shutdown (); |
135 | res = 1; | 134 | res = 1; |
@@ -137,7 +136,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
137 | 136 | ||
138 | 137 | ||
139 | static void | 138 | static void |
140 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 139 | end (void *cls) |
141 | { | 140 | { |
142 | do_shutdown (); | 141 | do_shutdown (); |
143 | res = 0; | 142 | res = 0; |
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c index cdf7fd80e..eae10e2ae 100644 --- a/src/namestore/test_namestore_api_monitoring_existing.c +++ b/src/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -127,10 +127,9 @@ do_shutdown () | |||
127 | * Re-establish the connection to the service. | 127 | * Re-establish the connection to the service. |
128 | * | 128 | * |
129 | * @param cls handle to use to re-connect. | 129 | * @param cls handle to use to re-connect. |
130 | * @param tc scheduler context | ||
131 | */ | 130 | */ |
132 | static void | 131 | static void |
133 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 132 | endbadly (void *cls) |
134 | { | 133 | { |
135 | do_shutdown (); | 134 | do_shutdown (); |
136 | res = 1; | 135 | res = 1; |
@@ -138,7 +137,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
138 | 137 | ||
139 | 138 | ||
140 | static void | 139 | static void |
141 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 140 | end (void *cls) |
142 | { | 141 | { |
143 | do_shutdown (); | 142 | do_shutdown (); |
144 | res = 0; | 143 | res = 0; |
@@ -152,8 +151,9 @@ zone_proc (void *cls, | |||
152 | unsigned int rd_count, | 151 | unsigned int rd_count, |
153 | const struct GNUNET_GNSRECORD_Data *rd) | 152 | const struct GNUNET_GNSRECORD_Data *rd) |
154 | { | 153 | { |
155 | static int returned_records; | 154 | static int returned_records; |
156 | static int fail = GNUNET_NO; | 155 | static int fail = GNUNET_NO; |
156 | |||
157 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 157 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
158 | "Comparing results name %s\n", | 158 | "Comparing results name %s\n", |
159 | name); | 159 | name); |
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 35911e08f..c6c439e86 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -71,10 +71,9 @@ cleanup () | |||
71 | * Re-establish the connection to the service. | 71 | * Re-establish the connection to the service. |
72 | * | 72 | * |
73 | * @param cls handle to use to re-connect. | 73 | * @param cls handle to use to re-connect. |
74 | * @param tc scheduler context | ||
75 | */ | 74 | */ |
76 | static void | 75 | static void |
77 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 76 | endbadly (void *cls) |
78 | { | 77 | { |
79 | if (NULL != nsqe) | 78 | if (NULL != nsqe) |
80 | { | 79 | { |
@@ -87,7 +86,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
87 | 86 | ||
88 | 87 | ||
89 | static void | 88 | static void |
90 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 89 | end (void *cls) |
91 | { | 90 | { |
92 | cleanup (); | 91 | cleanup (); |
93 | res = 0; | 92 | res = 0; |
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index ed7f7088e..ef199cdf6 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -69,10 +69,9 @@ cleanup () | |||
69 | * Re-establish the connection to the service. | 69 | * Re-establish the connection to the service. |
70 | * | 70 | * |
71 | * @param cls handle to use to re-connect. | 71 | * @param cls handle to use to re-connect. |
72 | * @param tc scheduler context | ||
73 | */ | 72 | */ |
74 | static void | 73 | static void |
75 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 74 | endbadly (void *cls) |
76 | { | 75 | { |
77 | if (NULL != nsqe) | 76 | if (NULL != nsqe) |
78 | { | 77 | { |
@@ -85,8 +84,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
85 | 84 | ||
86 | 85 | ||
87 | static void | 86 | static void |
88 | end (void *cls, | 87 | end (void *cls) |
89 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
90 | { | 88 | { |
91 | cleanup (); | 89 | cleanup (); |
92 | res = 0; | 90 | res = 0; |
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index 7345e68da..d80676770 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.c | |||
@@ -69,10 +69,9 @@ cleanup () | |||
69 | * Re-establish the connection to the service. | 69 | * Re-establish the connection to the service. |
70 | * | 70 | * |
71 | * @param cls handle to use to re-connect. | 71 | * @param cls handle to use to re-connect. |
72 | * @param tc scheduler context | ||
73 | */ | 72 | */ |
74 | static void | 73 | static void |
75 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 74 | endbadly (void *cls) |
76 | { | 75 | { |
77 | if (NULL != nsqe) | 76 | if (NULL != nsqe) |
78 | { | 77 | { |
@@ -85,7 +84,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
85 | 84 | ||
86 | 85 | ||
87 | static void | 86 | static void |
88 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 87 | end (void *cls) |
89 | { | 88 | { |
90 | cleanup (); | 89 | cleanup (); |
91 | res = 0; | 90 | res = 0; |
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 22508b1d3..ed5a399bd 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -91,11 +91,9 @@ cleanup () | |||
91 | * Re-establish the connection to the service. | 91 | * Re-establish the connection to the service. |
92 | * | 92 | * |
93 | * @param cls handle to use to re-connect. | 93 | * @param cls handle to use to re-connect. |
94 | * @param tc scheduler context | ||
95 | */ | 94 | */ |
96 | static void | 95 | static void |
97 | endbadly (void *cls, | 96 | endbadly (void *cls) |
98 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
99 | { | 97 | { |
100 | if (NULL != nsqe) | 98 | if (NULL != nsqe) |
101 | { | 99 | { |
@@ -113,8 +111,7 @@ endbadly (void *cls, | |||
113 | 111 | ||
114 | 112 | ||
115 | static void | 113 | static void |
116 | end (void *cls, | 114 | end (void *cls) |
117 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
118 | { | 115 | { |
119 | cleanup (); | 116 | cleanup (); |
120 | res = 0; | 117 | res = 0; |
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index 9f60fa43d..070c06870 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -66,7 +66,7 @@ static char *directory; | |||
66 | * @param tc scheduler context | 66 | * @param tc scheduler context |
67 | */ | 67 | */ |
68 | static void | 68 | static void |
69 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 69 | endbadly (void *cls) |
70 | { | 70 | { |
71 | if (NULL != zi) | 71 | if (NULL != zi) |
72 | { | 72 | { |
@@ -110,7 +110,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
110 | 110 | ||
111 | 111 | ||
112 | static void | 112 | static void |
113 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 113 | end (void *cls) |
114 | { | 114 | { |
115 | if (NULL != zi) | 115 | if (NULL != zi) |
116 | { | 116 | { |
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 98d3b882c..362533ef9 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -69,7 +69,7 @@ static char *directory; | |||
69 | * @param tc scheduler context | 69 | * @param tc scheduler context |
70 | */ | 70 | */ |
71 | static void | 71 | static void |
72 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 72 | endbadly (void *cls) |
73 | { | 73 | { |
74 | if (NULL != zi) | 74 | if (NULL != zi) |
75 | { | 75 | { |
@@ -113,7 +113,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
113 | 113 | ||
114 | 114 | ||
115 | static void | 115 | static void |
116 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 116 | end (void *cls) |
117 | { | 117 | { |
118 | if (NULL != zi) | 118 | if (NULL != zi) |
119 | { | 119 | { |
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index dc2129b88..1a0279f50 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -66,14 +66,13 @@ static char *directory; | |||
66 | * @param tc scheduler context | 66 | * @param tc scheduler context |
67 | */ | 67 | */ |
68 | static void | 68 | static void |
69 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 69 | endbadly (void *cls) |
70 | { | 70 | { |
71 | if (NULL != zi) | 71 | if (NULL != zi) |
72 | { | 72 | { |
73 | GNUNET_NAMESTORE_zone_iteration_stop (zi); | 73 | GNUNET_NAMESTORE_zone_iteration_stop (zi); |
74 | zi = NULL; | 74 | zi = NULL; |
75 | } | 75 | } |
76 | |||
77 | if (nsh != NULL) | 76 | if (nsh != NULL) |
78 | GNUNET_NAMESTORE_disconnect (nsh); | 77 | GNUNET_NAMESTORE_disconnect (nsh); |
79 | nsh = NULL; | 78 | nsh = NULL; |
@@ -110,13 +109,13 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
110 | 109 | ||
111 | 110 | ||
112 | static void | 111 | static void |
113 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | end (void *cls) |
114 | { | 113 | { |
115 | if (NULL != zi) | 114 | if (NULL != zi) |
116 | { | 115 | { |
117 | GNUNET_NAMESTORE_zone_iteration_stop (zi); | 116 | GNUNET_NAMESTORE_zone_iteration_stop (zi); |
118 | zi = NULL; | 117 | zi = NULL; |
119 | } | 118 | } |
120 | 119 | ||
121 | if (endbadly_task != NULL) | 120 | if (endbadly_task != NULL) |
122 | { | 121 | { |
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index 8700c6698..52645b5eb 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -63,16 +63,15 @@ static char *directory; | |||
63 | * Re-establish the connection to the service. | 63 | * Re-establish the connection to the service. |
64 | * | 64 | * |
65 | * @param cls handle to use to re-connect. | 65 | * @param cls handle to use to re-connect. |
66 | * @param tc scheduler context | ||
67 | */ | 66 | */ |
68 | static void | 67 | static void |
69 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | endbadly (void *cls) |
70 | { | 69 | { |
71 | if (NULL != zi) | 70 | if (NULL != zi) |
72 | { | 71 | { |
73 | GNUNET_NAMESTORE_zone_iteration_stop (zi); | 72 | GNUNET_NAMESTORE_zone_iteration_stop (zi); |
74 | zi = NULL; | 73 | zi = NULL; |
75 | } | 74 | } |
76 | 75 | ||
77 | if (nsh != NULL) | 76 | if (nsh != NULL) |
78 | GNUNET_NAMESTORE_disconnect (nsh); | 77 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -110,13 +109,13 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
110 | 109 | ||
111 | 110 | ||
112 | static void | 111 | static void |
113 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | end (void *cls) |
114 | { | 113 | { |
115 | if (NULL != zi) | 114 | if (NULL != zi) |
116 | { | 115 | { |
117 | GNUNET_NAMESTORE_zone_iteration_stop (zi); | 116 | GNUNET_NAMESTORE_zone_iteration_stop (zi); |
118 | zi = NULL; | 117 | zi = NULL; |
119 | } | 118 | } |
120 | 119 | ||
121 | if (endbadly_task != NULL) | 120 | if (endbadly_task != NULL) |
122 | { | 121 | { |
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 348b9178b..12bc870b4 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -63,10 +63,9 @@ static char *directory; | |||
63 | * Re-establish the connection to the service. | 63 | * Re-establish the connection to the service. |
64 | * | 64 | * |
65 | * @param cls handle to use to re-connect. | 65 | * @param cls handle to use to re-connect. |
66 | * @param tc scheduler context | ||
67 | */ | 66 | */ |
68 | static void | 67 | static void |
69 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | endbadly (void *cls) |
70 | { | 69 | { |
71 | if (nsh != NULL) | 70 | if (nsh != NULL) |
72 | GNUNET_NAMESTORE_disconnect (nsh); | 71 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -79,7 +78,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
79 | 78 | ||
80 | 79 | ||
81 | static void | 80 | static void |
82 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 81 | end (void *cls) |
83 | { | 82 | { |
84 | if (endbadly_task != NULL) | 83 | if (endbadly_task != NULL) |
85 | { | 84 | { |
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index 31a8f294b..0069303ca 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c | |||
@@ -92,13 +92,14 @@ struct TcpContext | |||
92 | * (or once we failed to connect...). | 92 | * (or once we failed to connect...). |
93 | * | 93 | * |
94 | * @param cls the 'struct TcpContext' | 94 | * @param cls the 'struct TcpContext' |
95 | * @param tc scheduler context | ||
96 | */ | 95 | */ |
97 | static void | 96 | static void |
98 | tcp_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 97 | tcp_send (void *cls) |
99 | { | 98 | { |
100 | struct TcpContext *ctx = cls; | 99 | struct TcpContext *ctx = cls; |
100 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
101 | 101 | ||
102 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
102 | if ((NULL != tc->write_ready) && | 103 | if ((NULL != tc->write_ready) && |
103 | (GNUNET_NETWORK_fdset_isset (tc->write_ready, ctx->s))) | 104 | (GNUNET_NETWORK_fdset_isset (tc->write_ready, ctx->s))) |
104 | { | 105 | { |
@@ -228,10 +229,9 @@ test (void *cls, struct GNUNET_SERVER_Client *client, | |||
228 | * Task run during shutdown. | 229 | * Task run during shutdown. |
229 | * | 230 | * |
230 | * @param cls unused | 231 | * @param cls unused |
231 | * @param tc scheduler context | ||
232 | */ | 232 | */ |
233 | static void | 233 | static void |
234 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 234 | shutdown_task (void *cls) |
235 | { | 235 | { |
236 | GNUNET_SERVER_destroy (server); | 236 | GNUNET_SERVER_destroy (server); |
237 | server = NULL; | 237 | server = NULL; |
diff --git a/src/nat/nat.c b/src/nat/nat.c index 57961ffaf..1c60e4e0d 100644 --- a/src/nat/nat.c +++ b/src/nat/nat.c | |||
@@ -463,11 +463,9 @@ start_gnunet_nat_server (struct GNUNET_NAT_Handle *h); | |||
463 | * Call task to process STUN | 463 | * Call task to process STUN |
464 | * | 464 | * |
465 | * @param cls handle to NAT | 465 | * @param cls handle to NAT |
466 | * @param tc TaskContext | ||
467 | */ | 466 | */ |
468 | static void | 467 | static void |
469 | process_stun (void *cls, | 468 | process_stun (void *cls); |
470 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
471 | 469 | ||
472 | 470 | ||
473 | /** | 471 | /** |
@@ -662,10 +660,9 @@ add_ip_to_address_list (struct GNUNET_NAT_Handle *h, | |||
662 | * get DynDNS-IP addresses. | 660 | * get DynDNS-IP addresses. |
663 | * | 661 | * |
664 | * @param cls the NAT handle | 662 | * @param cls the NAT handle |
665 | * @param tc scheduler context | ||
666 | */ | 663 | */ |
667 | static void | 664 | static void |
668 | resolve_dns (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 665 | resolve_dns (void *cls); |
669 | 666 | ||
670 | 667 | ||
671 | /** | 668 | /** |
@@ -716,11 +713,9 @@ process_external_ip (void *cls, | |||
716 | * Task to do a lookup on our hostname for IP addresses. | 713 | * Task to do a lookup on our hostname for IP addresses. |
717 | * | 714 | * |
718 | * @param cls the NAT handle | 715 | * @param cls the NAT handle |
719 | * @param tc scheduler context | ||
720 | */ | 716 | */ |
721 | static void | 717 | static void |
722 | resolve_hostname (void *cls, | 718 | resolve_hostname (void *cls); |
723 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
724 | 719 | ||
725 | 720 | ||
726 | /** | 721 | /** |
@@ -938,14 +933,15 @@ process_interfaces (void *cls, | |||
938 | * after a certain delay. | 933 | * after a certain delay. |
939 | * | 934 | * |
940 | * @param cls the `struct GNUNET_NAT_Handle` | 935 | * @param cls the `struct GNUNET_NAT_Handle` |
941 | * @param tc scheduler context | ||
942 | */ | 936 | */ |
943 | static void | 937 | static void |
944 | restart_nat_server (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 938 | restart_nat_server (void *cls) |
945 | { | 939 | { |
946 | struct GNUNET_NAT_Handle *h = cls; | 940 | struct GNUNET_NAT_Handle *h = cls; |
941 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
947 | 942 | ||
948 | h->server_read_task = NULL; | 943 | h->server_read_task = NULL; |
944 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
949 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 945 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
950 | return; | 946 | return; |
951 | start_gnunet_nat_server (h); | 947 | start_gnunet_nat_server (h); |
@@ -958,11 +954,9 @@ restart_nat_server (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
958 | * function to be called again once more is available. | 954 | * function to be called again once more is available. |
959 | * | 955 | * |
960 | * @param cls the NAT handle | 956 | * @param cls the NAT handle |
961 | * @param tc the scheduling context | ||
962 | */ | 957 | */ |
963 | static void | 958 | static void |
964 | nat_server_read (void *cls, | 959 | nat_server_read (void *cls) |
965 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
966 | { | 960 | { |
967 | struct GNUNET_NAT_Handle *h = cls; | 961 | struct GNUNET_NAT_Handle *h = cls; |
968 | char mybuf[40]; | 962 | char mybuf[40]; |
@@ -971,8 +965,10 @@ nat_server_read (void *cls, | |||
971 | int port; | 965 | int port; |
972 | const char *port_start; | 966 | const char *port_start; |
973 | struct sockaddr_in sin_addr; | 967 | struct sockaddr_in sin_addr; |
968 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
974 | 969 | ||
975 | h->server_read_task = NULL; | 970 | h->server_read_task = NULL; |
971 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
976 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 972 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
977 | return; | 973 | return; |
978 | memset (mybuf, 0, sizeof (mybuf)); | 974 | memset (mybuf, 0, sizeof (mybuf)); |
@@ -1099,11 +1095,9 @@ start_gnunet_nat_server (struct GNUNET_NAT_Handle *h) | |||
1099 | * Task to scan the local network interfaces for IP addresses. | 1095 | * Task to scan the local network interfaces for IP addresses. |
1100 | * | 1096 | * |
1101 | * @param cls the NAT handle | 1097 | * @param cls the NAT handle |
1102 | * @param tc scheduler context | ||
1103 | */ | 1098 | */ |
1104 | static void | 1099 | static void |
1105 | list_interfaces (void *cls, | 1100 | list_interfaces (void *cls) |
1106 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1107 | { | 1101 | { |
1108 | struct GNUNET_NAT_Handle *h = cls; | 1102 | struct GNUNET_NAT_Handle *h = cls; |
1109 | 1103 | ||
@@ -1209,11 +1203,9 @@ GNUNET_NAT_is_valid_stun_packet (void *cls, | |||
1209 | * Task to do a STUN request | 1203 | * Task to do a STUN request |
1210 | * | 1204 | * |
1211 | * @param cls the NAT handle | 1205 | * @param cls the NAT handle |
1212 | * @param tc scheduler context | ||
1213 | */ | 1206 | */ |
1214 | static void | 1207 | static void |
1215 | process_stun (void *cls, | 1208 | process_stun (void *cls) |
1216 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1217 | { | 1209 | { |
1218 | struct GNUNET_NAT_Handle *h = cls; | 1210 | struct GNUNET_NAT_Handle *h = cls; |
1219 | struct StunServerList* elem = h->actual_stun_server; | 1211 | struct StunServerList* elem = h->actual_stun_server; |
@@ -1264,11 +1256,9 @@ process_stun (void *cls, | |||
1264 | * Task to do a lookup on our hostname for IP addresses. | 1256 | * Task to do a lookup on our hostname for IP addresses. |
1265 | * | 1257 | * |
1266 | * @param cls the NAT handle | 1258 | * @param cls the NAT handle |
1267 | * @param tc scheduler context | ||
1268 | */ | 1259 | */ |
1269 | static void | 1260 | static void |
1270 | resolve_hostname (void *cls, | 1261 | resolve_hostname (void *cls) |
1271 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1272 | { | 1262 | { |
1273 | struct GNUNET_NAT_Handle *h = cls; | 1263 | struct GNUNET_NAT_Handle *h = cls; |
1274 | 1264 | ||
@@ -1285,11 +1275,9 @@ resolve_hostname (void *cls, | |||
1285 | * get DynDNS-IP addresses. | 1275 | * get DynDNS-IP addresses. |
1286 | * | 1276 | * |
1287 | * @param cls the NAT handle | 1277 | * @param cls the NAT handle |
1288 | * @param tc scheduler context | ||
1289 | */ | 1278 | */ |
1290 | static void | 1279 | static void |
1291 | resolve_dns (void *cls, | 1280 | resolve_dns (void *cls) |
1292 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1293 | { | 1281 | { |
1294 | struct GNUNET_NAT_Handle *h = cls; | 1282 | struct GNUNET_NAT_Handle *h = cls; |
1295 | struct LocalAddressList *pos; | 1283 | struct LocalAddressList *pos; |
diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c index 9fab8bf67..82e067f73 100644 --- a/src/nat/nat_auto.c +++ b/src/nat/nat_auto.c | |||
@@ -258,18 +258,17 @@ stop_stun () | |||
258 | * incoming connection. | 258 | * incoming connection. |
259 | * | 259 | * |
260 | * @param cls | 260 | * @param cls |
261 | * @param tc scheduler context | ||
262 | */ | 261 | */ |
263 | static void | 262 | static void |
264 | do_udp_read (void *cls, | 263 | do_udp_read (void *cls) |
265 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
266 | { | 264 | { |
267 | struct GNUNET_NAT_AutoHandle *ah = cls; | 265 | struct GNUNET_NAT_AutoHandle *ah = cls; |
268 | unsigned char reply_buf[1024]; | 266 | unsigned char reply_buf[1024]; |
269 | ssize_t rlen; | 267 | ssize_t rlen; |
270 | struct sockaddr_in answer; | 268 | struct sockaddr_in answer; |
269 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
271 | 270 | ||
272 | 271 | tc = GNUNET_SCHEDULER_get_task_context (); | |
273 | if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && | 272 | if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && |
274 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, | 273 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, |
275 | lsock4))) | 274 | lsock4))) |
@@ -402,11 +401,9 @@ result_callback (void *cls, | |||
402 | * Main function for the connection reversal test. | 401 | * Main function for the connection reversal test. |
403 | * | 402 | * |
404 | * @param cls the `struct GNUNET_NAT_AutoHandle` | 403 | * @param cls the `struct GNUNET_NAT_AutoHandle` |
405 | * @param tc scheduler context | ||
406 | */ | 404 | */ |
407 | static void | 405 | static void |
408 | reversal_test (void *cls, | 406 | reversal_test (void *cls) |
409 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
410 | { | 407 | { |
411 | struct GNUNET_NAT_AutoHandle *ah = cls; | 408 | struct GNUNET_NAT_AutoHandle *ah = cls; |
412 | 409 | ||
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c index aa29ff07b..d310b3e14 100644 --- a/src/nat/nat_mini.c +++ b/src/nat/nat_mini.c | |||
@@ -110,17 +110,17 @@ struct GNUNET_NAT_ExternalHandle | |||
110 | * address and call our callback. | 110 | * address and call our callback. |
111 | * | 111 | * |
112 | * @param cls the `struct GNUNET_NAT_ExternalHandle` | 112 | * @param cls the `struct GNUNET_NAT_ExternalHandle` |
113 | * @param tc scheduler context | ||
114 | */ | 113 | */ |
115 | static void | 114 | static void |
116 | read_external_ipv4 (void *cls, | 115 | read_external_ipv4 (void *cls) |
117 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
118 | { | 116 | { |
119 | struct GNUNET_NAT_ExternalHandle *eh = cls; | 117 | struct GNUNET_NAT_ExternalHandle *eh = cls; |
120 | ssize_t ret; | 118 | ssize_t ret; |
121 | struct in_addr addr; | 119 | struct in_addr addr; |
120 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
122 | 121 | ||
123 | eh->task = NULL; | 122 | eh->task = NULL; |
123 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
124 | if (GNUNET_YES == GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, eh->r)) | 124 | if (GNUNET_YES == GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, eh->r)) |
125 | ret = | 125 | ret = |
126 | GNUNET_DISK_file_read (eh->r, &eh->buf[eh->off], | 126 | GNUNET_DISK_file_read (eh->r, &eh->buf[eh->off], |
@@ -162,11 +162,9 @@ read_external_ipv4 (void *cls, | |||
162 | * (Asynchronously) signal error invoking "external-ip" to client. | 162 | * (Asynchronously) signal error invoking "external-ip" to client. |
163 | * | 163 | * |
164 | * @param cls the `struct GNUNET_NAT_ExternalHandle` (freed) | 164 | * @param cls the `struct GNUNET_NAT_ExternalHandle` (freed) |
165 | * @param tc scheduler context | ||
166 | */ | 165 | */ |
167 | static void | 166 | static void |
168 | signal_external_ip_error (void *cls, | 167 | signal_external_ip_error (void *cls) |
169 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
170 | { | 168 | { |
171 | struct GNUNET_NAT_ExternalHandle *eh = cls; | 169 | struct GNUNET_NAT_ExternalHandle *eh = cls; |
172 | 170 | ||
@@ -329,10 +327,9 @@ struct GNUNET_NAT_MiniHandle | |||
329 | * Run "upnpc -l" to find out if our mapping changed. | 327 | * Run "upnpc -l" to find out if our mapping changed. |
330 | * | 328 | * |
331 | * @param cls the `struct GNUNET_NAT_MiniHandle` | 329 | * @param cls the `struct GNUNET_NAT_MiniHandle` |
332 | * @param tc scheduler context | ||
333 | */ | 330 | */ |
334 | static void | 331 | static void |
335 | do_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 332 | do_refresh (void *cls); |
336 | 333 | ||
337 | 334 | ||
338 | /** | 335 | /** |
@@ -478,10 +475,9 @@ process_refresh_output (void *cls, const char *line) | |||
478 | * Run "upnpc -l" to find out if our mapping changed. | 475 | * Run "upnpc -l" to find out if our mapping changed. |
479 | * | 476 | * |
480 | * @param cls the 'struct GNUNET_NAT_MiniHandle' | 477 | * @param cls the 'struct GNUNET_NAT_MiniHandle' |
481 | * @param tc scheduler context | ||
482 | */ | 478 | */ |
483 | static void | 479 | static void |
484 | do_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 480 | do_refresh (void *cls) |
485 | { | 481 | { |
486 | struct GNUNET_NAT_MiniHandle *mini = cls; | 482 | struct GNUNET_NAT_MiniHandle *mini = cls; |
487 | int ac; | 483 | int ac; |
diff --git a/src/nat/nat_test.c b/src/nat/nat_test.c index 32cf6c42c..33f81d800 100644 --- a/src/nat/nat_test.c +++ b/src/nat/nat_test.c | |||
@@ -205,15 +205,15 @@ reversal_cb (void *cls, | |||
205 | * incoming connection. | 205 | * incoming connection. |
206 | * | 206 | * |
207 | * @param cls the `struct GNUNET_NAT_Test` | 207 | * @param cls the `struct GNUNET_NAT_Test` |
208 | * @param tc scheduler context | ||
209 | */ | 208 | */ |
210 | static void | 209 | static void |
211 | do_udp_read (void *cls, | 210 | do_udp_read (void *cls) |
212 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
213 | { | 211 | { |
214 | struct GNUNET_NAT_Test *tst = cls; | 212 | struct GNUNET_NAT_Test *tst = cls; |
215 | uint16_t data; | 213 | uint16_t data; |
214 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
216 | 215 | ||
216 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
217 | tst->ltask = | 217 | tst->ltask = |
218 | GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, | 218 | GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, |
219 | tst->lsock, | 219 | tst->lsock, |
@@ -240,16 +240,16 @@ do_udp_read (void *cls, | |||
240 | * incoming connection. | 240 | * incoming connection. |
241 | * | 241 | * |
242 | * @param cls the `struct NatActivity` | 242 | * @param cls the `struct NatActivity` |
243 | * @param tc scheduler context | ||
244 | */ | 243 | */ |
245 | static void | 244 | static void |
246 | do_read (void *cls, | 245 | do_read (void *cls) |
247 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
248 | { | 246 | { |
249 | struct NatActivity *na = cls; | 247 | struct NatActivity *na = cls; |
250 | struct GNUNET_NAT_Test *tst; | 248 | struct GNUNET_NAT_Test *tst; |
251 | uint16_t data; | 249 | uint16_t data; |
250 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
252 | 251 | ||
252 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
253 | na->rtask = NULL; | 253 | na->rtask = NULL; |
254 | tst = na->h; | 254 | tst = na->h; |
255 | GNUNET_CONTAINER_DLL_remove (tst->na_head, tst->na_tail, na); | 255 | GNUNET_CONTAINER_DLL_remove (tst->na_head, tst->na_tail, na); |
@@ -277,17 +277,17 @@ do_read (void *cls, | |||
277 | * incoming connection. | 277 | * incoming connection. |
278 | * | 278 | * |
279 | * @param cls the `struct GNUNET_NAT_Test` | 279 | * @param cls the `struct GNUNET_NAT_Test` |
280 | * @param tc scheduler context | ||
281 | */ | 280 | */ |
282 | static void | 281 | static void |
283 | do_accept (void *cls, | 282 | do_accept (void *cls) |
284 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
285 | { | 283 | { |
286 | struct GNUNET_NAT_Test *tst = cls; | 284 | struct GNUNET_NAT_Test *tst = cls; |
287 | struct GNUNET_NETWORK_Handle *s; | 285 | struct GNUNET_NETWORK_Handle *s; |
288 | struct NatActivity *wl; | 286 | struct NatActivity *wl; |
287 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
289 | 288 | ||
290 | tst->ltask = NULL; | 289 | tst->ltask = NULL; |
290 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
291 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 291 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
292 | return; | 292 | return; |
293 | tst->ltask = | 293 | tst->ltask = |
@@ -378,11 +378,9 @@ addr_cb (void *cls, | |||
378 | * Destroys the nat handle after the callback has been processed. | 378 | * Destroys the nat handle after the callback has been processed. |
379 | * | 379 | * |
380 | * @param cls handle to the timed out NAT test | 380 | * @param cls handle to the timed out NAT test |
381 | * @param tc not used | ||
382 | */ | 381 | */ |
383 | static void | 382 | static void |
384 | do_timeout (void *cls, | 383 | do_timeout (void *cls) |
385 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
386 | { | 384 | { |
387 | struct GNUNET_NAT_Test *nh = cls; | 385 | struct GNUNET_NAT_Test *nh = cls; |
388 | 386 | ||
@@ -440,8 +438,8 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
440 | nh->status = GNUNET_NAT_ERROR_SUCCESS; | 438 | nh->status = GNUNET_NAT_ERROR_SUCCESS; |
441 | if (0 == bnd_port) | 439 | if (0 == bnd_port) |
442 | { | 440 | { |
443 | nh->nat | 441 | nh->nat |
444 | = GNUNET_NAT_register (cfg, is_tcp, 0, 0, | 442 | = GNUNET_NAT_register (cfg, is_tcp, 0, 0, |
445 | NULL, NULL, | 443 | NULL, NULL, |
446 | &addr_cb, | 444 | &addr_cb, |
447 | &reversal_cb, nh, NULL); | 445 | &reversal_cb, nh, NULL); |
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c index de8ff8c13..a840f3ef9 100644 --- a/src/nat/test_nat.c +++ b/src/nat/test_nat.c | |||
@@ -65,7 +65,7 @@ addr_callback (void *cls, int add_remove, const struct sockaddr *addr, | |||
65 | * Function that terminates the test. | 65 | * Function that terminates the test. |
66 | */ | 66 | */ |
67 | static void | 67 | static void |
68 | stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | stop (void *cls) |
69 | { | 69 | { |
70 | struct GNUNET_NAT_Handle *nat = cls; | 70 | struct GNUNET_NAT_Handle *nat = cls; |
71 | 71 | ||
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c index 1819d5e91..f5b63f698 100644 --- a/src/nat/test_nat_mini.c +++ b/src/nat/test_nat_mini.c | |||
@@ -67,7 +67,7 @@ addr_callback (void *cls, int add_remove, | |||
67 | * Function that terminates the test. | 67 | * Function that terminates the test. |
68 | */ | 68 | */ |
69 | static void | 69 | static void |
70 | stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 70 | stop (void *cls) |
71 | { | 71 | { |
72 | struct GNUNET_NAT_MiniHandle *mini = cls; | 72 | struct GNUNET_NAT_MiniHandle *mini = cls; |
73 | 73 | ||
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index c0cce6e45..402671bd2 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c | |||
@@ -59,8 +59,7 @@ report_result (void *cls, | |||
59 | 59 | ||
60 | 60 | ||
61 | static void | 61 | static void |
62 | failed_timeout (void *cls, | 62 | failed_timeout (void *cls) |
63 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
64 | { | 63 | { |
65 | tsk = NULL; | 64 | tsk = NULL; |
66 | fprintf (stderr, | 65 | fprintf (stderr, |
@@ -86,7 +85,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
86 | 2), | 85 | 2), |
87 | &failed_timeout, | 86 | &failed_timeout, |
88 | NULL); | 87 | NULL); |
89 | 88 | ||
90 | } | 89 | } |
91 | 90 | ||
92 | 91 | ||
@@ -127,7 +126,7 @@ main (int argc, char *const argv[]) | |||
127 | "12345", NULL); | 126 | "12345", NULL); |
128 | GNUNET_assert (NULL != gns); | 127 | GNUNET_assert (NULL != gns); |
129 | GNUNET_PROGRAM_run (3, argv_prog, | 128 | GNUNET_PROGRAM_run (3, argv_prog, |
130 | "test-nat-test", "nohelp", | 129 | "test-nat-test", "nohelp", |
131 | options, &run, | 130 | options, &run, |
132 | NULL); | 131 | NULL); |
133 | GNUNET_break (0 == GNUNET_OS_process_kill (gns, GNUNET_TERM_SIG)); | 132 | GNUNET_break (0 == GNUNET_OS_process_kill (gns, GNUNET_TERM_SIG)); |
diff --git a/src/nat/test_stun.c b/src/nat/test_stun.c index a856fa971..7fbba1cd6 100644 --- a/src/nat/test_stun.c +++ b/src/nat/test_stun.c | |||
@@ -112,18 +112,18 @@ stop () | |||
112 | * incoming connection. | 112 | * incoming connection. |
113 | * | 113 | * |
114 | * @param cls | 114 | * @param cls |
115 | * @param tc scheduler context | ||
116 | */ | 115 | */ |
117 | static void | 116 | static void |
118 | do_udp_read (void *cls, | 117 | do_udp_read (void *cls) |
119 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
120 | { | 118 | { |
121 | //struct GNUNET_NAT_Test *tst = cls; | 119 | //struct GNUNET_NAT_Test *tst = cls; |
122 | unsigned char reply_buf[1024]; | 120 | unsigned char reply_buf[1024]; |
123 | ssize_t rlen; | 121 | ssize_t rlen; |
124 | struct sockaddr_in answer; | 122 | struct sockaddr_in answer; |
123 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
125 | 124 | ||
126 | ltask4 = NULL; | 125 | ltask4 = NULL; |
126 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
127 | if ( (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) || | 127 | if ( (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) || |
128 | (! GNUNET_NETWORK_fdset_isset (tc->read_ready, | 128 | (! GNUNET_NETWORK_fdset_isset (tc->read_ready, |
129 | lsock4)) ) | 129 | lsock4)) ) |
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c index 91ca97fbd..5b893ae47 100644 --- a/src/nse/gnunet-nse-profiler.c +++ b/src/nse/gnunet-nse-profiler.c | |||
@@ -265,10 +265,9 @@ close_monitor_connections () | |||
265 | * Task run on shutdown; cleans up everything. | 265 | * Task run on shutdown; cleans up everything. |
266 | * | 266 | * |
267 | * @param cls unused | 267 | * @param cls unused |
268 | * @param tc unused | ||
269 | */ | 268 | */ |
270 | static void | 269 | static void |
271 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 270 | shutdown_task (void *cls) |
272 | { | 271 | { |
273 | shutdown_task_id = NULL; | 272 | shutdown_task_id = NULL; |
274 | if (GNUNET_YES == shutting_down) | 273 | if (GNUNET_YES == shutting_down) |
@@ -542,11 +541,9 @@ connect_nse_service () | |||
542 | * Task that starts/stops peers to move to the next round. | 541 | * Task that starts/stops peers to move to the next round. |
543 | * | 542 | * |
544 | * @param cls NULL, unused | 543 | * @param cls NULL, unused |
545 | * @param tc scheduler context (unused) | ||
546 | */ | 544 | */ |
547 | static void | 545 | static void |
548 | next_round (void *cls, | 546 | next_round (void *cls); |
549 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
550 | 547 | ||
551 | 548 | ||
552 | /** | 549 | /** |
@@ -555,12 +552,13 @@ next_round (void *cls, | |||
555 | * the next round. | 552 | * the next round. |
556 | * | 553 | * |
557 | * @param cls unused, NULL | 554 | * @param cls unused, NULL |
558 | * @param tc unused | ||
559 | */ | 555 | */ |
560 | static void | 556 | static void |
561 | finish_round (void *cls, | 557 | finish_round (void *cls) |
562 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
563 | { | 558 | { |
559 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
560 | |||
561 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
564 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 562 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
565 | return; | 563 | return; |
566 | LOG (GNUNET_ERROR_TYPE_INFO, "Have %u connections\n", total_connections); | 564 | LOG (GNUNET_ERROR_TYPE_INFO, "Have %u connections\n", total_connections); |
@@ -670,12 +668,13 @@ adjust_running_peers () | |||
670 | * peers; then get statistics from *all* peers. | 668 | * peers; then get statistics from *all* peers. |
671 | * | 669 | * |
672 | * @param cls NULL, unused | 670 | * @param cls NULL, unused |
673 | * @param tc unused | ||
674 | */ | 671 | */ |
675 | static void | 672 | static void |
676 | next_round (void *cls, | 673 | next_round (void *cls) |
677 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
678 | { | 674 | { |
675 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
676 | |||
677 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
679 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 678 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
680 | return; | 679 | return; |
681 | LOG_DEBUG ("Disconnecting nse service of peers\n"); | 680 | LOG_DEBUG ("Disconnecting nse service of peers\n"); |
diff --git a/src/nse/gnunet-nse.c b/src/nse/gnunet-nse.c index 29f0003cb..97c3da29b 100644 --- a/src/nse/gnunet-nse.c +++ b/src/nse/gnunet-nse.c | |||
@@ -21,7 +21,7 @@ | |||
21 | /** | 21 | /** |
22 | * @file nse/gnunet-nse.c | 22 | * @file nse/gnunet-nse.c |
23 | * @brief Program to display network size estimates from the NSE service | 23 | * @brief Program to display network size estimates from the NSE service |
24 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> | 24 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
@@ -57,10 +57,9 @@ static int status; | |||
57 | * Task to shutdown and clean up all state | 57 | * Task to shutdown and clean up all state |
58 | * | 58 | * |
59 | * @param cls NULL | 59 | * @param cls NULL |
60 | * @param tc the scheduler task context | ||
61 | */ | 60 | */ |
62 | static void | 61 | static void |
63 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 62 | do_shutdown (void *cls) |
64 | { | 63 | { |
65 | shutdown_task = NULL; | 64 | shutdown_task = NULL; |
66 | if (NULL != test) | 65 | if (NULL != test) |
@@ -160,7 +159,7 @@ main (int argc, char *const *argv) | |||
160 | static struct GNUNET_GETOPT_CommandLineOption options[] = { | 159 | static struct GNUNET_GETOPT_CommandLineOption options[] = { |
161 | GNUNET_GETOPT_OPTION_END | 160 | GNUNET_GETOPT_OPTION_END |
162 | }; | 161 | }; |
163 | 162 | ||
164 | status = 1; | 163 | status = 1; |
165 | if (GNUNET_OK != | 164 | if (GNUNET_OK != |
166 | GNUNET_PROGRAM_run (argc, argv, "gnunet-nse", | 165 | GNUNET_PROGRAM_run (argc, argv, "gnunet-nse", |
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 12e4100d7..608274ae1 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -593,11 +593,9 @@ get_transmit_delay (int round_offset) | |||
593 | * Task that triggers a NSE P2P transmission. | 593 | * Task that triggers a NSE P2P transmission. |
594 | * | 594 | * |
595 | * @param cls the `struct NSEPeerEntry *` | 595 | * @param cls the `struct NSEPeerEntry *` |
596 | * @param tc scheduler context | ||
597 | */ | 596 | */ |
598 | static void | 597 | static void |
599 | transmit_task_cb (void *cls, | 598 | transmit_task_cb (void *cls); |
600 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
601 | 599 | ||
602 | 600 | ||
603 | /** | 601 | /** |
@@ -673,11 +671,9 @@ transmit_ready (void *cls, | |||
673 | * Task that triggers a NSE P2P transmission. | 671 | * Task that triggers a NSE P2P transmission. |
674 | * | 672 | * |
675 | * @param cls the `struct NSEPeerEntry *` | 673 | * @param cls the `struct NSEPeerEntry *` |
676 | * @param tc scheduler context | ||
677 | */ | 674 | */ |
678 | static void | 675 | static void |
679 | transmit_task_cb (void *cls, | 676 | transmit_task_cb (void *cls) |
680 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
681 | { | 677 | { |
682 | struct NSEPeerEntry *peer_entry = cls; | 678 | struct NSEPeerEntry *peer_entry = cls; |
683 | 679 | ||
@@ -797,16 +793,16 @@ schedule_current_round (void *cls, | |||
797 | * Update our flood message to be sent (and our timestamps). | 793 | * Update our flood message to be sent (and our timestamps). |
798 | * | 794 | * |
799 | * @param cls unused | 795 | * @param cls unused |
800 | * @param tc context for this message | ||
801 | */ | 796 | */ |
802 | static void | 797 | static void |
803 | update_flood_message (void *cls, | 798 | update_flood_message (void *cls) |
804 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
805 | { | 799 | { |
806 | struct GNUNET_TIME_Relative offset; | 800 | struct GNUNET_TIME_Relative offset; |
807 | unsigned int i; | 801 | unsigned int i; |
802 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
808 | 803 | ||
809 | flood_task = NULL; | 804 | flood_task = NULL; |
805 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
810 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 806 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
811 | return; | 807 | return; |
812 | offset = GNUNET_TIME_absolute_get_remaining (next_timestamp); | 808 | offset = GNUNET_TIME_absolute_get_remaining (next_timestamp); |
@@ -918,11 +914,9 @@ write_proof () | |||
918 | * Find our proof of work. | 914 | * Find our proof of work. |
919 | * | 915 | * |
920 | * @param cls closure (unused) | 916 | * @param cls closure (unused) |
921 | * @param tc task context | ||
922 | */ | 917 | */ |
923 | static void | 918 | static void |
924 | find_proof (void *cls, | 919 | find_proof (void *cls) |
925 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
926 | { | 920 | { |
927 | #define ROUND_SIZE 10 | 921 | #define ROUND_SIZE 10 |
928 | uint64_t counter; | 922 | uint64_t counter; |
@@ -1343,11 +1337,9 @@ flush_comp_cb (void *cls, | |||
1343 | * Task run during shutdown. | 1337 | * Task run during shutdown. |
1344 | * | 1338 | * |
1345 | * @param cls unused | 1339 | * @param cls unused |
1346 | * @param tc unused | ||
1347 | */ | 1340 | */ |
1348 | static void | 1341 | static void |
1349 | shutdown_task (void *cls, | 1342 | shutdown_task (void *cls) |
1350 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1351 | { | 1343 | { |
1352 | if (NULL != flood_task) | 1344 | if (NULL != flood_task) |
1353 | { | 1345 | { |
diff --git a/src/nse/nse_api.c b/src/nse/nse_api.c index 2c1260047..a42dcb369 100644 --- a/src/nse/nse_api.c +++ b/src/nse/nse_api.c | |||
@@ -81,10 +81,9 @@ struct GNUNET_NSE_Handle | |||
81 | * Try again to connect to network size estimation service. | 81 | * Try again to connect to network size estimation service. |
82 | * | 82 | * |
83 | * @param cls the handle to the transport service | 83 | * @param cls the handle to the transport service |
84 | * @param tc scheduler context | ||
85 | */ | 84 | */ |
86 | static void | 85 | static void |
87 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 86 | reconnect (void *cls); |
88 | 87 | ||
89 | 88 | ||
90 | /** | 89 | /** |
@@ -198,11 +197,9 @@ send_start (void *cls, size_t size, void *buf) | |||
198 | * Try again to connect to network size estimation service. | 197 | * Try again to connect to network size estimation service. |
199 | * | 198 | * |
200 | * @param cls the `struct GNUNET_NSE_Handle *` | 199 | * @param cls the `struct GNUNET_NSE_Handle *` |
201 | * @param tc scheduler context | ||
202 | */ | 200 | */ |
203 | static void | 201 | static void |
204 | reconnect (void *cls, | 202 | reconnect (void *cls) |
205 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
206 | { | 203 | { |
207 | struct GNUNET_NSE_Handle *h = cls; | 204 | struct GNUNET_NSE_Handle *h = cls; |
208 | 205 | ||
diff --git a/src/nse/test_nse_api.c b/src/nse/test_nse_api.c index 9f3c85c5c..22826b298 100644 --- a/src/nse/test_nse_api.c +++ b/src/nse/test_nse_api.c | |||
@@ -36,10 +36,9 @@ static struct GNUNET_SCHEDULER_Task * die_task; | |||
36 | * Signature of the main function of a task. | 36 | * Signature of the main function of a task. |
37 | * | 37 | * |
38 | * @param cls closure | 38 | * @param cls closure |
39 | * @param tc context information (why was this task triggered now) | ||
40 | */ | 39 | */ |
41 | static void | 40 | static void |
42 | end_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 41 | end_test (void *cls) |
43 | { | 42 | { |
44 | if (h != NULL) | 43 | if (h != NULL) |
45 | { | 44 | { |
diff --git a/src/nse/test_nse_multipeer.c b/src/nse/test_nse_multipeer.c index 549cbdf12..5e6c31e6c 100644 --- a/src/nse/test_nse_multipeer.c +++ b/src/nse/test_nse_multipeer.c | |||
@@ -72,7 +72,7 @@ static int ok; | |||
72 | * Task run on timeout to shut everything down. | 72 | * Task run on timeout to shut everything down. |
73 | */ | 73 | */ |
74 | static void | 74 | static void |
75 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 75 | shutdown_task (void *cls) |
76 | { | 76 | { |
77 | unsigned int i; | 77 | unsigned int i; |
78 | 78 | ||
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index f2f1ad92a..8cfb67a73 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c | |||
@@ -223,11 +223,9 @@ static struct GNUNET_HELLO_Message *my_hello; | |||
223 | * runs the next requested function. | 223 | * runs the next requested function. |
224 | * | 224 | * |
225 | * @param cls unused | 225 | * @param cls unused |
226 | * @param tc unused | ||
227 | */ | 226 | */ |
228 | static void | 227 | static void |
229 | state_machine (void *cls, | 228 | state_machine (void *cls); |
230 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
231 | 229 | ||
232 | 230 | ||
233 | /* ********************* 'get_info' ******************* */ | 231 | /* ********************* 'get_info' ******************* */ |
@@ -620,11 +618,9 @@ parse_hello_uri (const char *put_uri) | |||
620 | * runs the next requested function. | 618 | * runs the next requested function. |
621 | * | 619 | * |
622 | * @param cls unused | 620 | * @param cls unused |
623 | * @param tc scheduler context | ||
624 | */ | 621 | */ |
625 | static void | 622 | static void |
626 | shutdown_task (void *cls, | 623 | shutdown_task (void *cls) |
627 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
628 | { | 624 | { |
629 | struct PrintContext *pc; | 625 | struct PrintContext *pc; |
630 | struct AddressRecord *ar; | 626 | struct AddressRecord *ar; |
@@ -809,11 +805,9 @@ run (void *cls, | |||
809 | * runs the next requested function. | 805 | * runs the next requested function. |
810 | * | 806 | * |
811 | * @param cls unused | 807 | * @param cls unused |
812 | * @param tc scheduler context | ||
813 | */ | 808 | */ |
814 | static void | 809 | static void |
815 | state_machine (void *cls, | 810 | state_machine (void *cls) |
816 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
817 | { | 811 | { |
818 | tt = NULL; | 812 | tt = NULL; |
819 | 813 | ||
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index 456a3546b..a0defb8cc 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -651,15 +651,15 @@ hosts_directory_scan_callback (void *cls, | |||
651 | * Call this method periodically to scan data/hosts for new hosts. | 651 | * Call this method periodically to scan data/hosts for new hosts. |
652 | * | 652 | * |
653 | * @param cls unused | 653 | * @param cls unused |
654 | * @param tc scheduler context, aborted if reason is shutdown | ||
655 | */ | 654 | */ |
656 | static void | 655 | static void |
657 | cron_scan_directory_data_hosts (void *cls, | 656 | cron_scan_directory_data_hosts (void *cls) |
658 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
659 | { | 657 | { |
660 | static unsigned int retries; | 658 | static unsigned int retries; |
661 | struct DirScanContext dsc; | 659 | struct DirScanContext dsc; |
660 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
662 | 661 | ||
662 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
663 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 663 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
664 | return; | 664 | return; |
665 | if (GNUNET_SYSERR == GNUNET_DISK_directory_create (networkIdDirectory)) | 665 | if (GNUNET_SYSERR == GNUNET_DISK_directory_create (networkIdDirectory)) |
@@ -1041,14 +1041,14 @@ discard_hosts_helper (void *cls, | |||
1041 | * HELLOs to expire. | 1041 | * HELLOs to expire. |
1042 | * | 1042 | * |
1043 | * @param cls unused | 1043 | * @param cls unused |
1044 | * @param tc scheduler context, aborted if reason is shutdown | ||
1045 | */ | 1044 | */ |
1046 | static void | 1045 | static void |
1047 | cron_clean_data_hosts (void *cls, | 1046 | cron_clean_data_hosts (void *cls) |
1048 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1049 | { | 1047 | { |
1050 | struct GNUNET_TIME_Absolute now; | 1048 | struct GNUNET_TIME_Absolute now; |
1049 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1051 | 1050 | ||
1051 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1052 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1052 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1053 | return; | 1053 | return; |
1054 | now = GNUNET_TIME_absolute_get (); | 1054 | now = GNUNET_TIME_absolute_get (); |
@@ -1277,11 +1277,9 @@ free_host_entry (void *cls, | |||
1277 | * Clean up our state. Called during shutdown. | 1277 | * Clean up our state. Called during shutdown. |
1278 | * | 1278 | * |
1279 | * @param cls unused | 1279 | * @param cls unused |
1280 | * @param tc scheduler task context, unused | ||
1281 | */ | 1280 | */ |
1282 | static void | 1281 | static void |
1283 | shutdown_task (void *cls, | 1282 | shutdown_task (void *cls) |
1284 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1285 | { | 1283 | { |
1286 | struct NotificationContext *cur; | 1284 | struct NotificationContext *cur; |
1287 | struct NotificationContext *next; | 1285 | struct NotificationContext *next; |
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index c8b85e94c..ad4576fc2 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c | |||
@@ -279,11 +279,9 @@ reconnect (struct GNUNET_PEERINFO_Handle *h); | |||
279 | * Task scheduled to re-try connecting to the peerinfo service. | 279 | * Task scheduled to re-try connecting to the peerinfo service. |
280 | * | 280 | * |
281 | * @param cls the `struct GNUNET_PEERINFO_Handle *` | 281 | * @param cls the `struct GNUNET_PEERINFO_Handle *` |
282 | * @param tc scheduler context | ||
283 | */ | 282 | */ |
284 | static void | 283 | static void |
285 | reconnect_task (void *cls, | 284 | reconnect_task (void *cls) |
286 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
287 | { | 285 | { |
288 | struct GNUNET_PEERINFO_Handle *h = cls; | 286 | struct GNUNET_PEERINFO_Handle *h = cls; |
289 | 287 | ||
@@ -698,11 +696,9 @@ iterator_start_receive (void *cls, | |||
698 | * Peerinfo iteration request has timed out. | 696 | * Peerinfo iteration request has timed out. |
699 | * | 697 | * |
700 | * @param cls the `struct GNUNET_PEERINFO_IteratorContext *` | 698 | * @param cls the `struct GNUNET_PEERINFO_IteratorContext *` |
701 | * @param tc scheduler context | ||
702 | */ | 699 | */ |
703 | static void | 700 | static void |
704 | signal_timeout (void *cls, | 701 | signal_timeout (void *cls) |
705 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
706 | { | 702 | { |
707 | struct GNUNET_PEERINFO_IteratorContext *ic = cls; | 703 | struct GNUNET_PEERINFO_IteratorContext *ic = cls; |
708 | GNUNET_PEERINFO_Processor cb; | 704 | GNUNET_PEERINFO_Processor cb; |
diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c index 1b0974631..16331548d 100644 --- a/src/peerinfo/peerinfo_api_notify.c +++ b/src/peerinfo/peerinfo_api_notify.c | |||
@@ -99,11 +99,10 @@ receive_notifications (struct GNUNET_PEERINFO_NotifyContext *nc); | |||
99 | /** | 99 | /** |
100 | * Task to re-try connecting to peerinfo. | 100 | * Task to re-try connecting to peerinfo. |
101 | * | 101 | * |
102 | * @param cls the 'struct GNUNET_PEERINFO_NotifyContext' | 102 | * @param cls the `struct GNUNET_PEERINFO_NotifyContext *` |
103 | * @param tc scheduler context | ||
104 | */ | 103 | */ |
105 | static void | 104 | static void |
106 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 105 | reconnect (void *cls) |
107 | { | 106 | { |
108 | struct GNUNET_PEERINFO_NotifyContext *nc = cls; | 107 | struct GNUNET_PEERINFO_NotifyContext *nc = cls; |
109 | 108 | ||
@@ -138,7 +137,7 @@ process_notification (void *cls, const struct GNUNET_MessageHeader *msg) | |||
138 | if (msg == NULL) | 137 | if (msg == NULL) |
139 | { | 138 | { |
140 | GNUNET_CLIENT_disconnect (nc->client); | 139 | GNUNET_CLIENT_disconnect (nc->client); |
141 | reconnect (nc, NULL); | 140 | reconnect (nc); |
142 | return; | 141 | return; |
143 | } | 142 | } |
144 | ms = ntohs (msg->size); | 143 | ms = ntohs (msg->size); |
diff --git a/src/peerinfo/test_peerinfo_api_notify_friend_only.c b/src/peerinfo/test_peerinfo_api_notify_friend_only.c index b3d5e4b6e..d0322713c 100644 --- a/src/peerinfo/test_peerinfo_api_notify_friend_only.c +++ b/src/peerinfo/test_peerinfo_api_notify_friend_only.c | |||
@@ -58,10 +58,10 @@ static int res_cb_wo_fo; | |||
58 | 58 | ||
59 | struct GNUNET_PeerIdentity pid; | 59 | struct GNUNET_PeerIdentity pid; |
60 | 60 | ||
61 | struct GNUNET_SCHEDULER_Task * timeout_task; | 61 | struct GNUNET_SCHEDULER_Task *timeout_task; |
62 | 62 | ||
63 | static void | 63 | static void |
64 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 64 | end_badly (void *cls) |
65 | { | 65 | { |
66 | timeout_task = NULL; | 66 | timeout_task = NULL; |
67 | GNUNET_break(0); | 67 | GNUNET_break(0); |
@@ -83,8 +83,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
83 | global_ret = 255; | 83 | global_ret = 255; |
84 | } | 84 | } |
85 | 85 | ||
86 | |||
86 | static void | 87 | static void |
87 | done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 88 | done (void *cls) |
88 | { | 89 | { |
89 | if (NULL != pnc_w_fo) | 90 | if (NULL != pnc_w_fo) |
90 | GNUNET_PEERINFO_notify_cancel (pnc_w_fo); | 91 | GNUNET_PEERINFO_notify_cancel (pnc_w_fo); |
diff --git a/src/peerstore/gnunet-peerstore.c b/src/peerstore/gnunet-peerstore.c index e274a1751..68ae1746f 100644 --- a/src/peerstore/gnunet-peerstore.c +++ b/src/peerstore/gnunet-peerstore.c | |||
@@ -32,16 +32,16 @@ static int ret; | |||
32 | /* | 32 | /* |
33 | * Handle to PEERSTORE service | 33 | * Handle to PEERSTORE service |
34 | */ | 34 | */ |
35 | struct GNUNET_PEERSTORE_Handle *peerstore_handle; | 35 | static struct GNUNET_PEERSTORE_Handle *peerstore_handle; |
36 | |||
36 | 37 | ||
37 | /** | 38 | /** |
38 | * Run on shutdown | 39 | * Run on shutdown |
39 | * | 40 | * |
40 | * @param cls unused | 41 | * @param cls unused |
41 | * @param tc scheduler context | ||
42 | */ | 42 | */ |
43 | static void | 43 | static void |
44 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 44 | shutdown_task (void *cls) |
45 | { | 45 | { |
46 | if (NULL != peerstore_handle) | 46 | if (NULL != peerstore_handle) |
47 | { | 47 | { |
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c index f680c5d14..3a2d928e3 100644 --- a/src/peerstore/gnunet-service-peerstore.c +++ b/src/peerstore/gnunet-service-peerstore.c | |||
@@ -125,10 +125,9 @@ do_shutdown () | |||
125 | * Task run during shutdown. | 125 | * Task run during shutdown. |
126 | * | 126 | * |
127 | * @param cls unused | 127 | * @param cls unused |
128 | * @param tc unused | ||
129 | */ | 128 | */ |
130 | static void | 129 | static void |
131 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 130 | shutdown_task (void *cls) |
132 | { | 131 | { |
133 | in_shutdown = GNUNET_YES; | 132 | in_shutdown = GNUNET_YES; |
134 | if (NULL == client_head) /* Only when no connected clients. */ | 133 | if (NULL == client_head) /* Only when no connected clients. */ |
@@ -145,11 +144,12 @@ expire_records_continuation (void *cls, int success); | |||
145 | * Deletes any expired records from storage | 144 | * Deletes any expired records from storage |
146 | */ | 145 | */ |
147 | static void | 146 | static void |
148 | cleanup_expired_records (void *cls, | 147 | cleanup_expired_records (void *cls) |
149 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
150 | { | 148 | { |
151 | int ret; | 149 | int ret; |
150 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
152 | 151 | ||
152 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
153 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 153 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
154 | return; | 154 | return; |
155 | GNUNET_assert (NULL != db); | 155 | GNUNET_assert (NULL != db); |
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c index a792f37ff..14117a333 100644 --- a/src/peerstore/peerstore_api.c +++ b/src/peerstore/peerstore_api.c | |||
@@ -358,10 +358,9 @@ rewatch_it (void *cls, const struct GNUNET_HashCode *key, void *value) | |||
358 | * Called when the iterate request is timedout | 358 | * Called when the iterate request is timedout |
359 | * | 359 | * |
360 | * @param cls a `struct GNUNET_PEERSTORE_IterateContext *` | 360 | * @param cls a `struct GNUNET_PEERSTORE_IterateContext *` |
361 | * @param tc Scheduler task context (unused) | ||
362 | */ | 361 | */ |
363 | static void | 362 | static void |
364 | iterate_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 363 | iterate_timeout (void *cls) |
365 | { | 364 | { |
366 | struct GNUNET_PEERSTORE_IterateContext *ic = cls; | 365 | struct GNUNET_PEERSTORE_IterateContext *ic = cls; |
367 | GNUNET_PEERSTORE_Processor callback; | 366 | GNUNET_PEERSTORE_Processor callback; |
diff --git a/src/peerstore/test_peerstore_api_sync.c b/src/peerstore/test_peerstore_api_sync.c index ad113a778..765ae9113 100644 --- a/src/peerstore/test_peerstore_api_sync.c +++ b/src/peerstore/test_peerstore_api_sync.c | |||
@@ -80,7 +80,7 @@ static const char *val = "test_peerstore_api_store_val"; | |||
80 | * @return #GNUNET_YES (all good, continue) | 80 | * @return #GNUNET_YES (all good, continue) |
81 | */ | 81 | */ |
82 | static int | 82 | static int |
83 | iterate_cb (void *cls, | 83 | iterate_cb (void *cls, |
84 | const struct GNUNET_PEERSTORE_Record *record, | 84 | const struct GNUNET_PEERSTORE_Record *record, |
85 | const char *emsg) | 85 | const char *emsg) |
86 | { | 86 | { |
@@ -89,7 +89,7 @@ iterate_cb (void *cls, | |||
89 | GNUNET_break (NULL == emsg); | 89 | GNUNET_break (NULL == emsg); |
90 | if (NULL == record) | 90 | if (NULL == record) |
91 | { | 91 | { |
92 | GNUNET_PEERSTORE_disconnect (h, | 92 | GNUNET_PEERSTORE_disconnect (h, |
93 | GNUNET_NO); | 93 | GNUNET_NO); |
94 | GNUNET_SCHEDULER_shutdown (); | 94 | GNUNET_SCHEDULER_shutdown (); |
95 | return GNUNET_YES; | 95 | return GNUNET_YES; |
@@ -106,17 +106,15 @@ iterate_cb (void *cls, | |||
106 | * data that should have been stored. | 106 | * data that should have been stored. |
107 | * | 107 | * |
108 | * @param cls NULL | 108 | * @param cls NULL |
109 | * @param tc unused | ||
110 | */ | 109 | */ |
111 | static void | 110 | static void |
112 | test_cont (void *cls, | 111 | test_cont (void *cls) |
113 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
114 | { | 112 | { |
115 | h = GNUNET_PEERSTORE_connect (cfg); | 113 | h = GNUNET_PEERSTORE_connect (cfg); |
116 | GNUNET_PEERSTORE_iterate (h, | 114 | GNUNET_PEERSTORE_iterate (h, |
117 | subsystem, | 115 | subsystem, |
118 | &pid, key, | 116 | &pid, key, |
119 | GNUNET_TIME_UNIT_FOREVER_REL, | 117 | GNUNET_TIME_UNIT_FOREVER_REL, |
120 | &iterate_cb, NULL); | 118 | &iterate_cb, NULL); |
121 | } | 119 | } |
122 | 120 | ||
@@ -128,15 +126,15 @@ static void | |||
128 | test1 () | 126 | test1 () |
129 | { | 127 | { |
130 | h = GNUNET_PEERSTORE_connect (cfg); | 128 | h = GNUNET_PEERSTORE_connect (cfg); |
131 | GNUNET_PEERSTORE_store (h, | 129 | GNUNET_PEERSTORE_store (h, |
132 | subsystem, | 130 | subsystem, |
133 | &pid, | 131 | &pid, |
134 | key, | 132 | key, |
135 | val, strlen (val) + 1, | 133 | val, strlen (val) + 1, |
136 | GNUNET_TIME_UNIT_FOREVER_ABS, | 134 | GNUNET_TIME_UNIT_FOREVER_ABS, |
137 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, | 135 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, |
138 | NULL, NULL); | 136 | NULL, NULL); |
139 | GNUNET_PEERSTORE_disconnect (h, | 137 | GNUNET_PEERSTORE_disconnect (h, |
140 | GNUNET_YES); | 138 | GNUNET_YES); |
141 | h = NULL; | 139 | h = NULL; |
142 | /* We need to wait a little bit to give the disconnect | 140 | /* We need to wait a little bit to give the disconnect |
@@ -158,7 +156,7 @@ test1 () | |||
158 | * @param peer handle to our peer (unused) | 156 | * @param peer handle to our peer (unused) |
159 | */ | 157 | */ |
160 | static void | 158 | static void |
161 | run (void *cls, | 159 | run (void *cls, |
162 | const struct GNUNET_CONFIGURATION_Handle *c, | 160 | const struct GNUNET_CONFIGURATION_Handle *c, |
163 | struct GNUNET_TESTING_Peer *peer) | 161 | struct GNUNET_TESTING_Peer *peer) |
164 | { | 162 | { |
@@ -173,7 +171,7 @@ int | |||
173 | main (int argc, char *argv[]) | 171 | main (int argc, char *argv[]) |
174 | { | 172 | { |
175 | if (0 != | 173 | if (0 != |
176 | GNUNET_TESTING_service_run ("test-gnunet-peerstore-sync", | 174 | GNUNET_TESTING_service_run ("test-gnunet-peerstore-sync", |
177 | "peerstore", | 175 | "peerstore", |
178 | "test_peerstore_api_data.conf", | 176 | "test_peerstore_api_data.conf", |
179 | &run, NULL)) | 177 | &run, NULL)) |
diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c index b8ffc6403..49705103f 100644 --- a/src/pq/test_pq.c +++ b/src/pq/test_pq.c | |||
@@ -102,8 +102,9 @@ run_queries (PGconn *conn) | |||
102 | PGresult *result; | 102 | PGresult *result; |
103 | int ret; | 103 | int ret; |
104 | struct GNUNET_CRYPTO_RsaPrivateKey *priv; | 104 | struct GNUNET_CRYPTO_RsaPrivateKey *priv; |
105 | char msg[] = "Hello"; | 105 | const char msg[] = "hello"; |
106 | void *msg2; | 106 | void *msg2; |
107 | struct GNUNET_HashCode hmsg; | ||
107 | size_t msg2_len; | 108 | size_t msg2_len; |
108 | uint16_t u16; | 109 | uint16_t u16; |
109 | uint16_t u162; | 110 | uint16_t u162; |
@@ -114,9 +115,9 @@ run_queries (PGconn *conn) | |||
114 | 115 | ||
115 | priv = GNUNET_CRYPTO_rsa_private_key_create (1024); | 116 | priv = GNUNET_CRYPTO_rsa_private_key_create (1024); |
116 | pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv); | 117 | pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv); |
117 | sig = GNUNET_CRYPTO_rsa_sign (priv, | 118 | memset (&hmsg, 42, sizeof (hmsg)); |
118 | msg, | 119 | sig = GNUNET_CRYPTO_rsa_sign_fdh (priv, |
119 | sizeof (msg)); | 120 | &hmsg); |
120 | u16 = 16; | 121 | u16 = 16; |
121 | u32 = 32; | 122 | u32 = 32; |
122 | u64 = 64; | 123 | u64 = 64; |
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index 38ec10e4d..2b436aa21 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c | |||
@@ -428,10 +428,10 @@ message_queue_drop (struct Channel *chn); | |||
428 | 428 | ||
429 | 429 | ||
430 | static void | 430 | static void |
431 | schedule_transmit_message (void *cls, | 431 | schedule_transmit_message (void *cls) |
432 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
433 | { | 432 | { |
434 | struct Channel *chn = cls; | 433 | struct Channel *chn = cls; |
434 | |||
435 | transmit_message (chn); | 435 | transmit_message (chn); |
436 | } | 436 | } |
437 | 437 | ||
@@ -440,10 +440,9 @@ schedule_transmit_message (void *cls, | |||
440 | * Task run during shutdown. | 440 | * Task run during shutdown. |
441 | * | 441 | * |
442 | * @param cls unused | 442 | * @param cls unused |
443 | * @param tc unused | ||
444 | */ | 443 | */ |
445 | static void | 444 | static void |
446 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 445 | shutdown_task (void *cls) |
447 | { | 446 | { |
448 | if (NULL != nc) | 447 | if (NULL != nc) |
449 | { | 448 | { |
diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c index 4aae5e122..1169b49d5 100644 --- a/src/psyc/test_psyc.c +++ b/src/psyc/test_psyc.c | |||
@@ -158,10 +158,9 @@ cleanup () | |||
158 | * Terminate the test case (failure). | 158 | * Terminate the test case (failure). |
159 | * | 159 | * |
160 | * @param cls NULL | 160 | * @param cls NULL |
161 | * @param tc scheduler context | ||
162 | */ | 161 | */ |
163 | void | 162 | static void |
164 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 163 | end_badly (void *cls) |
165 | { | 164 | { |
166 | res = 1; | 165 | res = 1; |
167 | cleanup (); | 166 | cleanup (); |
@@ -173,10 +172,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
173 | * Terminate the test case (success). | 172 | * Terminate the test case (success). |
174 | * | 173 | * |
175 | * @param cls NULL | 174 | * @param cls NULL |
176 | * @param tc scheduler context | ||
177 | */ | 175 | */ |
178 | void | 176 | static void |
179 | end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 177 | end_normally (void *cls) |
180 | { | 178 | { |
181 | res = 0; | 179 | res = 0; |
182 | cleanup (); | 180 | cleanup (); |
@@ -545,8 +543,8 @@ master_history_replay_latest () | |||
545 | } | 543 | } |
546 | 544 | ||
547 | 545 | ||
548 | void | 546 | static void |
549 | transmit_resume (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 547 | transmit_resume (void *cls) |
550 | { | 548 | { |
551 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n"); | 549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n"); |
552 | struct TransmitClosure *tmit = cls; | 550 | struct TransmitClosure *tmit = cls; |
@@ -753,8 +751,8 @@ void first_slave_parted (void *cls) | |||
753 | } | 751 | } |
754 | 752 | ||
755 | 753 | ||
756 | void | 754 | static void |
757 | schedule_slave_part (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 755 | schedule_slave_part (void *cls) |
758 | { | 756 | { |
759 | GNUNET_PSYC_slave_part (slv, GNUNET_NO, first_slave_parted, NULL); | 757 | GNUNET_PSYC_slave_part (slv, GNUNET_NO, first_slave_parted, NULL); |
760 | } | 758 | } |
@@ -925,8 +923,9 @@ master_start () | |||
925 | mst_chn = GNUNET_PSYC_master_get_channel (mst); | 923 | mst_chn = GNUNET_PSYC_master_get_channel (mst); |
926 | } | 924 | } |
927 | 925 | ||
928 | void | 926 | |
929 | schedule_master_start (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 927 | static void |
928 | schedule_master_start (void *cls) | ||
930 | { | 929 | { |
931 | master_start (); | 930 | master_start (); |
932 | } | 931 | } |
diff --git a/src/psycstore/gnunet-service-psycstore.c b/src/psycstore/gnunet-service-psycstore.c index ae108fc4d..737cff422 100644 --- a/src/psycstore/gnunet-service-psycstore.c +++ b/src/psycstore/gnunet-service-psycstore.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /** |
2 | * This file is part of GNUnet | 2 | * This file is part of GNUnet |
3 | * Copyright (C) 2013 GNUnet e.V. | 3 | * Copyright (C) 2013 GNUnet e.V. |
4 | * | 4 | * |
@@ -68,10 +68,9 @@ static char *db_lib_name; | |||
68 | * Task run during shutdown. | 68 | * Task run during shutdown. |
69 | * | 69 | * |
70 | * @param cls unused | 70 | * @param cls unused |
71 | * @param tc unused | ||
72 | */ | 71 | */ |
73 | static void | 72 | static void |
74 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 73 | shutdown_task (void *cls) |
75 | { | 74 | { |
76 | if (NULL != nc) | 75 | if (NULL != nc) |
77 | { | 76 | { |
diff --git a/src/psycstore/psycstore_api.c b/src/psycstore/psycstore_api.c index b729d7440..b8f00a41c 100644 --- a/src/psycstore/psycstore_api.c +++ b/src/psycstore/psycstore_api.c | |||
@@ -186,10 +186,9 @@ find_op_by_id (struct GNUNET_PSYCSTORE_Handle *h, uint64_t op_id) | |||
186 | * Try again to connect to the PSYCstore service. | 186 | * Try again to connect to the PSYCstore service. |
187 | * | 187 | * |
188 | * @param cls handle to the PSYCstore service. | 188 | * @param cls handle to the PSYCstore service. |
189 | * @param tc scheduler context | ||
190 | */ | 189 | */ |
191 | static void | 190 | static void |
192 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 191 | reconnect (void *cls); |
193 | 192 | ||
194 | 193 | ||
195 | /** | 194 | /** |
@@ -531,10 +530,9 @@ transmit_next (struct GNUNET_PSYCSTORE_Handle *h) | |||
531 | * Try again to connect to the PSYCstore service. | 530 | * Try again to connect to the PSYCstore service. |
532 | * | 531 | * |
533 | * @param cls Handle to the PSYCstore service. | 532 | * @param cls Handle to the PSYCstore service. |
534 | * @param tc Scheduler context. | ||
535 | */ | 533 | */ |
536 | static void | 534 | static void |
537 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 535 | reconnect (void *cls) |
538 | { | 536 | { |
539 | struct GNUNET_PSYCSTORE_Handle *h = cls; | 537 | struct GNUNET_PSYCSTORE_Handle *h = cls; |
540 | 538 | ||
diff --git a/src/psycstore/test_psycstore.c b/src/psycstore/test_psycstore.c index b0ae3b924..266ee5c1d 100644 --- a/src/psycstore/test_psycstore.c +++ b/src/psycstore/test_psycstore.c | |||
@@ -113,10 +113,9 @@ cleanup () | |||
113 | * Terminate the testcase (failure). | 113 | * Terminate the testcase (failure). |
114 | * | 114 | * |
115 | * @param cls NULL | 115 | * @param cls NULL |
116 | * @param tc scheduler context | ||
117 | */ | 116 | */ |
118 | static void | 117 | static void |
119 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 118 | end_badly (void *cls) |
120 | { | 119 | { |
121 | res = 1; | 120 | res = 1; |
122 | cleanup (); | 121 | cleanup (); |
@@ -127,10 +126,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
127 | * Terminate the testcase (success). | 126 | * Terminate the testcase (success). |
128 | * | 127 | * |
129 | * @param cls NULL | 128 | * @param cls NULL |
130 | * @param tc scheduler context | ||
131 | */ | 129 | */ |
132 | static void | 130 | static void |
133 | end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 131 | end_normally (void *cls) |
134 | { | 132 | { |
135 | res = 0; | 133 | res = 0; |
136 | cleanup (); | 134 | cleanup (); |
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c index c377c3f90..a86cbd316 100644 --- a/src/pt/gnunet-daemon-pt.c +++ b/src/pt/gnunet-daemon-pt.c | |||
@@ -800,11 +800,9 @@ transmit_dns_request_to_cadet (void *cls, | |||
800 | * Task run if the time to answer a DNS request via CADET is over. | 800 | * Task run if the time to answer a DNS request via CADET is over. |
801 | * | 801 | * |
802 | * @param cls the `struct RequestContext` to abort | 802 | * @param cls the `struct RequestContext` to abort |
803 | * @param tc scheduler context | ||
804 | */ | 803 | */ |
805 | static void | 804 | static void |
806 | timeout_request (void *cls, | 805 | timeout_request (void *cls) |
807 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
808 | { | 806 | { |
809 | struct RequestContext *rc = cls; | 807 | struct RequestContext *rc = cls; |
810 | struct CadetExit *exit = rc->exit; | 808 | struct CadetExit *exit = rc->exit; |
@@ -1023,11 +1021,9 @@ abort_all_requests (struct CadetExit *exit) | |||
1023 | * Function scheduled as very last function, cleans up after us | 1021 | * Function scheduled as very last function, cleans up after us |
1024 | * | 1022 | * |
1025 | * @param cls closure, NULL | 1023 | * @param cls closure, NULL |
1026 | * @param tskctx scheduler context, unused | ||
1027 | */ | 1024 | */ |
1028 | static void | 1025 | static void |
1029 | cleanup (void *cls, | 1026 | cleanup (void *cls) |
1030 | const struct GNUNET_SCHEDULER_TaskContext *tskctx) | ||
1031 | { | 1027 | { |
1032 | struct CadetExit *exit; | 1028 | struct CadetExit *exit; |
1033 | 1029 | ||
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index f1ddcddc2..c0d50d177 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -140,8 +140,7 @@ mhd_ahc (void *cls, | |||
140 | 140 | ||
141 | 141 | ||
142 | static void | 142 | static void |
143 | do_shutdown (void *cls, | 143 | do_shutdown (void *cls) |
144 | const struct GNUNET_SCHEDULER_TaskContext *c) | ||
145 | { | 144 | { |
146 | if (mhd_task_id != NULL) | 145 | if (mhd_task_id != NULL) |
147 | { | 146 | { |
@@ -181,8 +180,7 @@ curl_main (void); | |||
181 | 180 | ||
182 | 181 | ||
183 | static void | 182 | static void |
184 | curl_task (void *cls, | 183 | curl_task (void *cls) |
185 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
186 | { | 184 | { |
187 | curl_task_id = NULL; | 185 | curl_task_id = NULL; |
188 | curl_main (); | 186 | curl_main (); |
@@ -264,7 +262,7 @@ curl_main () | |||
264 | 262 | ||
265 | 263 | ||
266 | static void | 264 | static void |
267 | start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 265 | start_curl (void *cls) |
268 | { | 266 | { |
269 | GNUNET_asprintf (&url, | 267 | GNUNET_asprintf (&url, |
270 | "http://%s/hello_world", | 268 | "http://%s/hello_world", |
@@ -289,7 +287,7 @@ start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
289 | 287 | ||
290 | 288 | ||
291 | static void | 289 | static void |
292 | disco_ns (void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 290 | disco_ns (void* cls) |
293 | { | 291 | { |
294 | GNUNET_NAMESTORE_disconnect (namestore); | 292 | GNUNET_NAMESTORE_disconnect (namestore); |
295 | namestore = NULL; | 293 | namestore = NULL; |
@@ -340,8 +338,7 @@ mhd_main (void); | |||
340 | 338 | ||
341 | 339 | ||
342 | static void | 340 | static void |
343 | mhd_task (void *cls, | 341 | mhd_task (void *cls) |
344 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
345 | { | 342 | { |
346 | mhd_task_id = NULL; | 343 | mhd_task_id = NULL; |
347 | MHD_run (mhd); | 344 | MHD_run (mhd); |
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index b5bc1395b..85b28fbf8 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c | |||
@@ -171,8 +171,7 @@ do_shutdown () | |||
171 | * Function to run the HTTP client. | 171 | * Function to run the HTTP client. |
172 | */ | 172 | */ |
173 | static void | 173 | static void |
174 | curl_main (void *cls, | 174 | curl_main (void *cls) |
175 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
176 | { | 175 | { |
177 | fd_set rs; | 176 | fd_set rs; |
178 | fd_set ws; | 177 | fd_set ws; |
@@ -304,7 +303,7 @@ mhd_main (void); | |||
304 | 303 | ||
305 | 304 | ||
306 | static void | 305 | static void |
307 | mhd_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 306 | mhd_task (void *cls) |
308 | { | 307 | { |
309 | mhd_task_id = NULL; | 308 | mhd_task_id = NULL; |
310 | MHD_run (mhd); | 309 | MHD_run (mhd); |
@@ -313,7 +312,7 @@ mhd_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
313 | 312 | ||
314 | 313 | ||
315 | static void | 314 | static void |
316 | ctrl_c_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 315 | ctrl_c_shutdown (void *cls) |
317 | { | 316 | { |
318 | ctrl_c_task_id = NULL; | 317 | ctrl_c_task_id = NULL; |
319 | do_shutdown (); | 318 | do_shutdown (); |
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c index 2ff8ad0f2..1ff3b55e3 100644 --- a/src/regex/gnunet-daemon-regexprofiler.c +++ b/src/regex/gnunet-daemon-regexprofiler.c | |||
@@ -106,10 +106,9 @@ static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key; | |||
106 | * Task run during shutdown. | 106 | * Task run during shutdown. |
107 | * | 107 | * |
108 | * @param cls unused | 108 | * @param cls unused |
109 | * @param tc unused | ||
110 | */ | 109 | */ |
111 | static void | 110 | static void |
112 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 111 | shutdown_task (void *cls) |
113 | { | 112 | { |
114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutting down\n"); | 113 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutting down\n"); |
115 | 114 | ||
@@ -137,15 +136,16 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
137 | * Announce a previously announced regex re-using cached data. | 136 | * Announce a previously announced regex re-using cached data. |
138 | * | 137 | * |
139 | * @param cls Closure (regex to announce if needed). | 138 | * @param cls Closure (regex to announce if needed). |
140 | * @param tc TaskContext. | ||
141 | */ | 139 | */ |
142 | static void | 140 | static void |
143 | reannounce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 141 | reannounce_regex (void *cls) |
144 | { | 142 | { |
145 | struct GNUNET_TIME_Relative random_delay; | ||
146 | char *regex = cls; | 143 | char *regex = cls; |
144 | struct GNUNET_TIME_Relative random_delay; | ||
145 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
147 | 146 | ||
148 | reannounce_task = NULL; | 147 | reannounce_task = NULL; |
148 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
149 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 149 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
150 | { | 150 | { |
151 | GNUNET_free (regex); | 151 | GNUNET_free (regex); |
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index 5fe6186cf..5938c99b1 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -384,10 +384,9 @@ stats_connect_cb (void *cls, | |||
384 | * Start announcing the next regex in the DHT. | 384 | * Start announcing the next regex in the DHT. |
385 | * | 385 | * |
386 | * @param cls Index of the next peer in the peers array. | 386 | * @param cls Index of the next peer in the peers array. |
387 | * @param tc TaskContext. | ||
388 | */ | 387 | */ |
389 | static void | 388 | static void |
390 | announce_next_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 389 | announce_next_regex (void *cls); |
391 | 390 | ||
392 | 391 | ||
393 | /******************************************************************************/ | 392 | /******************************************************************************/ |
@@ -399,10 +398,9 @@ announce_next_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
399 | * Shutdown nicely | 398 | * Shutdown nicely |
400 | * | 399 | * |
401 | * @param cls NULL | 400 | * @param cls NULL |
402 | * @param tc the task context | ||
403 | */ | 401 | */ |
404 | static void | 402 | static void |
405 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 403 | do_shutdown (void *cls) |
406 | { | 404 | { |
407 | struct RegexPeer *peer; | 405 | struct RegexPeer *peer; |
408 | unsigned int peer_cnt; | 406 | unsigned int peer_cnt; |
@@ -471,10 +469,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
471 | * abort task to run on test timed out | 469 | * abort task to run on test timed out |
472 | * | 470 | * |
473 | * @param cls NULL | 471 | * @param cls NULL |
474 | * @param tc the task context | ||
475 | */ | 472 | */ |
476 | static void | 473 | static void |
477 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 474 | do_abort (void *cls) |
478 | { | 475 | { |
479 | unsigned long i = (unsigned long) cls; | 476 | unsigned long i = (unsigned long) cls; |
480 | 477 | ||
@@ -664,10 +661,9 @@ stats_connect_cb (void *cls, | |||
664 | * profiler, when done. | 661 | * profiler, when done. |
665 | * | 662 | * |
666 | * @param cls NULL | 663 | * @param cls NULL |
667 | * @param tc the task context | ||
668 | */ | 664 | */ |
669 | static void | 665 | static void |
670 | do_collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 666 | do_collect_stats (void *cls) |
671 | { | 667 | { |
672 | struct RegexPeer *peer = &peers[0]; | 668 | struct RegexPeer *peer = &peers[0]; |
673 | 669 | ||
@@ -694,10 +690,9 @@ do_collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
694 | * Start searching for the next string in the DHT. | 690 | * Start searching for the next string in the DHT. |
695 | * | 691 | * |
696 | * @param cls Index of the next peer in the peers array. | 692 | * @param cls Index of the next peer in the peers array. |
697 | * @param tc TaskContext. | ||
698 | */ | 693 | */ |
699 | static void | 694 | static void |
700 | find_string (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 695 | find_string (void *cls); |
701 | 696 | ||
702 | 697 | ||
703 | /** | 698 | /** |
@@ -808,10 +803,9 @@ regex_found_handler (void *cls, | |||
808 | * specified timeout 'search_timeout'. | 803 | * specified timeout 'search_timeout'. |
809 | * | 804 | * |
810 | * @param cls NULL | 805 | * @param cls NULL |
811 | * @param tc the task context | ||
812 | */ | 806 | */ |
813 | static void | 807 | static void |
814 | search_timed_out (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | 808 | search_timed_out (void *cls) |
815 | { | 809 | { |
816 | unsigned int i; | 810 | unsigned int i; |
817 | 811 | ||
@@ -846,15 +840,15 @@ search_timed_out (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
846 | * but we should start another one. | 840 | * but we should start another one. |
847 | * | 841 | * |
848 | * @param cls Index of the next peer in the peers array. | 842 | * @param cls Index of the next peer in the peers array. |
849 | * @param tc TaskContext. | ||
850 | */ | 843 | */ |
851 | static void | 844 | static void |
852 | find_timed_out (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 845 | find_timed_out (void *cls) |
853 | { | 846 | { |
854 | struct RegexPeer *p = cls; | 847 | struct RegexPeer *p = cls; |
848 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
855 | 849 | ||
856 | p->timeout = NULL; | 850 | p->timeout = NULL; |
857 | 851 | tc = GNUNET_SCHEDULER_get_task_context (); | |
858 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 852 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
859 | return; | 853 | return; |
860 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 854 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -870,13 +864,14 @@ find_timed_out (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
870 | * Start searching for a string in the DHT. | 864 | * Start searching for a string in the DHT. |
871 | * | 865 | * |
872 | * @param cls Index of the next peer in the peers array. | 866 | * @param cls Index of the next peer in the peers array. |
873 | * @param tc TaskContext. | ||
874 | */ | 867 | */ |
875 | static void | 868 | static void |
876 | find_string (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 869 | find_string (void *cls) |
877 | { | 870 | { |
878 | unsigned int search_peer = (unsigned int) (long) cls; | 871 | unsigned int search_peer = (unsigned int) (long) cls; |
872 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
879 | 873 | ||
874 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
880 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || | 875 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || |
881 | search_peer >= num_peers || | 876 | search_peer >= num_peers || |
882 | GNUNET_YES == in_shutdown) | 877 | GNUNET_YES == in_shutdown) |
@@ -962,7 +957,7 @@ daemon_started (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
962 | * @param tc the task context | 957 | * @param tc the task context |
963 | */ | 958 | */ |
964 | static void | 959 | static void |
965 | do_announce (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 960 | do_announce (void *cls) |
966 | { | 961 | { |
967 | unsigned int i; | 962 | unsigned int i; |
968 | 963 | ||
@@ -982,13 +977,14 @@ do_announce (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
982 | * Start announcing the next regex in the DHT. | 977 | * Start announcing the next regex in the DHT. |
983 | * | 978 | * |
984 | * @param cls Closure (unused). | 979 | * @param cls Closure (unused). |
985 | * @param tc TaskContext. | ||
986 | */ | 980 | */ |
987 | static void | 981 | static void |
988 | announce_next_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 982 | announce_next_regex (void *cls) |
989 | { | 983 | { |
990 | struct RegexPeer *peer; | 984 | struct RegexPeer *peer; |
985 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
991 | 986 | ||
987 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
992 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 988 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
993 | return; | 989 | return; |
994 | if (next_search >= num_peers) | 990 | if (next_search >= num_peers) |
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c index 04aa66b32..27dfa773d 100644 --- a/src/regex/gnunet-regex-simulation-profiler.c +++ b/src/regex/gnunet-regex-simulation-profiler.c | |||
@@ -271,10 +271,9 @@ free_meter (struct ProgressMeter *meter) | |||
271 | * Shutdown task. | 271 | * Shutdown task. |
272 | * | 272 | * |
273 | * @param cls NULL | 273 | * @param cls NULL |
274 | * @param tc the task context | ||
275 | */ | 274 | */ |
276 | static void | 275 | static void |
277 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 276 | do_shutdown (void *cls) |
278 | { | 277 | { |
279 | shutdown_task = NULL; | 278 | shutdown_task = NULL; |
280 | if (NULL != abort_task) | 279 | if (NULL != abort_task) |
@@ -292,10 +291,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
292 | * abort task to run on test timed out | 291 | * abort task to run on test timed out |
293 | * | 292 | * |
294 | * @param cls NULL | 293 | * @param cls NULL |
295 | * @param tc the task context | ||
296 | */ | 294 | */ |
297 | static void | 295 | static void |
298 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 296 | do_abort (void *cls) |
299 | { | 297 | { |
300 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); | 298 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); |
301 | abort_task = NULL; | 299 | abort_task = NULL; |
@@ -564,10 +562,9 @@ policy_filename_cb (void *cls, const char *filename) | |||
564 | * Iterate over files contained in policy_dir. | 562 | * Iterate over files contained in policy_dir. |
565 | * | 563 | * |
566 | * @param cls NULL | 564 | * @param cls NULL |
567 | * @param tc the task context | ||
568 | */ | 565 | */ |
569 | static void | 566 | static void |
570 | do_directory_scan (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 567 | do_directory_scan (void *cls) |
571 | { | 568 | { |
572 | struct GNUNET_TIME_Absolute start_time; | 569 | struct GNUNET_TIME_Absolute start_time; |
573 | struct GNUNET_TIME_Relative duration; | 570 | struct GNUNET_TIME_Relative duration; |
diff --git a/src/regex/gnunet-service-regex.c b/src/regex/gnunet-service-regex.c index 2150b0973..a70876534 100644 --- a/src/regex/gnunet-service-regex.c +++ b/src/regex/gnunet-service-regex.c | |||
@@ -152,11 +152,9 @@ handle_client_disconnect (void *cls, | |||
152 | * Task run during shutdown. | 152 | * Task run during shutdown. |
153 | * | 153 | * |
154 | * @param cls unused | 154 | * @param cls unused |
155 | * @param tc unused | ||
156 | */ | 155 | */ |
157 | static void | 156 | static void |
158 | cleanup_task (void *cls, | 157 | cleanup_task (void *cls) |
159 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
160 | { | 158 | { |
161 | struct ClientEntry *ce; | 159 | struct ClientEntry *ce; |
162 | 160 | ||
@@ -177,13 +175,11 @@ cleanup_task (void *cls, | |||
177 | /** | 175 | /** |
178 | * Periodic task to refresh our announcement of the regex. | 176 | * Periodic task to refresh our announcement of the regex. |
179 | * | 177 | * |
180 | * @param cls the 'struct ClientEntry' of the client that triggered the | 178 | * @param cls the `struct ClientEntry *` of the client that triggered the |
181 | * announcement | 179 | * announcement |
182 | * @param tc scheduler context | ||
183 | */ | 180 | */ |
184 | static void | 181 | static void |
185 | reannounce (void *cls, | 182 | reannounce (void *cls) |
186 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
187 | { | 183 | { |
188 | struct ClientEntry *ce = cls; | 184 | struct ClientEntry *ce = cls; |
189 | 185 | ||
diff --git a/src/regex/test_regex_api.c b/src/regex/test_regex_api.c index ab387d755..01f455854 100644 --- a/src/regex/test_regex_api.c +++ b/src/regex/test_regex_api.c | |||
@@ -45,12 +45,11 @@ static struct GNUNET_REGEX_Search *s; | |||
45 | 45 | ||
46 | static int ok = 1; | 46 | static int ok = 1; |
47 | 47 | ||
48 | static struct GNUNET_SCHEDULER_Task * die_task; | 48 | static struct GNUNET_SCHEDULER_Task *die_task; |
49 | 49 | ||
50 | 50 | ||
51 | static void | 51 | static void |
52 | end (void *cls, | 52 | end (void *cls) |
53 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
54 | { | 53 | { |
55 | die_task = NULL; | 54 | die_task = NULL; |
56 | GNUNET_REGEX_announce_cancel (a); | 55 | GNUNET_REGEX_announce_cancel (a); |
diff --git a/src/regex/test_regex_integration.c b/src/regex/test_regex_integration.c index 453500fa1..d98d80070 100644 --- a/src/regex/test_regex_integration.c +++ b/src/regex/test_regex_integration.c | |||
@@ -57,8 +57,7 @@ static struct GNUNET_SCHEDULER_Task *die_task; | |||
57 | 57 | ||
58 | 58 | ||
59 | static void | 59 | static void |
60 | end (void *cls, | 60 | end (void *cls) |
61 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
62 | { | 61 | { |
63 | die_task = NULL; | 62 | die_task = NULL; |
64 | GNUNET_REGEX_announce_cancel (a4); | 63 | GNUNET_REGEX_announce_cancel (a4); |
@@ -77,7 +76,7 @@ static void | |||
77 | end_badly () | 76 | end_badly () |
78 | { | 77 | { |
79 | FPRINTF (stderr, "%s", "Testcase failed (timeout).\n"); | 78 | FPRINTF (stderr, "%s", "Testcase failed (timeout).\n"); |
80 | end (NULL, NULL); | 79 | end (NULL); |
81 | ok = 1; | 80 | ok = 1; |
82 | } | 81 | } |
83 | 82 | ||
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index fdba7fcc4..705fcbeb3 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c | |||
@@ -119,7 +119,7 @@ static char* allow_origin; | |||
119 | static char* allow_headers; | 119 | static char* allow_headers; |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * MHD Connection handle | 122 | * MHD Connection handle |
123 | */ | 123 | */ |
124 | struct MhdConnectionHandle | 124 | struct MhdConnectionHandle |
125 | { | 125 | { |
@@ -143,11 +143,9 @@ struct MhdConnectionHandle | |||
143 | * Task run whenever HTTP server operations are pending. | 143 | * Task run whenever HTTP server operations are pending. |
144 | * | 144 | * |
145 | * @param cls NULL | 145 | * @param cls NULL |
146 | * @param tc sched context | ||
147 | */ | 146 | */ |
148 | static void | 147 | static void |
149 | do_httpd (void *cls, | 148 | do_httpd (void *cls); |
150 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
151 | 149 | ||
152 | 150 | ||
153 | /** | 151 | /** |
@@ -179,7 +177,7 @@ plugin_callback (void *cls, | |||
179 | struct MhdConnectionHandle *handle = cls; | 177 | struct MhdConnectionHandle *handle = cls; |
180 | handle->status = status; | 178 | handle->status = status; |
181 | handle->response = resp; | 179 | handle->response = resp; |
182 | run_mhd_now(); | 180 | run_mhd_now(); |
183 | } | 181 | } |
184 | 182 | ||
185 | 183 | ||
@@ -222,7 +220,7 @@ url_iterator (void *cls, | |||
222 | struct RestConnectionDataHandle *handle = cls; | 220 | struct RestConnectionDataHandle *handle = cls; |
223 | struct GNUNET_HashCode hkey; | 221 | struct GNUNET_HashCode hkey; |
224 | char *val; | 222 | char *val; |
225 | 223 | ||
226 | GNUNET_CRYPTO_hash (key, strlen (key), &hkey); | 224 | GNUNET_CRYPTO_hash (key, strlen (key), &hkey); |
227 | GNUNET_asprintf (&val, "%s", value); | 225 | GNUNET_asprintf (&val, "%s", value); |
228 | if (GNUNET_OK != | 226 | if (GNUNET_OK != |
@@ -394,7 +392,7 @@ kill_httpd () | |||
394 | httpd = NULL; | 392 | httpd = NULL; |
395 | } | 393 | } |
396 | if (NULL != httpd_task) | 394 | if (NULL != httpd_task) |
397 | { | 395 | { |
398 | GNUNET_SCHEDULER_cancel (httpd_task); | 396 | GNUNET_SCHEDULER_cancel (httpd_task); |
399 | httpd_task = NULL; | 397 | httpd_task = NULL; |
400 | } | 398 | } |
@@ -405,11 +403,9 @@ kill_httpd () | |||
405 | * Task run whenever HTTP server is idle for too long. Kill it. | 403 | * Task run whenever HTTP server is idle for too long. Kill it. |
406 | * | 404 | * |
407 | * @param cls NULL | 405 | * @param cls NULL |
408 | * @param tc sched context | ||
409 | */ | 406 | */ |
410 | static void | 407 | static void |
411 | kill_httpd_task (void *cls, | 408 | kill_httpd_task (void *cls) |
412 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
413 | { | 409 | { |
414 | httpd_task = NULL; | 410 | httpd_task = NULL; |
415 | kill_httpd (); | 411 | kill_httpd (); |
@@ -482,11 +478,9 @@ schedule_httpd () | |||
482 | * Task run whenever HTTP server operations are pending. | 478 | * Task run whenever HTTP server operations are pending. |
483 | * | 479 | * |
484 | * @param cls NULL | 480 | * @param cls NULL |
485 | * @param tc scheduler context | ||
486 | */ | 481 | */ |
487 | static void | 482 | static void |
488 | do_httpd (void *cls, | 483 | do_httpd (void *cls) |
489 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
490 | { | 484 | { |
491 | httpd_task = NULL; | 485 | httpd_task = NULL; |
492 | MHD_run (httpd); | 486 | MHD_run (httpd); |
@@ -501,10 +495,10 @@ do_httpd (void *cls, | |||
501 | * @param tc the scheduler context | 495 | * @param tc the scheduler context |
502 | */ | 496 | */ |
503 | static void | 497 | static void |
504 | do_accept (void *cls, | 498 | do_accept (void *cls) |
505 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
506 | { | 499 | { |
507 | struct GNUNET_NETWORK_Handle *lsock = cls; | 500 | struct GNUNET_NETWORK_Handle *lsock = cls; |
501 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
508 | struct GNUNET_NETWORK_Handle *s; | 502 | struct GNUNET_NETWORK_Handle *s; |
509 | int fd; | 503 | int fd; |
510 | const struct sockaddr *addr; | 504 | const struct sockaddr *addr; |
@@ -514,8 +508,9 @@ do_accept (void *cls, | |||
514 | ltask4 = NULL; | 508 | ltask4 = NULL; |
515 | else | 509 | else |
516 | ltask6 = NULL; | 510 | ltask6 = NULL; |
511 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
517 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 512 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
518 | return; | 513 | return; |
519 | if (lsock == lsock4) | 514 | if (lsock == lsock4) |
520 | ltask4 = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, | 515 | ltask4 = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, |
521 | lsock, | 516 | lsock, |
@@ -550,11 +545,9 @@ do_accept (void *cls, | |||
550 | * Task run on shutdown | 545 | * Task run on shutdown |
551 | * | 546 | * |
552 | * @param cls closure | 547 | * @param cls closure |
553 | * @param tc task context | ||
554 | */ | 548 | */ |
555 | static void | 549 | static void |
556 | do_shutdown (void *cls, | 550 | do_shutdown (void *cls) |
557 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
558 | { | 551 | { |
559 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 552 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
560 | "Shutting down...\n"); | 553 | "Shutting down...\n"); |
@@ -581,7 +574,7 @@ bind_v4 () | |||
581 | sa4.sin_port = htons (port); | 574 | sa4.sin_port = htons (port); |
582 | #if HAVE_SOCKADDR_IN_SIN_LEN | 575 | #if HAVE_SOCKADDR_IN_SIN_LEN |
583 | sa4.sin_len = sizeof (sa4); | 576 | sa4.sin_len = sizeof (sa4); |
584 | #endif | 577 | #endif |
585 | ls = GNUNET_NETWORK_socket_create (AF_INET, | 578 | ls = GNUNET_NETWORK_socket_create (AF_INET, |
586 | SOCK_STREAM, | 579 | SOCK_STREAM, |
587 | 0); | 580 | 0); |
@@ -617,7 +610,7 @@ bind_v6 () | |||
617 | sa6.sin6_port = htons (port); | 610 | sa6.sin6_port = htons (port); |
618 | #if HAVE_SOCKADDR_IN_SIN_LEN | 611 | #if HAVE_SOCKADDR_IN_SIN_LEN |
619 | sa6.sin6_len = sizeof (sa6); | 612 | sa6.sin6_len = sizeof (sa6); |
620 | #endif | 613 | #endif |
621 | ls = GNUNET_NETWORK_socket_create (AF_INET6, | 614 | ls = GNUNET_NETWORK_socket_create (AF_INET6, |
622 | SOCK_STREAM, | 615 | SOCK_STREAM, |
623 | 0); | 616 | 0); |
@@ -685,8 +678,8 @@ load_plugin (void *cls, | |||
685 | * @param c configuration | 678 | * @param c configuration |
686 | */ | 679 | */ |
687 | static void | 680 | static void |
688 | run (void *cls, | 681 | run (void *cls, |
689 | char *const *args, | 682 | char *const *args, |
690 | const char *cfgfile, | 683 | const char *cfgfile, |
691 | const struct GNUNET_CONFIGURATION_Handle *c) | 684 | const struct GNUNET_CONFIGURATION_Handle *c) |
692 | { | 685 | { |
@@ -756,7 +749,7 @@ run (void *cls, | |||
756 | { | 749 | { |
757 | GNUNET_SCHEDULER_shutdown (); | 750 | GNUNET_SCHEDULER_shutdown (); |
758 | return; | 751 | return; |
759 | } | 752 | } |
760 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 753 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
761 | "Service listens on port %u\n", | 754 | "Service listens on port %u\n", |
762 | port); | 755 | port); |
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c index 86e5c017d..f68c18aa4 100644 --- a/src/revocation/gnunet-revocation.c +++ b/src/revocation/gnunet-revocation.c | |||
@@ -84,11 +84,9 @@ static unsigned long long matching_bits; | |||
84 | * Function run if the user aborts with CTRL-C. | 84 | * Function run if the user aborts with CTRL-C. |
85 | * | 85 | * |
86 | * @param cls closure | 86 | * @param cls closure |
87 | * @param tc scheduler context | ||
88 | */ | 87 | */ |
89 | static void | 88 | static void |
90 | do_shutdown (void *cls, | 89 | do_shutdown (void *cls) |
91 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
92 | { | 90 | { |
93 | if (NULL != el) | 91 | if (NULL != el) |
94 | { | 92 | { |
@@ -231,15 +229,15 @@ perform_revocation (const struct RevocationData *rd) | |||
231 | * Perform the proof-of-work calculation. | 229 | * Perform the proof-of-work calculation. |
232 | * | 230 | * |
233 | * @param cls the `struct RevocationData` | 231 | * @param cls the `struct RevocationData` |
234 | * @param tc scheduler context | ||
235 | */ | 232 | */ |
236 | static void | 233 | static void |
237 | calculate_pow (void *cls, | 234 | calculate_pow (void *cls) |
238 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
239 | { | 235 | { |
240 | struct RevocationData *rd = cls; | 236 | struct RevocationData *rd = cls; |
237 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
241 | 238 | ||
242 | /* store temporary results */ | 239 | /* store temporary results */ |
240 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
243 | if ( (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) || | 241 | if ( (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) || |
244 | (0 == (rd->pow % 128) ) ) | 242 | (0 == (rd->pow % 128) ) ) |
245 | { | 243 | { |
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c index 9cf1bb812..e41195d55 100644 --- a/src/revocation/gnunet-service-revocation.c +++ b/src/revocation/gnunet-service-revocation.c | |||
@@ -521,11 +521,9 @@ add_revocation (void *cls, | |||
521 | * run the set operation on the revocation certificates. | 521 | * run the set operation on the revocation certificates. |
522 | * | 522 | * |
523 | * @param cls NULL | 523 | * @param cls NULL |
524 | * @param tc scheduler context (unused) | ||
525 | */ | 524 | */ |
526 | static void | 525 | static void |
527 | transmit_task_cb (void *cls, | 526 | transmit_task_cb (void *cls) |
528 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
529 | { | 527 | { |
530 | struct PeerEntry *peer_entry = cls; | 528 | struct PeerEntry *peer_entry = cls; |
531 | 529 | ||
@@ -662,11 +660,9 @@ free_entry (void *cls, | |||
662 | * Task run during shutdown. | 660 | * Task run during shutdown. |
663 | * | 661 | * |
664 | * @param cls unused | 662 | * @param cls unused |
665 | * @param tc unused | ||
666 | */ | 663 | */ |
667 | static void | 664 | static void |
668 | shutdown_task (void *cls, | 665 | shutdown_task (void *cls) |
669 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
670 | { | 666 | { |
671 | if (NULL != revocation_set) | 667 | if (NULL != revocation_set) |
672 | { | 668 | { |
diff --git a/src/revocation/test_revocation.c b/src/revocation/test_revocation.c index e9836cc5a..6d6db1b5c 100644 --- a/src/revocation/test_revocation.c +++ b/src/revocation/test_revocation.c | |||
@@ -57,8 +57,7 @@ static int ok; | |||
57 | 57 | ||
58 | 58 | ||
59 | static void | 59 | static void |
60 | do_shutdown (void *cls, | 60 | do_shutdown (void *cls) |
61 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
62 | { | 61 | { |
63 | unsigned int c; | 62 | unsigned int c; |
64 | 63 | ||
@@ -94,8 +93,7 @@ do_shutdown (void *cls, | |||
94 | 93 | ||
95 | 94 | ||
96 | static void | 95 | static void |
97 | check_revocation (void *cls, | 96 | check_revocation (void *cls); |
98 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
99 | 97 | ||
100 | 98 | ||
101 | static void | 99 | static void |
@@ -128,8 +126,7 @@ revocation_remote_cb (void *cls, | |||
128 | 126 | ||
129 | 127 | ||
130 | static void | 128 | static void |
131 | check_revocation (void *cls, | 129 | check_revocation (void *cls) |
132 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
133 | { | 130 | { |
134 | GNUNET_REVOCATION_query (testpeers[0].cfg, | 131 | GNUNET_REVOCATION_query (testpeers[0].cfg, |
135 | &testpeers[1].pubkey, | 132 | &testpeers[1].pubkey, |
@@ -146,7 +143,7 @@ revocation_cb (void *cls, | |||
146 | { | 143 | { |
147 | fprintf (stderr, | 144 | fprintf (stderr, |
148 | "Revocation successful\n"); | 145 | "Revocation successful\n"); |
149 | check_revocation (NULL, NULL); | 146 | check_revocation (NULL); |
150 | } | 147 | } |
151 | } | 148 | } |
152 | 149 | ||
diff --git a/src/rps/gnunet-rps.c b/src/rps/gnunet-rps.c index 23516b626..01be2aeb3 100644 --- a/src/rps/gnunet-rps.c +++ b/src/rps/gnunet-rps.c | |||
@@ -92,11 +92,9 @@ GNUNET_GETOPT_set_peerid (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
92 | * Cancels pending request and disconnects. | 92 | * Cancels pending request and disconnects. |
93 | * | 93 | * |
94 | * @param cls NULL | 94 | * @param cls NULL |
95 | * @param tc scheduler context | ||
96 | */ | 95 | */ |
97 | static void | 96 | static void |
98 | do_shutdown (void *cls, | 97 | do_shutdown (void *cls) |
99 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
100 | { | 98 | { |
101 | shutdown_task = NULL; | 99 | shutdown_task = NULL; |
102 | if (NULL != req_handle) | 100 | if (NULL != req_handle) |
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index e3ddb4bff..af06cf1bd 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -1482,10 +1482,10 @@ send_push (const struct GNUNET_PeerIdentity *peer_id) | |||
1482 | 1482 | ||
1483 | 1483 | ||
1484 | static void | 1484 | static void |
1485 | do_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 1485 | do_round (void *cls); |
1486 | 1486 | ||
1487 | static void | 1487 | static void |
1488 | do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 1488 | do_mal_round (void *cls); |
1489 | 1489 | ||
1490 | 1490 | ||
1491 | #ifdef ENABLE_MALICIOUS | 1491 | #ifdef ENABLE_MALICIOUS |
@@ -1624,7 +1624,7 @@ handle_client_act_malicious (void *cls, | |||
1624 | * This is executed regylary. | 1624 | * This is executed regylary. |
1625 | */ | 1625 | */ |
1626 | static void | 1626 | static void |
1627 | do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1627 | do_mal_round (void *cls) |
1628 | { | 1628 | { |
1629 | uint32_t num_pushes; | 1629 | uint32_t num_pushes; |
1630 | uint32_t i; | 1630 | uint32_t i; |
@@ -1756,7 +1756,7 @@ do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1756 | * This is executed regylary. | 1756 | * This is executed regylary. |
1757 | */ | 1757 | */ |
1758 | static void | 1758 | static void |
1759 | do_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1759 | do_round (void *cls) |
1760 | { | 1760 | { |
1761 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Going to execute next round.\n"); | 1761 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Going to execute next round.\n"); |
1762 | 1762 | ||
@@ -2032,11 +2032,9 @@ process_peerinfo_peers (void *cls, | |||
2032 | * Task run during shutdown. | 2032 | * Task run during shutdown. |
2033 | * | 2033 | * |
2034 | * @param cls unused | 2034 | * @param cls unused |
2035 | * @param tc unused | ||
2036 | */ | 2035 | */ |
2037 | static void | 2036 | static void |
2038 | shutdown_task (void *cls, | 2037 | shutdown_task (void *cls) |
2039 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2040 | { | 2038 | { |
2041 | 2039 | ||
2042 | LOG (GNUNET_ERROR_TYPE_DEBUG, "RPS is going down\n"); | 2040 | LOG (GNUNET_ERROR_TYPE_DEBUG, "RPS is going down\n"); |
diff --git a/src/rps/gnunet-service-rps_sampler.c b/src/rps/gnunet-service-rps_sampler.c index b65dd7c47..e5f6595bb 100644 --- a/src/rps/gnunet-service-rps_sampler.c +++ b/src/rps/gnunet-service-rps_sampler.c | |||
@@ -107,8 +107,7 @@ struct GetPeerCls | |||
107 | * Sampler. | 107 | * Sampler. |
108 | */ | 108 | */ |
109 | typedef void | 109 | typedef void |
110 | (*RPS_get_peers_type) (void *cls, | 110 | (*RPS_get_peers_type) (void *cls); |
111 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
112 | 111 | ||
113 | /** | 112 | /** |
114 | * Get one random peer out of the sampled peers. | 113 | * Get one random peer out of the sampled peers. |
@@ -118,8 +117,8 @@ typedef void | |||
118 | * Only used internally | 117 | * Only used internally |
119 | */ | 118 | */ |
120 | static void | 119 | static void |
121 | sampler_get_rand_peer (void *cls, | 120 | sampler_get_rand_peer (void *cls); |
122 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 121 | |
123 | 122 | ||
124 | /** | 123 | /** |
125 | * Get one random peer out of the sampled peers. | 124 | * Get one random peer out of the sampled peers. |
@@ -128,8 +127,7 @@ sampler_get_rand_peer (void *cls, | |||
128 | * corrsponding peer to the client. | 127 | * corrsponding peer to the client. |
129 | */ | 128 | */ |
130 | static void | 129 | static void |
131 | sampler_mod_get_rand_peer (void *cls, | 130 | sampler_mod_get_rand_peer (void *cls); |
132 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
133 | 131 | ||
134 | 132 | ||
135 | /** | 133 | /** |
@@ -530,14 +528,15 @@ RPS_sampler_reinitialise_by_value (struct RPS_Sampler *sampler, | |||
530 | * Only used internally | 528 | * Only used internally |
531 | */ | 529 | */ |
532 | static void | 530 | static void |
533 | sampler_get_rand_peer (void *cls, | 531 | sampler_get_rand_peer (void *cls) |
534 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
535 | { | 532 | { |
536 | struct GetPeerCls *gpc = cls; | 533 | struct GetPeerCls *gpc = cls; |
537 | uint32_t r_index; | 534 | uint32_t r_index; |
538 | struct RPS_Sampler *sampler; | 535 | struct RPS_Sampler *sampler; |
536 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
539 | 537 | ||
540 | gpc->get_peer_task = NULL; | 538 | gpc->get_peer_task = NULL; |
539 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
541 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 540 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
542 | return; | 541 | return; |
543 | sampler = gpc->req_handle->sampler; | 542 | sampler = gpc->req_handle->sampler; |
@@ -583,15 +582,16 @@ sampler_get_rand_peer (void *cls, | |||
583 | * corrsponding peer to the client. | 582 | * corrsponding peer to the client. |
584 | */ | 583 | */ |
585 | static void | 584 | static void |
586 | sampler_mod_get_rand_peer (void *cls, | 585 | sampler_mod_get_rand_peer (void *cls) |
587 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
588 | { | 586 | { |
589 | struct GetPeerCls *gpc = cls; | 587 | struct GetPeerCls *gpc = cls; |
590 | struct RPS_SamplerElement *s_elem; | 588 | struct RPS_SamplerElement *s_elem; |
591 | struct GNUNET_TIME_Relative last_request_diff; | 589 | struct GNUNET_TIME_Relative last_request_diff; |
592 | struct RPS_Sampler *sampler; | 590 | struct RPS_Sampler *sampler; |
591 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
593 | 592 | ||
594 | gpc->get_peer_task = NULL; | 593 | gpc->get_peer_task = NULL; |
594 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
595 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 595 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
596 | return; | 596 | return; |
597 | sampler = gpc->req_handle->sampler; | 597 | sampler = gpc->req_handle->sampler; |
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 63eb8417a..aca58d55e 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c | |||
@@ -430,7 +430,7 @@ tofile_ (const char *file_name, char *line) | |||
430 | 430 | ||
431 | 431 | ||
432 | /** | 432 | /** |
433 | * Write the ids and their according index in the given array to a file | 433 | * Write the ids and their according index in the given array to a file |
434 | * Unused | 434 | * Unused |
435 | */ | 435 | */ |
436 | /* static void | 436 | /* static void |
@@ -493,7 +493,7 @@ make_oplist_entry () | |||
493 | * Task run on timeout to shut everything down. | 493 | * Task run on timeout to shut everything down. |
494 | */ | 494 | */ |
495 | static void | 495 | static void |
496 | shutdown_op (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 496 | shutdown_op (void *cls) |
497 | { | 497 | { |
498 | unsigned int i; | 498 | unsigned int i; |
499 | 499 | ||
@@ -513,11 +513,11 @@ shutdown_op (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
513 | /** | 513 | /** |
514 | * Seed peers. | 514 | * Seed peers. |
515 | */ | 515 | */ |
516 | void | 516 | static void |
517 | seed_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 517 | seed_peers (void *cls) |
518 | { | 518 | { |
519 | struct RPSPeer *peer = cls; | ||
519 | unsigned int amount; | 520 | unsigned int amount; |
520 | struct RPSPeer *peer = (struct RPSPeer *) cls; | ||
521 | unsigned int i; | 521 | unsigned int i; |
522 | 522 | ||
523 | // TODO if malicious don't seed mal peers | 523 | // TODO if malicious don't seed mal peers |
@@ -532,13 +532,14 @@ seed_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
532 | GNUNET_RPS_seed_ids (peer->rps_handle, amount, rps_peer_ids); | 532 | GNUNET_RPS_seed_ids (peer->rps_handle, amount, rps_peer_ids); |
533 | } | 533 | } |
534 | 534 | ||
535 | |||
535 | /** | 536 | /** |
536 | * Seed peers. | 537 | * Seed peers. |
537 | */ | 538 | */ |
538 | void | 539 | static void |
539 | seed_peers_big (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 540 | seed_peers_big (void *cls) |
540 | { | 541 | { |
541 | struct RPSPeer *peer = (struct RPSPeer *) cls; | 542 | struct RPSPeer *peer = cls; |
542 | unsigned int seed_msg_size; | 543 | unsigned int seed_msg_size; |
543 | uint32_t num_peers_max; | 544 | uint32_t num_peers_max; |
544 | unsigned int amount; | 545 | unsigned int amount; |
@@ -740,7 +741,7 @@ default_reply_handle (void *cls, | |||
740 | "[%s] got %" PRIu64 " peers:\n", | 741 | "[%s] got %" PRIu64 " peers:\n", |
741 | GNUNET_i2s (rps_peer->peer_id), | 742 | GNUNET_i2s (rps_peer->peer_id), |
742 | n); | 743 | n); |
743 | 744 | ||
744 | for (i = 0; i < n; i++) | 745 | for (i = 0; i < n; i++) |
745 | { | 746 | { |
746 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 747 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -762,11 +763,10 @@ default_reply_handle (void *cls, | |||
762 | * Request random peers. | 763 | * Request random peers. |
763 | */ | 764 | */ |
764 | static void | 765 | static void |
765 | request_peers (void *cls, | 766 | request_peers (void *cls) |
766 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
767 | { | 767 | { |
768 | struct PendingRequest *pending_req = cls; | ||
768 | struct RPSPeer *rps_peer; | 769 | struct RPSPeer *rps_peer; |
769 | struct PendingRequest *pending_req = (struct PendingRequest *) cls; | ||
770 | struct PendingReply *pending_rep; | 770 | struct PendingReply *pending_rep; |
771 | 771 | ||
772 | if (GNUNET_YES == in_shutdown) | 772 | if (GNUNET_YES == in_shutdown) |
@@ -827,11 +827,10 @@ cancel_request (struct PendingReply *pending_rep) | |||
827 | * Cancel a request. | 827 | * Cancel a request. |
828 | */ | 828 | */ |
829 | static void | 829 | static void |
830 | cancel_request_cb (void *cls, | 830 | cancel_request_cb (void *cls) |
831 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
832 | { | 831 | { |
832 | struct RPSPeer *rps_peer = cls; | ||
833 | struct PendingReply *pending_rep; | 833 | struct PendingReply *pending_rep; |
834 | struct RPSPeer *rps_peer = (struct RPSPeer *) cls; | ||
835 | 834 | ||
836 | if (GNUNET_YES == in_shutdown) | 835 | if (GNUNET_YES == in_shutdown) |
837 | return; | 836 | return; |
@@ -1137,8 +1136,9 @@ manage_service_wrapper (unsigned int i, unsigned int j, int delta, | |||
1137 | } | 1136 | } |
1138 | } | 1137 | } |
1139 | 1138 | ||
1139 | |||
1140 | static void | 1140 | static void |
1141 | churn (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1141 | churn (void *cls) |
1142 | { | 1142 | { |
1143 | unsigned int i; | 1143 | unsigned int i; |
1144 | unsigned int j; | 1144 | unsigned int j; |
diff --git a/src/scalarproduct/gnunet-scalarproduct.c b/src/scalarproduct/gnunet-scalarproduct.c index 864e77a69..5811ee57b 100644 --- a/src/scalarproduct/gnunet-scalarproduct.c +++ b/src/scalarproduct/gnunet-scalarproduct.c | |||
@@ -184,8 +184,7 @@ requester_callback (void *cls, | |||
184 | * @param tc unused | 184 | * @param tc unused |
185 | */ | 185 | */ |
186 | static void | 186 | static void |
187 | shutdown_task (void *cls, | 187 | shutdown_task (void *cls) |
188 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
189 | { | 188 | { |
190 | if (NULL != computation) | 189 | if (NULL != computation) |
191 | { | 190 | { |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c index f619f971b..c22b4e09e 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | |||
@@ -1092,8 +1092,7 @@ GSS_handle_alice_client_message (void *cls, | |||
1092 | * @param tc unused | 1092 | * @param tc unused |
1093 | */ | 1093 | */ |
1094 | static void | 1094 | static void |
1095 | shutdown_task (void *cls, | 1095 | shutdown_task (void *cls) |
1096 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1097 | { | 1096 | { |
1098 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1097 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1099 | "Shutting down, initiating cleanup.\n"); | 1098 | "Shutting down, initiating cleanup.\n"); |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c index c17aea999..41cf7d1a8 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | |||
@@ -1137,11 +1137,9 @@ GSS_handle_bob_client_message (void *cls, | |||
1137 | * Task run during shutdown. | 1137 | * Task run during shutdown. |
1138 | * | 1138 | * |
1139 | * @param cls unused | 1139 | * @param cls unused |
1140 | * @param tc unused | ||
1141 | */ | 1140 | */ |
1142 | static void | 1141 | static void |
1143 | shutdown_task (void *cls, | 1142 | shutdown_task (void *cls) |
1144 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1145 | { | 1143 | { |
1146 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1144 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1147 | "Shutting down, initiating cleanup.\n"); | 1145 | "Shutting down, initiating cleanup.\n"); |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c index ab66b8b51..0b7ba00d5 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c | |||
@@ -1313,11 +1313,9 @@ GSS_handle_alice_client_message (void *cls, | |||
1313 | * Task run during shutdown. | 1313 | * Task run during shutdown. |
1314 | * | 1314 | * |
1315 | * @param cls unused | 1315 | * @param cls unused |
1316 | * @param tc unused | ||
1317 | */ | 1316 | */ |
1318 | static void | 1317 | static void |
1319 | shutdown_task (void *cls, | 1318 | shutdown_task (void *cls) |
1320 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1321 | { | 1319 | { |
1322 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1323 | "Shutting down, initiating cleanup.\n"); | 1321 | "Shutting down, initiating cleanup.\n"); |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c index a75f0a671..c9db1e9ae 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c | |||
@@ -1433,11 +1433,9 @@ GSS_handle_bob_client_message (void *cls, | |||
1433 | * Task run during shutdown. | 1433 | * Task run during shutdown. |
1434 | * | 1434 | * |
1435 | * @param cls unused | 1435 | * @param cls unused |
1436 | * @param tc unused | ||
1437 | */ | 1436 | */ |
1438 | static void | 1437 | static void |
1439 | shutdown_task (void *cls, | 1438 | shutdown_task (void *cls) |
1440 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1441 | { | 1439 | { |
1442 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1440 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1443 | "Shutting down, initiating cleanup.\n"); | 1441 | "Shutting down, initiating cleanup.\n"); |
diff --git a/src/secretsharing/gnunet-secretsharing-profiler.c b/src/secretsharing/gnunet-secretsharing-profiler.c index 6d1eea198..917431df4 100644 --- a/src/secretsharing/gnunet-secretsharing-profiler.c +++ b/src/secretsharing/gnunet-secretsharing-profiler.c | |||
@@ -480,11 +480,9 @@ peer_info_cb (void *cb_cls, | |||
480 | * Signature of the main function of a task. | 480 | * Signature of the main function of a task. |
481 | * | 481 | * |
482 | * @param cls closure | 482 | * @param cls closure |
483 | * @param tc context information (why was this task triggered now) | ||
484 | */ | 483 | */ |
485 | static void | 484 | static void |
486 | handle_shutdown (void *cls, | 485 | handle_shutdown (void *cls) |
487 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
488 | { | 486 | { |
489 | in_shutdown = GNUNET_YES; | 487 | in_shutdown = GNUNET_YES; |
490 | 488 | ||
@@ -633,4 +631,3 @@ main (int argc, char **argv) | |||
633 | options, &run, NULL, GNUNET_YES); | 631 | options, &run, NULL, GNUNET_YES); |
634 | return 0; | 632 | return 0; |
635 | } | 633 | } |
636 | |||
diff --git a/src/secretsharing/gnunet-service-secretsharing.c b/src/secretsharing/gnunet-service-secretsharing.c index 81714d279..6babe209a 100644 --- a/src/secretsharing/gnunet-service-secretsharing.c +++ b/src/secretsharing/gnunet-service-secretsharing.c | |||
@@ -703,7 +703,7 @@ keygen_session_destroy (struct KeygenSession *ks) | |||
703 | * @param tc unused | 703 | * @param tc unused |
704 | */ | 704 | */ |
705 | static void | 705 | static void |
706 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 706 | cleanup_task (void *cls) |
707 | { | 707 | { |
708 | while (NULL != decrypt_sessions_head) | 708 | while (NULL != decrypt_sessions_head) |
709 | decrypt_session_destroy (decrypt_sessions_head); | 709 | decrypt_session_destroy (decrypt_sessions_head); |
@@ -2274,4 +2274,3 @@ main (int argc, char *const *argv) | |||
2274 | GNUNET_SERVICE_run (argc, argv, "secretsharing", | 2274 | GNUNET_SERVICE_run (argc, argv, "secretsharing", |
2275 | GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1; | 2275 | GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1; |
2276 | } | 2276 | } |
2277 | |||
diff --git a/src/secretsharing/test_secretsharing_api.c b/src/secretsharing/test_secretsharing_api.c index fbf7681a1..5057d5c33 100644 --- a/src/secretsharing/test_secretsharing_api.c +++ b/src/secretsharing/test_secretsharing_api.c | |||
@@ -47,9 +47,9 @@ static void secret_ready_cb (void *cls, | |||
47 | GNUNET_SCHEDULER_shutdown (); | 47 | GNUNET_SCHEDULER_shutdown (); |
48 | } | 48 | } |
49 | 49 | ||
50 | |||
50 | static void | 51 | static void |
51 | handle_shutdown (void *cls, | 52 | handle_shutdown (void *cls) |
52 | const struct GNUNET_SCHEDULER_TaskContext * tc) | ||
53 | { | 53 | { |
54 | if (NULL != keygen) | 54 | if (NULL != keygen) |
55 | { | 55 | { |
@@ -58,12 +58,13 @@ handle_shutdown (void *cls, | |||
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | |||
61 | static void | 62 | static void |
62 | run (void *cls, | 63 | run (void *cls, |
63 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 64 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
64 | struct GNUNET_TESTING_Peer *peer) | 65 | struct GNUNET_TESTING_Peer *peer) |
65 | { | 66 | { |
66 | struct GNUNET_HashCode session_id; | 67 | struct GNUNET_HashCode session_id; |
67 | struct GNUNET_TIME_Absolute start; | 68 | struct GNUNET_TIME_Absolute start; |
68 | struct GNUNET_TIME_Absolute deadline; | 69 | struct GNUNET_TIME_Absolute deadline; |
69 | 70 | ||
@@ -100,4 +101,3 @@ main (int argc, char **argv) | |||
100 | return ret; | 101 | return ret; |
101 | return (GNUNET_YES == success) ? 0 : 1; | 102 | return (GNUNET_YES == success) ? 0 : 1; |
102 | } | 103 | } |
103 | |||
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 4b65fd737..e9555928a 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -1713,8 +1713,7 @@ handle_client_accept (void *cls, | |||
1713 | * @param tc context information (why was this task triggered now) | 1713 | * @param tc context information (why was this task triggered now) |
1714 | */ | 1714 | */ |
1715 | static void | 1715 | static void |
1716 | shutdown_task (void *cls, | 1716 | shutdown_task (void *cls) |
1717 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1718 | { | 1717 | { |
1719 | while (NULL != incoming_head) | 1718 | while (NULL != incoming_head) |
1720 | incoming_destroy (incoming_head); | 1719 | incoming_destroy (incoming_head); |
@@ -1747,13 +1746,14 @@ shutdown_task (void *cls, | |||
1747 | * @param tc context information (why was this task triggered now) | 1746 | * @param tc context information (why was this task triggered now) |
1748 | */ | 1747 | */ |
1749 | static void | 1748 | static void |
1750 | incoming_timeout_cb (void *cls, | 1749 | incoming_timeout_cb (void *cls) |
1751 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1752 | { | 1750 | { |
1753 | struct Operation *incoming = cls; | 1751 | struct Operation *incoming = cls; |
1752 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1754 | 1753 | ||
1755 | incoming->timeout_task = NULL; | 1754 | incoming->timeout_task = NULL; |
1756 | GNUNET_assert (GNUNET_YES == incoming->is_incoming); | 1755 | GNUNET_assert (GNUNET_YES == incoming->is_incoming); |
1756 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1757 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1757 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1758 | return; | 1758 | return; |
1759 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1759 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c index 0586b8b3d..ff76b27ce 100644 --- a/src/set/gnunet-set-profiler.c +++ b/src/set/gnunet-set-profiler.c | |||
@@ -247,8 +247,7 @@ set_insert_iterator (void *cls, | |||
247 | 247 | ||
248 | 248 | ||
249 | static void | 249 | static void |
250 | handle_shutdown (void *cls, | 250 | handle_shutdown (void *cls) |
251 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
252 | { | 251 | { |
253 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 252 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
254 | "Shutting down set profiler\n"); | 253 | "Shutting down set profiler\n"); |
@@ -393,4 +392,3 @@ main (int argc, char **argv) | |||
393 | options, &pre_run, NULL, GNUNET_YES); | 392 | options, &pre_run, NULL, GNUNET_YES); |
394 | return ret; | 393 | return ret; |
395 | } | 394 | } |
396 | |||
diff --git a/src/set/set_api.c b/src/set/set_api.c index 503c0c9c2..772140269 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c | |||
@@ -275,12 +275,12 @@ handle_copy_lazy (void *cls, | |||
275 | 275 | ||
276 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 276 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
277 | "Handling response to lazy copy\n"); | 277 | "Handling response to lazy copy\n"); |
278 | 278 | ||
279 | GNUNET_CONTAINER_DLL_remove (set->copy_req_head, | 279 | GNUNET_CONTAINER_DLL_remove (set->copy_req_head, |
280 | set->copy_req_tail, | 280 | set->copy_req_tail, |
281 | req); | 281 | req); |
282 | 282 | ||
283 | 283 | ||
284 | // We pass none as operation here, since it doesn't matter when | 284 | // We pass none as operation here, since it doesn't matter when |
285 | // cloning. | 285 | // cloning. |
286 | new_set = create_internal (set->cfg, GNUNET_SET_OPERATION_NONE, &msg->cookie); | 286 | new_set = create_internal (set->cfg, GNUNET_SET_OPERATION_NONE, &msg->cookie); |
@@ -790,11 +790,9 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, | |||
790 | * Connect to the set service in order to listen for requests. | 790 | * Connect to the set service in order to listen for requests. |
791 | * | 791 | * |
792 | * @param cls the `struct GNUNET_SET_ListenHandle *` to connect | 792 | * @param cls the `struct GNUNET_SET_ListenHandle *` to connect |
793 | * @param tc task context if invoked as a task, NULL otherwise | ||
794 | */ | 793 | */ |
795 | static void | 794 | static void |
796 | listen_connect (void *cls, | 795 | listen_connect (void *cls); |
797 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
798 | 796 | ||
799 | 797 | ||
800 | /** | 798 | /** |
@@ -882,11 +880,9 @@ handle_client_listener_error (void *cls, | |||
882 | * Connect to the set service in order to listen for requests. | 880 | * Connect to the set service in order to listen for requests. |
883 | * | 881 | * |
884 | * @param cls the `struct GNUNET_SET_ListenHandle *` to connect | 882 | * @param cls the `struct GNUNET_SET_ListenHandle *` to connect |
885 | * @param tc task context if invoked as a task, NULL otherwise | ||
886 | */ | 883 | */ |
887 | static void | 884 | static void |
888 | listen_connect (void *cls, | 885 | listen_connect (void *cls) |
889 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
890 | { | 886 | { |
891 | static const struct GNUNET_MQ_MessageHandler mq_handlers[] = { | 887 | static const struct GNUNET_MQ_MessageHandler mq_handlers[] = { |
892 | { &handle_request, GNUNET_MESSAGE_TYPE_SET_REQUEST }, | 888 | { &handle_request, GNUNET_MESSAGE_TYPE_SET_REQUEST }, |
@@ -895,9 +891,10 @@ listen_connect (void *cls, | |||
895 | struct GNUNET_SET_ListenHandle *lh = cls; | 891 | struct GNUNET_SET_ListenHandle *lh = cls; |
896 | struct GNUNET_MQ_Envelope *mqm; | 892 | struct GNUNET_MQ_Envelope *mqm; |
897 | struct GNUNET_SET_ListenMessage *msg; | 893 | struct GNUNET_SET_ListenMessage *msg; |
894 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
898 | 895 | ||
899 | if ( (NULL != tc) && | 896 | tc = GNUNET_SCHEDULER_get_task_context (); |
900 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) ) | 897 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
901 | { | 898 | { |
902 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 899 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
903 | "Listener not reconnecting due to shutdown\n"); | 900 | "Listener not reconnecting due to shutdown\n"); |
@@ -947,7 +944,7 @@ GNUNET_SET_listen (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
947 | lh->operation = operation; | 944 | lh->operation = operation; |
948 | lh->app_id = *app_id; | 945 | lh->app_id = *app_id; |
949 | lh->reconnect_backoff = GNUNET_TIME_UNIT_MILLISECONDS; | 946 | lh->reconnect_backoff = GNUNET_TIME_UNIT_MILLISECONDS; |
950 | listen_connect (lh, NULL); | 947 | listen_connect (lh); |
951 | if (NULL == lh->client) | 948 | if (NULL == lh->client) |
952 | { | 949 | { |
953 | GNUNET_free (lh); | 950 | GNUNET_free (lh); |
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 | |||
diff --git a/src/set/test_set_union_copy.c b/src/set/test_set_union_copy.c index 247d91498..fdf6bf9df 100644 --- a/src/set/test_set_union_copy.c +++ b/src/set/test_set_union_copy.c | |||
@@ -73,12 +73,13 @@ remove_element_str (struct GNUNET_SET_Handle *set, char *str) | |||
73 | * Signature of the main function of a task. | 73 | * Signature of the main function of a task. |
74 | * | 74 | * |
75 | * @param cls closure | 75 | * @param cls closure |
76 | * @param tc context information (why was this task triggered now) | ||
77 | */ | 76 | */ |
78 | static void | 77 | static void |
79 | timeout_fail (void *cls, | 78 | timeout_fail (void *cls) |
80 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
81 | { | 79 | { |
80 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
81 | |||
82 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
82 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 83 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
83 | return; | 84 | return; |
84 | GNUNET_SCHEDULER_shutdown (); | 85 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/set/test_set_union_result_symmetric.c b/src/set/test_set_union_result_symmetric.c index 9a49abaf0..b312bcb4c 100644 --- a/src/set/test_set_union_result_symmetric.c +++ b/src/set/test_set_union_result_symmetric.c | |||
@@ -293,12 +293,13 @@ test_iter () | |||
293 | * Signature of the main function of a task. | 293 | * Signature of the main function of a task. |
294 | * | 294 | * |
295 | * @param cls closure | 295 | * @param cls closure |
296 | * @param tc context information (why was this task triggered now) | ||
297 | */ | 296 | */ |
298 | static void | 297 | static void |
299 | timeout_fail (void *cls, | 298 | timeout_fail (void *cls) |
300 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
301 | { | 299 | { |
300 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
301 | |||
302 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
302 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 303 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
303 | return; | 304 | return; |
304 | GNUNET_SCHEDULER_shutdown (); | 305 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 98b1d4b59..1746a82ca 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -421,8 +421,10 @@ psyc_transmit_queue_message (struct Place *plc, | |||
421 | struct MessageTransmitQueue *tmit_msg); | 421 | struct MessageTransmitQueue *tmit_msg); |
422 | 422 | ||
423 | 423 | ||
424 | int | 424 | static int |
425 | place_entry_cleanup (void *cls, const struct GNUNET_HashCode *key, void *value) | 425 | place_entry_cleanup (void *cls, |
426 | const struct GNUNET_HashCode *key, | ||
427 | void *value) | ||
426 | { | 428 | { |
427 | cleanup_place (value); | 429 | cleanup_place (value); |
428 | return GNUNET_YES; | 430 | return GNUNET_YES; |
@@ -433,10 +435,9 @@ place_entry_cleanup (void *cls, const struct GNUNET_HashCode *key, void *value) | |||
433 | * Task run during shutdown. | 435 | * Task run during shutdown. |
434 | * | 436 | * |
435 | * @param cls unused | 437 | * @param cls unused |
436 | * @param tc unused | ||
437 | */ | 438 | */ |
438 | static void | 439 | static void |
439 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 440 | shutdown_task (void *cls) |
440 | { | 441 | { |
441 | GNUNET_CONTAINER_multihashmap_iterate (hosts, place_entry_cleanup, NULL); | 442 | GNUNET_CONTAINER_multihashmap_iterate (hosts, place_entry_cleanup, NULL); |
442 | GNUNET_CONTAINER_multihashmap_iterate (guests, place_entry_cleanup, NULL); | 443 | GNUNET_CONTAINER_multihashmap_iterate (guests, place_entry_cleanup, NULL); |
@@ -541,7 +542,7 @@ cleanup_place (struct Place *plc) | |||
541 | 542 | ||
542 | 543 | ||
543 | static void | 544 | static void |
544 | schedule_cleanup_place (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 545 | schedule_cleanup_place (void *cls) |
545 | { | 546 | { |
546 | cleanup_place (cls); | 547 | cleanup_place (cls); |
547 | } | 548 | } |
diff --git a/src/social/test_social.c b/src/social/test_social.c index 1d2673a11..5eeb20196 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c | |||
@@ -149,7 +149,8 @@ enum | |||
149 | 149 | ||
150 | 150 | ||
151 | static void | 151 | static void |
152 | schedule_guest_leave (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 152 | schedule_guest_leave (void *cls); |
153 | |||
153 | 154 | ||
154 | static void | 155 | static void |
155 | host_answer_door (void *cls, | 156 | host_answer_door (void *cls, |
@@ -229,10 +230,9 @@ cleanup () | |||
229 | * Terminate the test case (failure). | 230 | * Terminate the test case (failure). |
230 | * | 231 | * |
231 | * @param cls NULL | 232 | * @param cls NULL |
232 | * @param tc scheduler context | ||
233 | */ | 233 | */ |
234 | static void | 234 | static void |
235 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 235 | end_badly (void *cls) |
236 | { | 236 | { |
237 | res = 1; | 237 | res = 1; |
238 | cleanup (); | 238 | cleanup (); |
@@ -244,10 +244,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
244 | * Terminate the test case (success). | 244 | * Terminate the test case (success). |
245 | * | 245 | * |
246 | * @param cls NULL | 246 | * @param cls NULL |
247 | * @param tc scheduler context | ||
248 | */ | 247 | */ |
249 | static void | 248 | static void |
250 | end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 249 | end_normally (void *cls) |
251 | { | 250 | { |
252 | res = 0; | 251 | res = 0; |
253 | cleanup (); | 252 | cleanup (); |
@@ -274,7 +273,7 @@ end () | |||
274 | 273 | ||
275 | 274 | ||
276 | static void | 275 | static void |
277 | transmit_resume (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 276 | transmit_resume (void *cls) |
278 | { | 277 | { |
279 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n"); | 278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n"); |
280 | struct TransmitClosure *tmit = cls; | 279 | struct TransmitClosure *tmit = cls; |
@@ -342,7 +341,7 @@ host_left () | |||
342 | 341 | ||
343 | 342 | ||
344 | static void | 343 | static void |
345 | schedule_host_leave (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 344 | schedule_host_leave (void *cls) |
346 | { | 345 | { |
347 | test = TEST_HOST_LEAVE; | 346 | test = TEST_HOST_LEAVE; |
348 | GNUNET_SOCIAL_host_leave (hst, NULL, &host_left, NULL); | 347 | GNUNET_SOCIAL_host_leave (hst, NULL, &host_left, NULL); |
@@ -478,7 +477,7 @@ app_recv_ego (void *cls, | |||
478 | 477 | ||
479 | 478 | ||
480 | static void | 479 | static void |
481 | schedule_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 480 | schedule_reconnect (void *cls) |
482 | { | 481 | { |
483 | test = TEST_RECONNECT; | 482 | test = TEST_RECONNECT; |
484 | 483 | ||
@@ -577,7 +576,7 @@ guest_leave() | |||
577 | 576 | ||
578 | 577 | ||
579 | static void | 578 | static void |
580 | schedule_guest_leave (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 579 | schedule_guest_leave (void *cls) |
581 | { | 580 | { |
582 | guest_leave (); | 581 | guest_leave (); |
583 | } | 582 | } |
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index 3aa3d5897..0126f149b 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c | |||
@@ -967,11 +967,9 @@ do_shutdown () | |||
967 | * Task run during shutdown. | 967 | * Task run during shutdown. |
968 | * | 968 | * |
969 | * @param cls unused | 969 | * @param cls unused |
970 | * @param tc unused | ||
971 | */ | 970 | */ |
972 | static void | 971 | static void |
973 | shutdown_task (void *cls, | 972 | shutdown_task (void *cls) |
974 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
975 | { | 973 | { |
976 | in_shutdown = GNUNET_YES; | 974 | in_shutdown = GNUNET_YES; |
977 | if (0 != client_count) | 975 | if (0 != client_count) |
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index ff1ec39a0..2bf5959e3 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -158,11 +158,9 @@ cleanup (void *cls, int success) | |||
158 | * Function run on shutdown to clean up. | 158 | * Function run on shutdown to clean up. |
159 | * | 159 | * |
160 | * @param cls the statistics handle | 160 | * @param cls the statistics handle |
161 | * @param tc scheduler context | ||
162 | */ | 161 | */ |
163 | static void | 162 | static void |
164 | shutdown_task (void *cls, | 163 | shutdown_task (void *cls) |
165 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
166 | { | 164 | { |
167 | struct GNUNET_STATISTICS_Handle *h = cls; | 165 | struct GNUNET_STATISTICS_Handle *h = cls; |
168 | 166 | ||
@@ -185,8 +183,7 @@ shutdown_task (void *cls, | |||
185 | * @param tc schedueler context | 183 | * @param tc schedueler context |
186 | */ | 184 | */ |
187 | static void | 185 | static void |
188 | main_task (void *cls, | 186 | main_task (void *cls) |
189 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
190 | { | 187 | { |
191 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 188 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
192 | struct GNUNET_STATISTICS_Handle *h; | 189 | struct GNUNET_STATISTICS_Handle *h; |
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 1592483f8..2b491df72 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -462,11 +462,9 @@ try_connect (struct GNUNET_STATISTICS_Handle *h) | |||
462 | * We've waited long enough, reconnect now. | 462 | * We've waited long enough, reconnect now. |
463 | * | 463 | * |
464 | * @param cls the `struct GNUNET_STATISTICS_Handle` to reconnect | 464 | * @param cls the `struct GNUNET_STATISTICS_Handle` to reconnect |
465 | * @param tc scheduler context (unused) | ||
466 | */ | 465 | */ |
467 | static void | 466 | static void |
468 | reconnect_task (void *cls, | 467 | reconnect_task (void *cls) |
469 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
470 | { | 468 | { |
471 | struct GNUNET_STATISTICS_Handle *h = cls; | 469 | struct GNUNET_STATISTICS_Handle *h = cls; |
472 | 470 | ||
@@ -479,11 +477,9 @@ reconnect_task (void *cls, | |||
479 | * Task used by 'reconnect_later' to shutdown the handle | 477 | * Task used by 'reconnect_later' to shutdown the handle |
480 | * | 478 | * |
481 | * @param cls the statistics handle | 479 | * @param cls the statistics handle |
482 | * @param tc scheduler context | ||
483 | */ | 480 | */ |
484 | static void | 481 | static void |
485 | do_destroy (void *cls, | 482 | do_destroy (void *cls) |
486 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
487 | { | 483 | { |
488 | struct GNUNET_STATISTICS_Handle *h = cls; | 484 | struct GNUNET_STATISTICS_Handle *h = cls; |
489 | 485 | ||
@@ -627,11 +623,9 @@ process_watch_value (struct GNUNET_STATISTICS_Handle *h, | |||
627 | * Task used to destroy the statistics handle. | 623 | * Task used to destroy the statistics handle. |
628 | * | 624 | * |
629 | * @param cls the `struct GNUNET_STATISTICS_Handle` | 625 | * @param cls the `struct GNUNET_STATISTICS_Handle` |
630 | * @param tc the scheduler context | ||
631 | */ | 626 | */ |
632 | static void | 627 | static void |
633 | destroy_task (void *cls, | 628 | destroy_task (void *cls) |
634 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
635 | { | 629 | { |
636 | struct GNUNET_STATISTICS_Handle *h = cls; | 630 | struct GNUNET_STATISTICS_Handle *h = cls; |
637 | 631 | ||
@@ -1159,11 +1153,9 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h) | |||
1159 | * call the continuation. | 1153 | * call the continuation. |
1160 | * | 1154 | * |
1161 | * @param cls the `struct GNUNET_STATISTICS_GetHandle` | 1155 | * @param cls the `struct GNUNET_STATISTICS_GetHandle` |
1162 | * @param tc scheduler context | ||
1163 | */ | 1156 | */ |
1164 | static void | 1157 | static void |
1165 | run_get_timeout (void *cls, | 1158 | run_get_timeout (void *cls) |
1166 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1167 | { | 1159 | { |
1168 | struct GNUNET_STATISTICS_GetHandle *gh = cls; | 1160 | struct GNUNET_STATISTICS_GetHandle *gh = cls; |
1169 | GNUNET_STATISTICS_Callback cont = gh->cont; | 1161 | GNUNET_STATISTICS_Callback cont = gh->cont; |
diff --git a/src/statistics/test_statistics_api_watch.c b/src/statistics/test_statistics_api_watch.c index defa20a07..c7fe54b1f 100644 --- a/src/statistics/test_statistics_api_watch.c +++ b/src/statistics/test_statistics_api_watch.c | |||
@@ -33,11 +33,11 @@ static struct GNUNET_STATISTICS_Handle *h; | |||
33 | 33 | ||
34 | static struct GNUNET_STATISTICS_Handle *h2; | 34 | static struct GNUNET_STATISTICS_Handle *h2; |
35 | 35 | ||
36 | static struct GNUNET_SCHEDULER_Task * shutdown_task; | 36 | static struct GNUNET_SCHEDULER_Task *shutdown_task; |
37 | 37 | ||
38 | 38 | ||
39 | static void | 39 | static void |
40 | force_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 40 | force_shutdown (void *cls) |
41 | { | 41 | { |
42 | fprintf (stderr, "Timeout, failed to receive notifications: %d\n", ok); | 42 | fprintf (stderr, "Timeout, failed to receive notifications: %d\n", ok); |
43 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); | 43 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); |
@@ -47,7 +47,7 @@ force_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
47 | 47 | ||
48 | 48 | ||
49 | static void | 49 | static void |
50 | normal_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 50 | normal_shutdown (void *cls) |
51 | { | 51 | { |
52 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); | 52 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); |
53 | GNUNET_STATISTICS_destroy (h2, GNUNET_NO); | 53 | GNUNET_STATISTICS_destroy (h2, GNUNET_NO); |
diff --git a/src/statistics/test_statistics_api_watch_zero_value.c b/src/statistics/test_statistics_api_watch_zero_value.c index edfc9f85c..8bf656ed0 100644 --- a/src/statistics/test_statistics_api_watch_zero_value.c +++ b/src/statistics/test_statistics_api_watch_zero_value.c | |||
@@ -33,11 +33,11 @@ static struct GNUNET_STATISTICS_Handle *h; | |||
33 | 33 | ||
34 | static struct GNUNET_STATISTICS_Handle *h2; | 34 | static struct GNUNET_STATISTICS_Handle *h2; |
35 | 35 | ||
36 | static struct GNUNET_SCHEDULER_Task * shutdown_task; | 36 | static struct GNUNET_SCHEDULER_Task *shutdown_task; |
37 | 37 | ||
38 | 38 | ||
39 | static void | 39 | static void |
40 | force_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 40 | force_shutdown (void *cls) |
41 | { | 41 | { |
42 | fprintf (stderr, "Timeout, failed to receive notifications: %d\n", ok); | 42 | fprintf (stderr, "Timeout, failed to receive notifications: %d\n", ok); |
43 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); | 43 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); |
@@ -47,7 +47,7 @@ force_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
47 | 47 | ||
48 | 48 | ||
49 | static void | 49 | static void |
50 | normal_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 50 | normal_shutdown (void *cls) |
51 | { | 51 | { |
52 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); | 52 | GNUNET_STATISTICS_destroy (h, GNUNET_NO); |
53 | GNUNET_STATISTICS_destroy (h2, GNUNET_NO); | 53 | GNUNET_STATISTICS_destroy (h2, GNUNET_NO); |
diff --git a/src/template/gnunet-service-template.c b/src/template/gnunet-service-template.c index 4125311fe..556d44bd8 100644 --- a/src/template/gnunet-service-template.c +++ b/src/template/gnunet-service-template.c | |||
@@ -31,10 +31,9 @@ | |||
31 | * Task run during shutdown. | 31 | * Task run during shutdown. |
32 | * | 32 | * |
33 | * @param cls unused | 33 | * @param cls unused |
34 | * @param tc unused | ||
35 | */ | 34 | */ |
36 | static void | 35 | static void |
37 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 36 | cleanup_task (void *cls) |
38 | { | 37 | { |
39 | /* FIXME: do clean up here */ | 38 | /* FIXME: do clean up here */ |
40 | } | 39 | } |
diff --git a/src/testbed/gnunet-daemon-latency-logger.c b/src/testbed/gnunet-daemon-latency-logger.c index 84d8e223a..9652721a1 100644 --- a/src/testbed/gnunet-daemon-latency-logger.c +++ b/src/testbed/gnunet-daemon-latency-logger.c | |||
@@ -131,11 +131,10 @@ free_iterator (void *cls, | |||
131 | * Shutdown | 131 | * Shutdown |
132 | * | 132 | * |
133 | * @param cls NULL | 133 | * @param cls NULL |
134 | * @param tc task context from scheduler | ||
135 | * @return | 134 | * @return |
136 | */ | 135 | */ |
137 | static void | 136 | static void |
138 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 137 | do_shutdown (void *cls) |
139 | { | 138 | { |
140 | shutdown_task = NULL; | 139 | shutdown_task = NULL; |
141 | GNUNET_ATS_performance_done (ats); | 140 | GNUNET_ATS_performance_done (ats); |
diff --git a/src/testbed/gnunet-daemon-testbed-blacklist.c b/src/testbed/gnunet-daemon-testbed-blacklist.c index ed1c061a0..0e0c7ebd5 100644 --- a/src/testbed/gnunet-daemon-testbed-blacklist.c +++ b/src/testbed/gnunet-daemon-testbed-blacklist.c | |||
@@ -121,10 +121,9 @@ cleanup_map () | |||
121 | * Shutdown task to cleanup our resources and exit. | 121 | * Shutdown task to cleanup our resources and exit. |
122 | * | 122 | * |
123 | * @param cls NULL | 123 | * @param cls NULL |
124 | * @param tc scheduler task context | ||
125 | */ | 124 | */ |
126 | static void | 125 | static void |
127 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 126 | do_shutdown (void *cls) |
128 | { | 127 | { |
129 | cleanup_map (); | 128 | cleanup_map (); |
130 | if (NULL != bh) | 129 | if (NULL != bh) |
diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c index c4dbc5178..ce0cc46d9 100644 --- a/src/testbed/gnunet-daemon-testbed-underlay.c +++ b/src/testbed/gnunet-daemon-testbed-underlay.c | |||
@@ -286,10 +286,9 @@ unload_keys () | |||
286 | * Shutdown task to cleanup our resources and exit. | 286 | * Shutdown task to cleanup our resources and exit. |
287 | * | 287 | * |
288 | * @param cls NULL | 288 | * @param cls NULL |
289 | * @param tc scheduler task context | ||
290 | */ | 289 | */ |
291 | static void | 290 | static void |
292 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 291 | do_shutdown (void *cls) |
293 | { | 292 | { |
294 | if (NULL != transport) | 293 | if (NULL != transport) |
295 | { | 294 | { |
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c index 4cde1b4d0..b43f10983 100644 --- a/src/testbed/gnunet-helper-testbed.c +++ b/src/testbed/gnunet-helper-testbed.c | |||
@@ -156,10 +156,9 @@ static int status; | |||
156 | * Task to shut down cleanly | 156 | * Task to shut down cleanly |
157 | * | 157 | * |
158 | * @param cls NULL | 158 | * @param cls NULL |
159 | * @param tc the task context | ||
160 | */ | 159 | */ |
161 | static void | 160 | static void |
162 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 161 | shutdown_task (void *cls) |
163 | { | 162 | { |
164 | LOG_DEBUG ("Shutting down\n"); | 163 | LOG_DEBUG ("Shutting down\n"); |
165 | shutdown_task_id = NULL; | 164 | shutdown_task_id = NULL; |
@@ -219,16 +218,17 @@ shutdown_now (void) | |||
219 | * Task to write to the standard out | 218 | * Task to write to the standard out |
220 | * | 219 | * |
221 | * @param cls the WriteContext | 220 | * @param cls the WriteContext |
222 | * @param tc the TaskContext | ||
223 | */ | 221 | */ |
224 | static void | 222 | static void |
225 | write_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 223 | write_task (void *cls) |
226 | { | 224 | { |
227 | struct WriteContext *wc = cls; | 225 | struct WriteContext *wc = cls; |
228 | ssize_t bytes_wrote; | 226 | ssize_t bytes_wrote; |
227 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
229 | 228 | ||
230 | GNUNET_assert (NULL != wc); | 229 | GNUNET_assert (NULL != wc); |
231 | write_task_id = NULL; | 230 | write_task_id = NULL; |
231 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
232 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 232 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
233 | { | 233 | { |
234 | GNUNET_free (wc->data); | 234 | GNUNET_free (wc->data); |
@@ -263,19 +263,20 @@ write_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
263 | * process died). | 263 | * process died). |
264 | * | 264 | * |
265 | * @param cls closure, NULL if we need to self-restart | 265 | * @param cls closure, NULL if we need to self-restart |
266 | * @param tc context | ||
267 | */ | 266 | */ |
268 | static void | 267 | static void |
269 | child_death_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 268 | child_death_task (void *cls) |
270 | { | 269 | { |
271 | const struct GNUNET_DISK_FileHandle *pr; | 270 | const struct GNUNET_DISK_FileHandle *pr; |
272 | char c[16]; | 271 | char c[16]; |
273 | enum GNUNET_OS_ProcessStatusType type; | 272 | enum GNUNET_OS_ProcessStatusType type; |
274 | unsigned long code; | 273 | unsigned long code; |
275 | int ret; | 274 | int ret; |
275 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
276 | 276 | ||
277 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); | 277 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); |
278 | child_death_task_id = NULL; | 278 | child_death_task_id = NULL; |
279 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
279 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 280 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
280 | { | 281 | { |
281 | child_death_task_id = | 282 | child_death_task_id = |
@@ -518,15 +519,16 @@ error: | |||
518 | * Task to read from stdin | 519 | * Task to read from stdin |
519 | * | 520 | * |
520 | * @param cls NULL | 521 | * @param cls NULL |
521 | * @param tc the task context | ||
522 | */ | 522 | */ |
523 | static void | 523 | static void |
524 | read_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 524 | read_task (void *cls) |
525 | { | 525 | { |
526 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE]; | 526 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE]; |
527 | ssize_t sread; | 527 | ssize_t sread; |
528 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
528 | 529 | ||
529 | read_task_id = NULL; | 530 | read_task_id = NULL; |
531 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
530 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 532 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
531 | return; | 533 | return; |
532 | sread = GNUNET_DISK_file_read (stdin_fd, buf, sizeof (buf)); | 534 | sread = GNUNET_DISK_file_read (stdin_fd, buf, sizeof (buf)); |
diff --git a/src/testbed/gnunet-service-test-barriers.c b/src/testbed/gnunet-service-test-barriers.c index 444cb4a6d..281172cbf 100644 --- a/src/testbed/gnunet-service-test-barriers.c +++ b/src/testbed/gnunet-service-test-barriers.c | |||
@@ -46,10 +46,9 @@ struct GNUNET_TESTBED_BarrierWaitHandle *wh; | |||
46 | * Dummy task callback to keep us running forever | 46 | * Dummy task callback to keep us running forever |
47 | * | 47 | * |
48 | * @param cls NULL | 48 | * @param cls NULL |
49 | * @param tc scheduler task context | ||
50 | */ | 49 | */ |
51 | static void | 50 | static void |
52 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 51 | do_shutdown (void *cls) |
53 | { | 52 | { |
54 | if (NULL != wh) | 53 | if (NULL != wh) |
55 | GNUNET_TESTBED_barrier_wait_cancel (wh); | 54 | GNUNET_TESTBED_barrier_wait_cancel (wh); |
@@ -80,12 +79,14 @@ barrier_wait_cb (void *cls, const char *name, int status) | |||
80 | * Task to wait for the barrier | 79 | * Task to wait for the barrier |
81 | * | 80 | * |
82 | * @param cls NULL | 81 | * @param cls NULL |
83 | * @param tc scheduler task context | ||
84 | * @return | 82 | * @return |
85 | */ | 83 | */ |
86 | static void | 84 | static void |
87 | do_wait (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 85 | do_wait (void *cls) |
88 | { | 86 | { |
87 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
88 | |||
89 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
89 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 90 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
90 | return; | 91 | return; |
91 | wh = GNUNET_TESTBED_barrier_wait (TEST_BARRIER_NAME, &barrier_wait_cb, NULL); | 92 | wh = GNUNET_TESTBED_barrier_wait (TEST_BARRIER_NAME, &barrier_wait_cb, NULL); |
diff --git a/src/testbed/gnunet-service-testbed-logger.c b/src/testbed/gnunet-service-testbed-logger.c index bd52b8d52..ab5b17460 100644 --- a/src/testbed/gnunet-service-testbed-logger.c +++ b/src/testbed/gnunet-service-testbed-logger.c | |||
@@ -119,10 +119,9 @@ handle_log_msg (void *cls, struct GNUNET_SERVER_Client *client, | |||
119 | * Task to clean up and shutdown nicely | 119 | * Task to clean up and shutdown nicely |
120 | * | 120 | * |
121 | * @param cls NULL | 121 | * @param cls NULL |
122 | * @param tc the TaskContext from scheduler | ||
123 | */ | 122 | */ |
124 | static void | 123 | static void |
125 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 124 | shutdown_task (void *cls) |
126 | { | 125 | { |
127 | struct MessageQueue *mq_entry; | 126 | struct MessageQueue *mq_entry; |
128 | 127 | ||
@@ -155,7 +154,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
155 | * @param client identification of the client; NULL | 154 | * @param client identification of the client; NULL |
156 | * for the last call when the server is destroyed | 155 | * for the last call when the server is destroyed |
157 | */ | 156 | */ |
158 | static void | 157 | static void |
159 | client_disconnected (void *cls, struct GNUNET_SERVER_Client *client) | 158 | client_disconnected (void *cls, struct GNUNET_SERVER_Client *client) |
160 | { | 159 | { |
161 | if (NULL == client) | 160 | if (NULL == client) |
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 68878b69b..e4fe87fcd 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -405,11 +405,9 @@ GST_forwarded_operation_reply_relay (void *cls, | |||
405 | * Task to free resources when forwarded operation has been timedout | 405 | * Task to free resources when forwarded operation has been timedout |
406 | * | 406 | * |
407 | * @param cls the ForwardedOperationContext | 407 | * @param cls the ForwardedOperationContext |
408 | * @param tc the task context from scheduler | ||
409 | */ | 408 | */ |
410 | void | 409 | void |
411 | GST_forwarded_operation_timeout (void *cls, | 410 | GST_forwarded_operation_timeout (void *cls) |
412 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
413 | { | 411 | { |
414 | struct ForwardedOperationContext *fopc = cls; | 412 | struct ForwardedOperationContext *fopc = cls; |
415 | 413 | ||
@@ -776,10 +774,9 @@ GST_clear_fopcq () | |||
776 | * Task to clean up and shutdown nicely | 774 | * Task to clean up and shutdown nicely |
777 | * | 775 | * |
778 | * @param cls NULL | 776 | * @param cls NULL |
779 | * @param tc the TaskContext from scheduler | ||
780 | */ | 777 | */ |
781 | static void | 778 | static void |
782 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 779 | shutdown_task (void *cls) |
783 | { | 780 | { |
784 | struct MessageQueue *mq_entry; | 781 | struct MessageQueue *mq_entry; |
785 | uint32_t id; | 782 | uint32_t id; |
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h index 825056880..b19d3c516 100644 --- a/src/testbed/gnunet-service-testbed.h +++ b/src/testbed/gnunet-service-testbed.h | |||
@@ -590,8 +590,7 @@ GST_forwarded_operation_reply_relay (void *cls, | |||
590 | * @param tc the task context from scheduler | 590 | * @param tc the task context from scheduler |
591 | */ | 591 | */ |
592 | void | 592 | void |
593 | GST_forwarded_operation_timeout (void *cls, | 593 | GST_forwarded_operation_timeout (void *cls); |
594 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
595 | 594 | ||
596 | 595 | ||
597 | /** | 596 | /** |
diff --git a/src/testbed/gnunet-service-testbed_barriers.c b/src/testbed/gnunet-service-testbed_barriers.c index e1992cccb..5b081ed12 100644 --- a/src/testbed/gnunet-service-testbed_barriers.c +++ b/src/testbed/gnunet-service-testbed_barriers.c | |||
@@ -672,10 +672,9 @@ wbarrier_status_cb (void *cls, const char *name, | |||
672 | * subcontrollers to barrier init message | 672 | * subcontrollers to barrier init message |
673 | * | 673 | * |
674 | * @param cls barrier | 674 | * @param cls barrier |
675 | * @param tc scheduler task context | ||
676 | */ | 675 | */ |
677 | static void | 676 | static void |
678 | fwd_tout_barrier_init (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 677 | fwd_tout_barrier_init (void *cls) |
679 | { | 678 | { |
680 | struct Barrier *barrier = cls; | 679 | struct Barrier *barrier = cls; |
681 | 680 | ||
diff --git a/src/testbed/gnunet-service-testbed_connectionpool.c b/src/testbed/gnunet-service-testbed_connectionpool.c index e06538ac7..0fa2a6456 100644 --- a/src/testbed/gnunet-service-testbed_connectionpool.c +++ b/src/testbed/gnunet-service-testbed_connectionpool.c | |||
@@ -333,11 +333,9 @@ destroy_pooled_connection (struct PooledConnection *entry) | |||
333 | * Expire a #PooledConnection object | 333 | * Expire a #PooledConnection object |
334 | * | 334 | * |
335 | * @param cls the #PooledConnection object | 335 | * @param cls the #PooledConnection object |
336 | * @param tc scheduler task context | ||
337 | */ | 336 | */ |
338 | static void | 337 | static void |
339 | expire (void *cls, | 338 | expire (void *cls) |
340 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
341 | { | 339 | { |
342 | struct PooledConnection *entry = cls; | 340 | struct PooledConnection *entry = cls; |
343 | 341 | ||
@@ -429,10 +427,9 @@ search_waiting (const struct PooledConnection *entry, | |||
429 | * further schedules itself if there are similar waiting objects which can be notified. | 427 | * further schedules itself if there are similar waiting objects which can be notified. |
430 | * | 428 | * |
431 | * @param cls the #PooledConnection object | 429 | * @param cls the #PooledConnection object |
432 | * @param tc the task context from scheduler | ||
433 | */ | 430 | */ |
434 | static void | 431 | static void |
435 | connection_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 432 | connection_ready (void *cls) |
436 | { | 433 | { |
437 | struct PooledConnection *entry = cls; | 434 | struct PooledConnection *entry = cls; |
438 | struct GST_ConnectionPool_GetHandle *gh; | 435 | struct GST_ConnectionPool_GetHandle *gh; |
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index 066c680b3..cda669caa 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c | |||
@@ -646,7 +646,7 @@ get_nproc () | |||
646 | 646 | ||
647 | 647 | ||
648 | static void | 648 | static void |
649 | sample_load_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 649 | sample_load_task (void *cls) |
650 | { | 650 | { |
651 | struct GNUNET_TIME_Absolute now; | 651 | struct GNUNET_TIME_Absolute now; |
652 | char *str; | 652 | char *str; |
@@ -655,8 +655,10 @@ sample_load_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
655 | int ld_disk; | 655 | int ld_disk; |
656 | unsigned int mem_usage; | 656 | unsigned int mem_usage; |
657 | unsigned int nproc; | 657 | unsigned int nproc; |
658 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
658 | 659 | ||
659 | sample_load_task_id = NULL; | 660 | sample_load_task_id = NULL; |
661 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
660 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 662 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
661 | return; | 663 | return; |
662 | ld_cpu = cpu_get_load (); | 664 | ld_cpu = cpu_get_load (); |
diff --git a/src/testbed/gnunet-service-testbed_links.c b/src/testbed/gnunet-service-testbed_links.c index 9fbc3197e..a2692e8a6 100644 --- a/src/testbed/gnunet-service-testbed_links.c +++ b/src/testbed/gnunet-service-testbed_links.c | |||
@@ -585,10 +585,9 @@ send_controller_link_response (struct GNUNET_SERVER_Client *client, | |||
585 | * The Link Controller forwarding task | 585 | * The Link Controller forwarding task |
586 | * | 586 | * |
587 | * @param cls the LCFContext | 587 | * @param cls the LCFContext |
588 | * @param tc the Task context from scheduler | ||
589 | */ | 588 | */ |
590 | static void | 589 | static void |
591 | lcf_proc_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 590 | lcf_proc_task (void *cls); |
592 | 591 | ||
593 | 592 | ||
594 | /** | 593 | /** |
@@ -634,21 +633,18 @@ registration_error: | |||
634 | * The Link Controller forwarding task | 633 | * The Link Controller forwarding task |
635 | * | 634 | * |
636 | * @param cls the LCFContext | 635 | * @param cls the LCFContext |
637 | * @param tc the Task context from scheduler | ||
638 | */ | 636 | */ |
639 | static void | 637 | static void |
640 | lcf_proc_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 638 | lcf_proc_task (void *cls); |
641 | 639 | ||
642 | 640 | ||
643 | /** | 641 | /** |
644 | * Task to free resources when forwarded link controllers has been timedout | 642 | * Task to free resources when forwarded link controllers has been timedout |
645 | * | 643 | * |
646 | * @param cls the LCFContext | 644 | * @param cls the LCFContext |
647 | * @param tc the task context from scheduler | ||
648 | */ | 645 | */ |
649 | static void | 646 | static void |
650 | lcf_forwarded_operation_timeout (void *cls, | 647 | lcf_forwarded_operation_timeout (void *cls) |
651 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
652 | { | 648 | { |
653 | struct LCFContext *lcf = cls; | 649 | struct LCFContext *lcf = cls; |
654 | 650 | ||
@@ -668,10 +664,9 @@ lcf_forwarded_operation_timeout (void *cls, | |||
668 | * The Link Controller forwarding task | 664 | * The Link Controller forwarding task |
669 | * | 665 | * |
670 | * @param cls the LCFContext | 666 | * @param cls the LCFContext |
671 | * @param tc the Task context from scheduler | ||
672 | */ | 667 | */ |
673 | static void | 668 | static void |
674 | lcf_proc_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 669 | lcf_proc_task (void *cls) |
675 | { | 670 | { |
676 | struct LCFContext *lcf = cls; | 671 | struct LCFContext *lcf = cls; |
677 | struct LCFContextQueue *lcfq; | 672 | struct LCFContextQueue *lcfq; |
@@ -852,11 +847,9 @@ trigger_notifications (struct Neighbour *n); | |||
852 | * neighbour | 847 | * neighbour |
853 | * | 848 | * |
854 | * @param cls the neighbour | 849 | * @param cls the neighbour |
855 | * @param tc scheduler task context | ||
856 | */ | 850 | */ |
857 | static void | 851 | static void |
858 | neighbour_connect_notify_task (void *cls, | 852 | neighbour_connect_notify_task (void *cls) |
859 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
860 | { | 853 | { |
861 | struct Neighbour *n = cls; | 854 | struct Neighbour *n = cls; |
862 | struct NeighbourConnectNotification *h; | 855 | struct NeighbourConnectNotification *h; |
@@ -1118,11 +1111,9 @@ GST_free_nccq () | |||
1118 | * Task to be run upon timeout while attempting to connect to the neighbour | 1111 | * Task to be run upon timeout while attempting to connect to the neighbour |
1119 | * | 1112 | * |
1120 | * @param cls the NeighbourConnectCtxt created in GST_handle_link_controllers() | 1113 | * @param cls the NeighbourConnectCtxt created in GST_handle_link_controllers() |
1121 | * @param tc the scheduler task context | ||
1122 | */ | 1114 | */ |
1123 | static void | 1115 | static void |
1124 | timeout_neighbour_connect (void *cls, | 1116 | timeout_neighbour_connect (void *cls) |
1125 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1126 | { | 1117 | { |
1127 | struct NeighbourConnectCtxt *ncc = cls; | 1118 | struct NeighbourConnectCtxt *ncc = cls; |
1128 | 1119 | ||
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 6bb4ec4fb..34bf8e047 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -362,12 +362,9 @@ GST_cleanup_focc (struct ForwardedOverlayConnectContext *focc) | |||
362 | * Timeout task for cancelling a forwarded overlay connect connect | 362 | * Timeout task for cancelling a forwarded overlay connect connect |
363 | * | 363 | * |
364 | * @param cls the ForwardedOverlayConnectContext | 364 | * @param cls the ForwardedOverlayConnectContext |
365 | * @param tc the task context from the scheduler | ||
366 | */ | 365 | */ |
367 | static void | 366 | static void |
368 | forwarded_overlay_connect_timeout (void *cls, | 367 | forwarded_overlay_connect_timeout (void *cls) |
369 | const struct GNUNET_SCHEDULER_TaskContext | ||
370 | *tc) | ||
371 | { | 368 | { |
372 | struct ForwardedOperationContext *fopc = cls; | 369 | struct ForwardedOperationContext *fopc = cls; |
373 | struct RegisteredHostContext *rhc; | 370 | struct RegisteredHostContext *rhc; |
@@ -379,7 +376,7 @@ forwarded_overlay_connect_timeout (void *cls, | |||
379 | LOG_DEBUG ("Overlay linking between peers %u and %u failed\n", focc->peer1, | 376 | LOG_DEBUG ("Overlay linking between peers %u and %u failed\n", focc->peer1, |
380 | focc->peer2); | 377 | focc->peer2); |
381 | GST_cleanup_focc (focc); | 378 | GST_cleanup_focc (focc); |
382 | GST_forwarded_operation_timeout (fopc, tc); | 379 | GST_forwarded_operation_timeout (fopc); |
383 | if (NULL != rhc->focc_dll_head) | 380 | if (NULL != rhc->focc_dll_head) |
384 | GST_process_next_focc (rhc); | 381 | GST_process_next_focc (rhc); |
385 | } | 382 | } |
@@ -573,11 +570,9 @@ cleanup_occ (struct OverlayConnectContext *occ) | |||
573 | * Task for cleaing up overlay connect context structure | 570 | * Task for cleaing up overlay connect context structure |
574 | * | 571 | * |
575 | * @param cls the overlay connect context | 572 | * @param cls the overlay connect context |
576 | * @param tc the task context | ||
577 | */ | 573 | */ |
578 | static void | 574 | static void |
579 | do_cleanup_occ (void *cls, | 575 | do_cleanup_occ (void *cls) |
580 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
581 | { | 576 | { |
582 | struct OverlayConnectContext *occ = cls; | 577 | struct OverlayConnectContext *occ = cls; |
583 | 578 | ||
@@ -590,11 +585,9 @@ do_cleanup_occ (void *cls, | |||
590 | * Task which will be run when overlay connect request has been timed out | 585 | * Task which will be run when overlay connect request has been timed out |
591 | * | 586 | * |
592 | * @param cls the OverlayConnectContext | 587 | * @param cls the OverlayConnectContext |
593 | * @param tc the TaskContext | ||
594 | */ | 588 | */ |
595 | static void | 589 | static void |
596 | timeout_overlay_connect (void *cls, | 590 | timeout_overlay_connect (void *cls) |
597 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
598 | { | 591 | { |
599 | struct OverlayConnectContext *occ = cls; | 592 | struct OverlayConnectContext *occ = cls; |
600 | 593 | ||
@@ -777,29 +770,27 @@ occ_cache_get_handle_ats_rocc_cb (void *cls, | |||
777 | * peer 1. | 770 | * peer 1. |
778 | * | 771 | * |
779 | * @param cls the OverlayConnectContext | 772 | * @param cls the OverlayConnectContext |
780 | * @param tc the TaskContext from scheduler | ||
781 | */ | 773 | */ |
782 | static void | 774 | static void |
783 | send_hello (void *cls, | 775 | send_hello (void *cls); |
784 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
785 | 776 | ||
786 | 777 | ||
787 | /** | 778 | /** |
788 | * Task that is run when hello has been sent | 779 | * Task that is run when hello has been sent If tc->reason = |
780 | * #GNUNET_SCHEDULER_REASON_TIMEOUT then sending HELLO failed; if | ||
781 | * #GNUNET_SCHEDULER_REASON_READ_READY is succeeded | ||
789 | * | 782 | * |
790 | * @param cls the overlay connect context | 783 | * @param cls the overlay connect context |
791 | * @param tc the scheduler task context; if tc->reason = | ||
792 | * #GNUNET_SCHEDULER_REASON_TIMEOUT then sending HELLO failed; if | ||
793 | * #GNUNET_SCHEDULER_REASON_READ_READY is succeeded | ||
794 | */ | 784 | */ |
795 | static void | 785 | static void |
796 | occ_hello_sent_cb (void *cls, | 786 | occ_hello_sent_cb (void *cls) |
797 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
798 | { | 787 | { |
799 | struct OverlayConnectContext *occ = cls; | 788 | struct OverlayConnectContext *occ = cls; |
800 | struct LocalPeer2Context *lp2c; | 789 | struct LocalPeer2Context *lp2c; |
801 | struct Peer *peer2; | 790 | struct Peer *peer2; |
791 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
802 | 792 | ||
793 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
803 | GNUNET_assert (OCC_TYPE_LOCAL == occ->type); | 794 | GNUNET_assert (OCC_TYPE_LOCAL == occ->type); |
804 | GNUNET_assert (NULL != occ->timeout_task); | 795 | GNUNET_assert (NULL != occ->timeout_task); |
805 | lp2c = &occ->p2ctx.local; | 796 | lp2c = &occ->p2ctx.local; |
@@ -881,18 +872,18 @@ send_hello_thru_rocc (struct OverlayConnectContext *occ) | |||
881 | * send_hello_thru_rocc() | 872 | * send_hello_thru_rocc() |
882 | * | 873 | * |
883 | * @param cls the OverlayConnectContext | 874 | * @param cls the OverlayConnectContext |
884 | * @param tc the TaskContext from scheduler | ||
885 | */ | 875 | */ |
886 | static void | 876 | static void |
887 | send_hello (void *cls, | 877 | send_hello (void *cls) |
888 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
889 | { | 878 | { |
890 | struct OverlayConnectContext *occ = cls; | 879 | struct OverlayConnectContext *occ = cls; |
891 | struct LocalPeer2Context *lp2c; | 880 | struct LocalPeer2Context *lp2c; |
892 | char *other_peer_str; | 881 | char *other_peer_str; |
882 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
893 | 883 | ||
894 | occ->send_hello_task = NULL; | 884 | occ->send_hello_task = NULL; |
895 | GNUNET_assert (NULL != occ->timeout_task); | 885 | GNUNET_assert (NULL != occ->timeout_task); |
886 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
896 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 887 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
897 | return; | 888 | return; |
898 | GNUNET_assert (NULL != occ->hello); | 889 | GNUNET_assert (NULL != occ->hello); |
@@ -1652,11 +1643,9 @@ cleanup_rocc (struct RemoteOverlayConnectCtx *rocc) | |||
1652 | * Task to timeout rocc and cleanit up | 1643 | * Task to timeout rocc and cleanit up |
1653 | * | 1644 | * |
1654 | * @param cls the RemoteOverlayConnectCtx | 1645 | * @param cls the RemoteOverlayConnectCtx |
1655 | * @param tc the TaskContext from scheduler | ||
1656 | */ | 1646 | */ |
1657 | static void | 1647 | static void |
1658 | timeout_rocc_task (void *cls, | 1648 | timeout_rocc_task (void *cls) |
1659 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1660 | { | 1649 | { |
1661 | struct RemoteOverlayConnectCtx *rocc = cls; | 1650 | struct RemoteOverlayConnectCtx *rocc = cls; |
1662 | 1651 | ||
@@ -1698,26 +1687,23 @@ cache_transport_peer_connect_notify (void *cls, | |||
1698 | * whose identity is in RemoteOverlayConnectCtx | 1687 | * whose identity is in RemoteOverlayConnectCtx |
1699 | * | 1688 | * |
1700 | * @param cls the RemoteOverlayConnectCtx | 1689 | * @param cls the RemoteOverlayConnectCtx |
1701 | * @param tc the TaskContext from scheduler | ||
1702 | */ | 1690 | */ |
1703 | static void | 1691 | static void |
1704 | attempt_connect_task (void *cls, | 1692 | attempt_connect_task (void *cls); |
1705 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
1706 | 1693 | ||
1707 | 1694 | ||
1708 | /** | 1695 | /** |
1709 | * Task that is run when hello has been sent | 1696 | * Task that is run when hello has been sent If tc->reason = |
1697 | * #GNUNET_SCHEDULER_REASON_TIMEOUT then sending HELLO failed; if | ||
1698 | * #GNUNET_SCHEDULER_REASON_READ_READY is succeeded | ||
1710 | * | 1699 | * |
1711 | * @param cls the overlay connect context | 1700 | * @param cls the overlay connect context |
1712 | * @param tc the scheduler task context; if tc->reason = | ||
1713 | * #GNUNET_SCHEDULER_REASON_TIMEOUT then sending HELLO failed; if | ||
1714 | * #GNUNET_SCHEDULER_REASON_READ_READY is succeeded | ||
1715 | */ | 1701 | */ |
1716 | static void | 1702 | static void |
1717 | rocc_hello_sent_cb (void *cls, | 1703 | rocc_hello_sent_cb (void *cls) |
1718 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1719 | { | 1704 | { |
1720 | struct RemoteOverlayConnectCtx *rocc = cls; | 1705 | struct RemoteOverlayConnectCtx *rocc = cls; |
1706 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1721 | 1707 | ||
1722 | rocc->ohh = NULL; | 1708 | rocc->ohh = NULL; |
1723 | GNUNET_assert (NULL == rocc->attempt_connect_task_id); | 1709 | GNUNET_assert (NULL == rocc->attempt_connect_task_id); |
@@ -1725,6 +1711,7 @@ rocc_hello_sent_cb (void *cls, | |||
1725 | rocc->op_id, | 1711 | rocc->op_id, |
1726 | GNUNET_i2s (&rocc->a_id), | 1712 | GNUNET_i2s (&rocc->a_id), |
1727 | rocc->peer->id); | 1713 | rocc->peer->id); |
1714 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1728 | if (GNUNET_SCHEDULER_REASON_TIMEOUT == tc->reason) | 1715 | if (GNUNET_SCHEDULER_REASON_TIMEOUT == tc->reason) |
1729 | { | 1716 | { |
1730 | GNUNET_break (0); | 1717 | GNUNET_break (0); |
@@ -1754,11 +1741,9 @@ rocc_hello_sent_cb (void *cls, | |||
1754 | * whose identity is in RemoteOverlayConnectCtx | 1741 | * whose identity is in RemoteOverlayConnectCtx |
1755 | * | 1742 | * |
1756 | * @param cls the RemoteOverlayConnectCtx | 1743 | * @param cls the RemoteOverlayConnectCtx |
1757 | * @param tc the TaskContext from scheduler | ||
1758 | */ | 1744 | */ |
1759 | static void | 1745 | static void |
1760 | attempt_connect_task (void *cls, | 1746 | attempt_connect_task (void *cls) |
1761 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1762 | { | 1747 | { |
1763 | struct RemoteOverlayConnectCtx *rocc = cls; | 1748 | struct RemoteOverlayConnectCtx *rocc = cls; |
1764 | 1749 | ||
diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c index a5f1abe4d..ba20d6d6b 100644 --- a/src/testbed/gnunet-service-testbed_peers.c +++ b/src/testbed/gnunet-service-testbed_peers.c | |||
@@ -211,16 +211,14 @@ peer_list_remove (struct Peer *peer) | |||
211 | * timed out | 211 | * timed out |
212 | * | 212 | * |
213 | * @param cls the FowardedOperationContext | 213 | * @param cls the FowardedOperationContext |
214 | * @param tc the TaskContext from the scheduler | ||
215 | */ | 214 | */ |
216 | static void | 215 | static void |
217 | peer_create_forward_timeout (void *cls, | 216 | peer_create_forward_timeout (void *cls) |
218 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
219 | { | 217 | { |
220 | struct ForwardedOperationContext *fopc = cls; | 218 | struct ForwardedOperationContext *fopc = cls; |
221 | 219 | ||
222 | GNUNET_free (fopc->cls); | 220 | GNUNET_free (fopc->cls); |
223 | GST_forwarded_operation_timeout (fopc, tc); | 221 | GST_forwarded_operation_timeout (fopc); |
224 | } | 222 | } |
225 | 223 | ||
226 | 224 | ||
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 350b7379d..308ec0386 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -107,10 +107,9 @@ static int noninteractive; | |||
107 | * Shutdown nicely | 107 | * Shutdown nicely |
108 | * | 108 | * |
109 | * @param cls NULL | 109 | * @param cls NULL |
110 | * @param tc the task context | ||
111 | */ | 110 | */ |
112 | static void | 111 | static void |
113 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | do_shutdown (void *cls) |
114 | { | 113 | { |
115 | shutdown_task = NULL; | 114 | shutdown_task = NULL; |
116 | if (NULL != abort_task) | 115 | if (NULL != abort_task) |
@@ -131,10 +130,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
131 | * abort task to run on test timed out | 130 | * abort task to run on test timed out |
132 | * | 131 | * |
133 | * @param cls NULL | 132 | * @param cls NULL |
134 | * @param tc the task context | ||
135 | */ | 133 | */ |
136 | static void | 134 | static void |
137 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 135 | do_abort (void *cls) |
138 | { | 136 | { |
139 | LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); | 137 | LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); |
140 | abort_task = NULL; | 138 | abort_task = NULL; |
diff --git a/src/testbed/gnunet_testbed_mpi_spawn.c b/src/testbed/gnunet_testbed_mpi_spawn.c index 3fb50cb8f..191f658b7 100644 --- a/src/testbed/gnunet_testbed_mpi_spawn.c +++ b/src/testbed/gnunet_testbed_mpi_spawn.c | |||
@@ -74,7 +74,7 @@ static struct GNUNET_SCHEDULER_Task * child_death_task_id; | |||
74 | * The shutdown task | 74 | * The shutdown task |
75 | */ | 75 | */ |
76 | static void | 76 | static void |
77 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 77 | shutdown_task (void *cls) |
78 | { | 78 | { |
79 | shutdown_task_id = NULL; | 79 | shutdown_task_id = NULL; |
80 | if (0 != child_exit_code) | 80 | if (0 != child_exit_code) |
@@ -96,7 +96,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
96 | 96 | ||
97 | 97 | ||
98 | static void | 98 | static void |
99 | terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 99 | terminate_task (void *cls) |
100 | { | 100 | { |
101 | static int hard_kill; | 101 | static int hard_kill; |
102 | 102 | ||
@@ -131,16 +131,18 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
131 | * process died). | 131 | * process died). |
132 | * | 132 | * |
133 | * @param cls closure, NULL if we need to self-restart | 133 | * @param cls closure, NULL if we need to self-restart |
134 | * @param tc context | ||
135 | */ | 134 | */ |
136 | static void | 135 | static void |
137 | child_death_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 136 | child_death_task (void *cls) |
138 | { | 137 | { |
139 | const struct GNUNET_DISK_FileHandle *pr; | 138 | const struct GNUNET_DISK_FileHandle *pr; |
140 | char c[16]; | 139 | char c[16]; |
140 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
141 | |||
141 | 142 | ||
142 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); | 143 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); |
143 | child_death_task_id = NULL; | 144 | child_death_task_id = NULL; |
145 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
144 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 146 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
145 | { | 147 | { |
146 | child_death_task_id = | 148 | child_death_task_id = |
@@ -179,10 +181,9 @@ destroy_hosts(struct GNUNET_TESTBED_Host **hosts, unsigned int nhosts) | |||
179 | * The main scheduler run task | 181 | * The main scheduler run task |
180 | * | 182 | * |
181 | * @param cls NULL | 183 | * @param cls NULL |
182 | * @param tc scheduler task context | ||
183 | */ | 184 | */ |
184 | static void | 185 | static void |
185 | run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 186 | run (void *cls) |
186 | { | 187 | { |
187 | struct GNUNET_TESTBED_Host **hosts; | 188 | struct GNUNET_TESTBED_Host **hosts; |
188 | const struct GNUNET_CONFIGURATION_Handle *null_cfg; | 189 | const struct GNUNET_CONFIGURATION_Handle *null_cfg; |
diff --git a/src/testbed/test_gnunet_helper_testbed.c b/src/testbed/test_gnunet_helper_testbed.c index ebcfd5a37..7a2dce8a5 100644 --- a/src/testbed/test_gnunet_helper_testbed.c +++ b/src/testbed/test_gnunet_helper_testbed.c | |||
@@ -80,10 +80,9 @@ static int result; | |||
80 | * Shutdown nicely | 80 | * Shutdown nicely |
81 | * | 81 | * |
82 | * @param cls NULL | 82 | * @param cls NULL |
83 | * @param tc the task context | ||
84 | */ | 83 | */ |
85 | static void | 84 | static void |
86 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 85 | do_shutdown (void *cls) |
87 | { | 86 | { |
88 | if (NULL != abort_task) | 87 | if (NULL != abort_task) |
89 | GNUNET_SCHEDULER_cancel (abort_task); | 88 | GNUNET_SCHEDULER_cancel (abort_task); |
@@ -99,10 +98,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
99 | * abort task to run on test timed out | 98 | * abort task to run on test timed out |
100 | * | 99 | * |
101 | * @param cls NULL | 100 | * @param cls NULL |
102 | * @param tc the task context | ||
103 | */ | 101 | */ |
104 | static void | 102 | static void |
105 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 103 | do_abort (void *cls) |
106 | { | 104 | { |
107 | abort_task = NULL; | 105 | abort_task = NULL; |
108 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); | 106 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); |
@@ -118,9 +116,9 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
118 | * Continuation function. | 116 | * Continuation function. |
119 | * | 117 | * |
120 | * @param cls closure | 118 | * @param cls closure |
121 | * @param result GNUNET_OK on success, | 119 | * @param result #GNUNET_OK on success, |
122 | * GNUNET_NO if helper process died | 120 | * #GNUNET_NO if helper process died |
123 | * GNUNET_SYSERR during GNUNET_HELPER_stop | 121 | * #GNUNET_SYSERR during GNUNET_HELPER_stop() |
124 | */ | 122 | */ |
125 | static void | 123 | static void |
126 | cont_cb (void *cls, int result) | 124 | cont_cb (void *cls, int result) |
@@ -141,7 +139,7 @@ cont_cb (void *cls, int result) | |||
141 | * @param client identification of the client | 139 | * @param client identification of the client |
142 | * @param message the actual message | 140 | * @param message the actual message |
143 | * | 141 | * |
144 | * @return GNUNET_OK on success, GNUNET_SYSERR to stop further processing | 142 | * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing |
145 | */ | 143 | */ |
146 | static int | 144 | static int |
147 | mst_cb (void *cls, void *client, const struct GNUNET_MessageHeader *message) | 145 | mst_cb (void *cls, void *client, const struct GNUNET_MessageHeader *message) |
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c index 01207c0d4..fdf9d80f9 100644 --- a/src/testbed/test_testbed_api.c +++ b/src/testbed/test_testbed_api.c | |||
@@ -136,7 +136,7 @@ static enum Test sub_test; | |||
136 | * @param tc the task context | 136 | * @param tc the task context |
137 | */ | 137 | */ |
138 | static void | 138 | static void |
139 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 139 | do_shutdown (void *cls) |
140 | { | 140 | { |
141 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Shutting down...\n"); | 141 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Shutting down...\n"); |
142 | if (NULL != abort_task) | 142 | if (NULL != abort_task) |
@@ -178,11 +178,11 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
178 | * @param tc the task context | 178 | * @param tc the task context |
179 | */ | 179 | */ |
180 | static void | 180 | static void |
181 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 181 | do_abort (void *cls) |
182 | { | 182 | { |
183 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); | 183 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); |
184 | abort_task = NULL; | 184 | abort_task = NULL; |
185 | do_shutdown (cls, tc); | 185 | do_shutdown (cls); |
186 | } | 186 | } |
187 | 187 | ||
188 | 188 | ||
diff --git a/src/testbed/test_testbed_api_2peers_1controller.c b/src/testbed/test_testbed_api_2peers_1controller.c index 0bee03de9..1e15d07aa 100644 --- a/src/testbed/test_testbed_api_2peers_1controller.c +++ b/src/testbed/test_testbed_api_2peers_1controller.c | |||
@@ -186,10 +186,9 @@ static enum Stage result; | |||
186 | * Shutdown nicely | 186 | * Shutdown nicely |
187 | * | 187 | * |
188 | * @param cls NULL | 188 | * @param cls NULL |
189 | * @param tc the task context | ||
190 | */ | 189 | */ |
191 | static void | 190 | static void |
192 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 191 | do_shutdown (void *cls) |
193 | { | 192 | { |
194 | if (NULL != abort_task) | 193 | if (NULL != abort_task) |
195 | GNUNET_SCHEDULER_cancel (abort_task); | 194 | GNUNET_SCHEDULER_cancel (abort_task); |
@@ -210,14 +209,13 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
210 | * abort task to run on test timed out | 209 | * abort task to run on test timed out |
211 | * | 210 | * |
212 | * @param cls NULL | 211 | * @param cls NULL |
213 | * @param tc the task context | ||
214 | */ | 212 | */ |
215 | static void | 213 | static void |
216 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 214 | do_abort (void *cls) |
217 | { | 215 | { |
218 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); | 216 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); |
219 | abort_task = NULL; | 217 | abort_task = NULL; |
220 | do_shutdown (cls, tc); | 218 | do_shutdown (cls); |
221 | } | 219 | } |
222 | 220 | ||
223 | 221 | ||
@@ -237,10 +235,9 @@ op_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg); | |||
237 | * task for delaying a connect | 235 | * task for delaying a connect |
238 | * | 236 | * |
239 | * @param cls NULL | 237 | * @param cls NULL |
240 | * @param tc the task context | ||
241 | */ | 238 | */ |
242 | static void | 239 | static void |
243 | do_delayed_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 240 | do_delayed_connect (void *cls) |
244 | { | 241 | { |
245 | delayed_connect_task = NULL; | 242 | delayed_connect_task = NULL; |
246 | FAIL_TEST (NULL == common_operation); | 243 | FAIL_TEST (NULL == common_operation); |
diff --git a/src/testbed/test_testbed_api_3peers_3controllers.c b/src/testbed/test_testbed_api_3peers_3controllers.c index 5919cbefa..a728048f3 100644 --- a/src/testbed/test_testbed_api_3peers_3controllers.c +++ b/src/testbed/test_testbed_api_3peers_3controllers.c | |||
@@ -254,10 +254,9 @@ static enum Stage result; | |||
254 | * Shutdown nicely | 254 | * Shutdown nicely |
255 | * | 255 | * |
256 | * @param cls NULL | 256 | * @param cls NULL |
257 | * @param tc the task context | ||
258 | */ | 257 | */ |
259 | static void | 258 | static void |
260 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 259 | do_shutdown (void *cls) |
261 | { | 260 | { |
262 | if (NULL != abort_task) | 261 | if (NULL != abort_task) |
263 | GNUNET_SCHEDULER_cancel (abort_task); | 262 | GNUNET_SCHEDULER_cancel (abort_task); |
@@ -288,10 +287,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
288 | * abort task to run on test timed out | 287 | * abort task to run on test timed out |
289 | * | 288 | * |
290 | * @param cls NULL | 289 | * @param cls NULL |
291 | * @param tc the task context | ||
292 | */ | 290 | */ |
293 | static void | 291 | static void |
294 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 292 | do_abort (void *cls) |
295 | { | 293 | { |
296 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); | 294 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); |
297 | abort_task = NULL; | 295 | abort_task = NULL; |
@@ -300,7 +298,7 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
300 | GNUNET_SCHEDULER_cancel (delayed_connect_task); | 298 | GNUNET_SCHEDULER_cancel (delayed_connect_task); |
301 | delayed_connect_task = NULL; | 299 | delayed_connect_task = NULL; |
302 | } | 300 | } |
303 | do_shutdown (cls, tc); | 301 | do_shutdown (cls); |
304 | } | 302 | } |
305 | 303 | ||
306 | static void | 304 | static void |
@@ -328,10 +326,9 @@ op_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg); | |||
328 | * task for delaying a connect | 326 | * task for delaying a connect |
329 | * | 327 | * |
330 | * @param cls NULL | 328 | * @param cls NULL |
331 | * @param tc the task context | ||
332 | */ | 329 | */ |
333 | static void | 330 | static void |
334 | do_delayed_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 331 | do_delayed_connect (void *cls) |
335 | { | 332 | { |
336 | delayed_connect_task = NULL; | 333 | delayed_connect_task = NULL; |
337 | if (NULL != common_operation) | 334 | if (NULL != common_operation) |
diff --git a/src/testbed/test_testbed_api_barriers.c b/src/testbed/test_testbed_api_barriers.c index 0a0f482d9..8ee9c41af 100644 --- a/src/testbed/test_testbed_api_barriers.c +++ b/src/testbed/test_testbed_api_barriers.c | |||
@@ -62,10 +62,9 @@ static int result; | |||
62 | * Shutdown this test case when it takes too long | 62 | * Shutdown this test case when it takes too long |
63 | * | 63 | * |
64 | * @param cls NULL | 64 | * @param cls NULL |
65 | * @param tc scheduler task context | ||
66 | */ | 65 | */ |
67 | static void | 66 | static void |
68 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 67 | do_shutdown (void *cls) |
69 | { | 68 | { |
70 | shutdown_task = NULL; | 69 | shutdown_task = NULL; |
71 | if (NULL != barrier) | 70 | if (NULL != barrier) |
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index 78d4d3bc7..fd876a07f 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c | |||
@@ -300,7 +300,7 @@ static enum Stage result; | |||
300 | if (NULL != abort_task) \ | 300 | if (NULL != abort_task) \ |
301 | GNUNET_SCHEDULER_cancel (abort_task); \ | 301 | GNUNET_SCHEDULER_cancel (abort_task); \ |
302 | abort_task = NULL; \ | 302 | abort_task = NULL; \ |
303 | GNUNET_SCHEDULER_add_now (do_shutdown, NULL); \ | 303 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); \ |
304 | return; \ | 304 | return; \ |
305 | } \ | 305 | } \ |
306 | } while (0) | 306 | } while (0) |
@@ -310,10 +310,9 @@ static enum Stage result; | |||
310 | * Shutdown nicely | 310 | * Shutdown nicely |
311 | * | 311 | * |
312 | * @param cls NULL | 312 | * @param cls NULL |
313 | * @param tc the task context | ||
314 | */ | 313 | */ |
315 | static void | 314 | static void |
316 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 315 | do_shutdown (void *cls) |
317 | { | 316 | { |
318 | if (NULL != abort_task) | 317 | if (NULL != abort_task) |
319 | GNUNET_SCHEDULER_cancel (abort_task); | 318 | GNUNET_SCHEDULER_cancel (abort_task); |
@@ -349,14 +348,13 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
349 | * abort task to run on test timed out | 348 | * abort task to run on test timed out |
350 | * | 349 | * |
351 | * @param cls NULL | 350 | * @param cls NULL |
352 | * @param tc the task context | ||
353 | */ | 351 | */ |
354 | static void | 352 | static void |
355 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 353 | do_abort (void *cls) |
356 | { | 354 | { |
357 | LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); | 355 | LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); |
358 | abort_task = NULL; | 356 | abort_task = NULL; |
359 | do_shutdown (cls, tc); | 357 | do_shutdown (cls); |
360 | } | 358 | } |
361 | 359 | ||
362 | 360 | ||
@@ -392,7 +390,7 @@ registration_cont (void *cls, const char *emsg); | |||
392 | * @return | 390 | * @return |
393 | */ | 391 | */ |
394 | static void | 392 | static void |
395 | delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 393 | delay_task (void *cls) |
396 | { | 394 | { |
397 | delay_task_id = NULL; | 395 | delay_task_id = NULL; |
398 | switch (result) | 396 | switch (result) |
@@ -644,8 +642,8 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
644 | result = SUCCESS; | 642 | result = SUCCESS; |
645 | GNUNET_TESTBED_operation_done (op); | 643 | GNUNET_TESTBED_operation_done (op); |
646 | op = NULL; | 644 | op = NULL; |
647 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 645 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
648 | (GNUNET_TIME_UNIT_SECONDS, 1), &do_shutdown, | 646 | &do_shutdown, |
649 | NULL); | 647 | NULL); |
650 | break; | 648 | break; |
651 | default: | 649 | default: |
diff --git a/src/testbed/test_testbed_api_hosts.c b/src/testbed/test_testbed_api_hosts.c index a355ddd0c..2141dc46f 100644 --- a/src/testbed/test_testbed_api_hosts.c +++ b/src/testbed/test_testbed_api_hosts.c | |||
@@ -67,10 +67,9 @@ struct GNUNET_SCHEDULER_Task * shutdown_id; | |||
67 | * The shutdown task | 67 | * The shutdown task |
68 | * | 68 | * |
69 | * @param cls NULL | 69 | * @param cls NULL |
70 | * @param tc the task context | ||
71 | */ | 70 | */ |
72 | static void | 71 | static void |
73 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 72 | do_shutdown (void *cls) |
74 | { | 73 | { |
75 | GNUNET_TESTBED_host_destroy (host); | 74 | GNUNET_TESTBED_host_destroy (host); |
76 | while (0 != num_hosts) | 75 | while (0 != num_hosts) |
diff --git a/src/testbed/test_testbed_api_operations.c b/src/testbed/test_testbed_api_operations.c index b522262ba..f2fc4e6e3 100644 --- a/src/testbed/test_testbed_api_operations.c +++ b/src/testbed/test_testbed_api_operations.c | |||
@@ -262,10 +262,9 @@ release_cb (void *cls); | |||
262 | * Task to simulate artificial delay and change the test stage | 262 | * Task to simulate artificial delay and change the test stage |
263 | * | 263 | * |
264 | * @param cls NULL | 264 | * @param cls NULL |
265 | * @param tc the task context | ||
266 | */ | 265 | */ |
267 | static void | 266 | static void |
268 | step (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 267 | step (void *cls) |
269 | { | 268 | { |
270 | GNUNET_assert (NULL != step_task); | 269 | GNUNET_assert (NULL != step_task); |
271 | step_task = NULL; | 270 | step_task = NULL; |
diff --git a/src/testbed/test_testbed_api_peer_reconfiguration.c b/src/testbed/test_testbed_api_peer_reconfiguration.c index 8b429e8fa..315d8a3f3 100644 --- a/src/testbed/test_testbed_api_peer_reconfiguration.c +++ b/src/testbed/test_testbed_api_peer_reconfiguration.c | |||
@@ -89,10 +89,9 @@ enum { | |||
89 | * Abort task | 89 | * Abort task |
90 | * | 90 | * |
91 | * @param cls NULL | 91 | * @param cls NULL |
92 | * @param tc scheduler task context | ||
93 | */ | 92 | */ |
94 | static void | 93 | static void |
95 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 94 | do_abort (void *cls) |
96 | { | 95 | { |
97 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting\n"); | 96 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting\n"); |
98 | abort_task = NULL; | 97 | abort_task = NULL; |
diff --git a/src/testbed/test_testbed_api_peers_manage_services.c b/src/testbed/test_testbed_api_peers_manage_services.c index d478fd1ea..170f4a067 100644 --- a/src/testbed/test_testbed_api_peers_manage_services.c +++ b/src/testbed/test_testbed_api_peers_manage_services.c | |||
@@ -103,10 +103,9 @@ enum { | |||
103 | * Abort task | 103 | * Abort task |
104 | * | 104 | * |
105 | * @param cls NULL | 105 | * @param cls NULL |
106 | * @param tc scheduler task context | ||
107 | */ | 106 | */ |
108 | static void | 107 | static void |
109 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | do_abort (void *cls) |
110 | { | 109 | { |
111 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting\n"); | 110 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting\n"); |
112 | abort_task = NULL; | 111 | abort_task = NULL; |
diff --git a/src/testbed/test_testbed_api_statistics.c b/src/testbed/test_testbed_api_statistics.c index dc8e4c4be..20598b565 100644 --- a/src/testbed/test_testbed_api_statistics.c +++ b/src/testbed/test_testbed_api_statistics.c | |||
@@ -87,10 +87,9 @@ static unsigned int num_seen_peers; | |||
87 | * Abort task | 87 | * Abort task |
88 | * | 88 | * |
89 | * @param cls NULL | 89 | * @param cls NULL |
90 | * @param tc scheduler task context | ||
91 | */ | 90 | */ |
92 | static void | 91 | static void |
93 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 92 | do_abort (void *cls) |
94 | { | 93 | { |
95 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Test timed out -- Aborting\n"); | 94 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Test timed out -- Aborting\n"); |
96 | abort_task = NULL; | 95 | abort_task = NULL; |
diff --git a/src/testbed/test_testbed_api_test.c b/src/testbed/test_testbed_api_test.c index 80e92eb90..61d3f2aba 100644 --- a/src/testbed/test_testbed_api_test.c +++ b/src/testbed/test_testbed_api_test.c | |||
@@ -70,10 +70,9 @@ static int result; | |||
70 | * Shutdown nicely | 70 | * Shutdown nicely |
71 | * | 71 | * |
72 | * @param cls NULL | 72 | * @param cls NULL |
73 | * @param tc the task context | ||
74 | */ | 73 | */ |
75 | static void | 74 | static void |
76 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 75 | do_shutdown (void *cls) |
77 | { | 76 | { |
78 | shutdown_task = NULL; | 77 | shutdown_task = NULL; |
79 | if (NULL != abort_task) | 78 | if (NULL != abort_task) |
@@ -93,7 +92,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
93 | GNUNET_SCHEDULER_cancel (abort_task); \ | 92 | GNUNET_SCHEDULER_cancel (abort_task); \ |
94 | abort_task = NULL; \ | 93 | abort_task = NULL; \ |
95 | if (NULL == shutdown_task) \ | 94 | if (NULL == shutdown_task) \ |
96 | shutdown_task = GNUNET_SCHEDULER_add_now (do_shutdown, NULL); \ | 95 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); \ |
97 | return; \ | 96 | return; \ |
98 | } \ | 97 | } \ |
99 | } while (0) | 98 | } while (0) |
@@ -103,16 +102,15 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | * abort task to run on test timed out | 102 | * abort task to run on test timed out |
104 | * | 103 | * |
105 | * @param cls NULL | 104 | * @param cls NULL |
106 | * @param tc the task context | ||
107 | */ | 105 | */ |
108 | static void | 106 | static void |
109 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 107 | do_abort (void *cls) |
110 | { | 108 | { |
111 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); | 109 | LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); |
112 | abort_task = NULL; | 110 | abort_task = NULL; |
113 | if (NULL != shutdown_task) | 111 | if (NULL != shutdown_task) |
114 | GNUNET_SCHEDULER_cancel (shutdown_task); | 112 | GNUNET_SCHEDULER_cancel (shutdown_task); |
115 | do_shutdown (cls, tc); | 113 | do_shutdown (cls); |
116 | } | 114 | } |
117 | 115 | ||
118 | 116 | ||
diff --git a/src/testbed/test_testbed_api_testbed_run.c b/src/testbed/test_testbed_api_testbed_run.c index db3bb0d47..10beebc1f 100644 --- a/src/testbed/test_testbed_api_testbed_run.c +++ b/src/testbed/test_testbed_api_testbed_run.c | |||
@@ -68,10 +68,9 @@ static int wait_forever; | |||
68 | * Shutdown nicely | 68 | * Shutdown nicely |
69 | * | 69 | * |
70 | * @param cls NULL | 70 | * @param cls NULL |
71 | * @param tc the task context | ||
72 | */ | 71 | */ |
73 | static void | 72 | static void |
74 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 73 | do_shutdown (void *cls) |
75 | { | 74 | { |
76 | if (NULL != abort_task) | 75 | if (NULL != abort_task) |
77 | GNUNET_SCHEDULER_cancel (abort_task); | 76 | GNUNET_SCHEDULER_cancel (abort_task); |
@@ -83,10 +82,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
83 | * abort task to run on test timed out | 82 | * abort task to run on test timed out |
84 | * | 83 | * |
85 | * @param cls NULL | 84 | * @param cls NULL |
86 | * @param tc the task context | ||
87 | */ | 85 | */ |
88 | static void | 86 | static void |
89 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 87 | do_abort (void *cls) |
90 | { | 88 | { |
91 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); | 89 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n"); |
92 | abort_task = NULL; | 90 | abort_task = NULL; |
diff --git a/src/testbed/test_testbed_api_topology.c b/src/testbed/test_testbed_api_topology.c index c6064af65..49b46b0df 100644 --- a/src/testbed/test_testbed_api_topology.c +++ b/src/testbed/test_testbed_api_topology.c | |||
@@ -63,10 +63,9 @@ static unsigned int overlay_connects; | |||
63 | * Shutdown nicely | 63 | * Shutdown nicely |
64 | * | 64 | * |
65 | * @param cls NULL | 65 | * @param cls NULL |
66 | * @param tc the task context | ||
67 | */ | 66 | */ |
68 | static void | 67 | static void |
69 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | do_shutdown (void *cls) |
70 | { | 69 | { |
71 | shutdown_task = NULL; | 70 | shutdown_task = NULL; |
72 | if (NULL != op) | 71 | if (NULL != op) |
diff --git a/src/testbed/test_testbed_api_topology_clique.c b/src/testbed/test_testbed_api_topology_clique.c index d1ccdc2c0..4ca6dbdda 100644 --- a/src/testbed/test_testbed_api_topology_clique.c +++ b/src/testbed/test_testbed_api_topology_clique.c | |||
@@ -63,10 +63,9 @@ static unsigned int overlay_connects; | |||
63 | * Shutdown nicely | 63 | * Shutdown nicely |
64 | * | 64 | * |
65 | * @param cls NULL | 65 | * @param cls NULL |
66 | * @param tc the task context | ||
67 | */ | 66 | */ |
68 | static void | 67 | static void |
69 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | do_shutdown (void *cls) |
70 | { | 69 | { |
71 | shutdown_task = NULL; | 70 | shutdown_task = NULL; |
72 | if (NULL != op) | 71 | if (NULL != op) |
diff --git a/src/testbed/test_testbed_logger_api.c b/src/testbed/test_testbed_logger_api.c index 2cc33ea5b..bedb9d4da 100644 --- a/src/testbed/test_testbed_logger_api.c +++ b/src/testbed/test_testbed_logger_api.c | |||
@@ -97,7 +97,7 @@ shutdown_now () | |||
97 | 97 | ||
98 | 98 | ||
99 | static void | 99 | static void |
100 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 100 | do_abort (void *cls) |
101 | { | 101 | { |
102 | LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); | 102 | LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n"); |
103 | abort_task = NULL; | 103 | abort_task = NULL; |
@@ -173,7 +173,7 @@ flush_comp (void *cls, size_t size) | |||
173 | 173 | ||
174 | 174 | ||
175 | static void | 175 | static void |
176 | do_write (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 176 | do_write (void *cls) |
177 | { | 177 | { |
178 | static int i; | 178 | static int i; |
179 | char buf[BSIZE]; | 179 | char buf[BSIZE]; |
diff --git a/src/testbed/test_testbed_underlay.c b/src/testbed/test_testbed_underlay.c index caea41881..098a2b3db 100644 --- a/src/testbed/test_testbed_underlay.c +++ b/src/testbed/test_testbed_underlay.c | |||
@@ -49,7 +49,7 @@ static struct GNUNET_TESTBED_Operation *op; | |||
49 | * @param tc scheduler task context | 49 | * @param tc scheduler task context |
50 | */ | 50 | */ |
51 | static void | 51 | static void |
52 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 52 | do_shutdown (void *cls) |
53 | { | 53 | { |
54 | if (NULL != op) | 54 | if (NULL != op) |
55 | GNUNET_TESTBED_operation_done (op); | 55 | GNUNET_TESTBED_operation_done (op); |
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 7c8580319..d371108ec 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -1259,10 +1259,9 @@ struct GNUNET_TESTBED_HostHabitableCheckHandle | |||
1259 | * Task for checking whether a host is habitable or not | 1259 | * Task for checking whether a host is habitable or not |
1260 | * | 1260 | * |
1261 | * @param cls GNUNET_TESTBED_HostHabitableCheckHandle | 1261 | * @param cls GNUNET_TESTBED_HostHabitableCheckHandle |
1262 | * @param tc the scheduler task context | ||
1263 | */ | 1262 | */ |
1264 | static void | 1263 | static void |
1265 | habitability_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1264 | habitability_check (void *cls) |
1266 | { | 1265 | { |
1267 | struct GNUNET_TESTBED_HostHabitableCheckHandle *h = cls; | 1266 | struct GNUNET_TESTBED_HostHabitableCheckHandle *h = cls; |
1268 | void *cb_cls; | 1267 | void *cb_cls; |
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c index e4da01fb7..7f5aaa873 100644 --- a/src/testbed/testbed_api_operations.c +++ b/src/testbed/testbed_api_operations.c | |||
@@ -549,10 +549,9 @@ rq_remove (struct GNUNET_TESTBED_Operation *op) | |||
549 | * the ready queue. | 549 | * the ready queue. |
550 | * | 550 | * |
551 | * @param cls NULL | 551 | * @param cls NULL |
552 | * @param tc scheduler task context. Not used. | ||
553 | */ | 552 | */ |
554 | static void | 553 | static void |
555 | process_rq_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 554 | process_rq_task (void *cls) |
556 | { | 555 | { |
557 | struct GNUNET_TESTBED_Operation *op; | 556 | struct GNUNET_TESTBED_Operation *op; |
558 | struct OperationQueue *queue; | 557 | struct OperationQueue *queue; |
diff --git a/src/testbed/testbed_api_statistics.c b/src/testbed/testbed_api_statistics.c index 0f24446fe..a4778f84d 100644 --- a/src/testbed/testbed_api_statistics.c +++ b/src/testbed/testbed_api_statistics.c | |||
@@ -150,10 +150,9 @@ static struct OperationQueue *no_wait_queue; | |||
150 | * get_statistics operation. | 150 | * get_statistics operation. |
151 | * | 151 | * |
152 | * @param cls the GetStatsContext | 152 | * @param cls the GetStatsContext |
153 | * @param tc the scheduler task context | ||
154 | */ | 153 | */ |
155 | static void | 154 | static void |
156 | call_completion_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 155 | call_completion_task (void *cls) |
157 | { | 156 | { |
158 | struct GetStatsContext *sc = cls; | 157 | struct GetStatsContext *sc = cls; |
159 | 158 | ||
@@ -169,10 +168,9 @@ call_completion_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
169 | * as we cannot destroy the statistics handle in iteration_completion_cb() | 168 | * as we cannot destroy the statistics handle in iteration_completion_cb() |
170 | * | 169 | * |
171 | * @param cls the PeerGetStatsContext | 170 | * @param cls the PeerGetStatsContext |
172 | * @param tc the scheduler task context | ||
173 | */ | 171 | */ |
174 | static void | 172 | static void |
175 | op_done_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 173 | op_done_task (void *cls) |
176 | { | 174 | { |
177 | struct PeerGetStatsContext *peer_sc = cls; | 175 | struct PeerGetStatsContext *peer_sc = cls; |
178 | struct GetStatsContext *sc; | 176 | struct GetStatsContext *sc; |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 76403e427..de99fb5a3 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -611,10 +611,9 @@ wait_op_completion (void *cls) | |||
611 | * Task run upon interrupts (SIGINT, SIGTERM) and upon scheduler shutdown. | 611 | * Task run upon interrupts (SIGINT, SIGTERM) and upon scheduler shutdown. |
612 | * | 612 | * |
613 | * @param cls the RunContext which has to be acted upon | 613 | * @param cls the RunContext which has to be acted upon |
614 | * @param tc the scheduler task context | ||
615 | */ | 614 | */ |
616 | static void | 615 | static void |
617 | interrupt (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 616 | interrupt (void *cls) |
618 | { | 617 | { |
619 | struct GNUNET_TESTBED_RunHandle *rc = cls; | 618 | struct GNUNET_TESTBED_RunHandle *rc = cls; |
620 | struct GNUNET_TESTBED_Controller *c = rc->c; | 619 | struct GNUNET_TESTBED_Controller *c = rc->c; |
@@ -661,10 +660,9 @@ prof_time (struct GNUNET_TESTBED_RunHandle *rc) | |||
661 | * Task for starting peers | 660 | * Task for starting peers |
662 | * | 661 | * |
663 | * @param cls the RunHandle | 662 | * @param cls the RunHandle |
664 | * @param tc the task context from scheduler | ||
665 | */ | 663 | */ |
666 | static void | 664 | static void |
667 | start_peers_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 665 | start_peers_task (void *cls) |
668 | { | 666 | { |
669 | struct GNUNET_TESTBED_RunHandle *rc = cls; | 667 | struct GNUNET_TESTBED_RunHandle *rc = cls; |
670 | struct RunContextOperation *rcop; | 668 | struct RunContextOperation *rcop; |
@@ -966,10 +964,9 @@ call_cc: | |||
966 | * Task to register all hosts available in the global host list | 964 | * Task to register all hosts available in the global host list |
967 | * | 965 | * |
968 | * @param cls the RunContext | 966 | * @param cls the RunContext |
969 | * @param tc the scheduler task context | ||
970 | */ | 967 | */ |
971 | static void | 968 | static void |
972 | register_hosts (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 969 | register_hosts (void *cls); |
973 | 970 | ||
974 | 971 | ||
975 | /** | 972 | /** |
@@ -999,10 +996,9 @@ host_registration_completion (void *cls, const char *emsg) | |||
999 | * Task to register all hosts available in the global host list | 996 | * Task to register all hosts available in the global host list |
1000 | * | 997 | * |
1001 | * @param cls RunContext | 998 | * @param cls RunContext |
1002 | * @param tc the scheduler task context | ||
1003 | */ | 999 | */ |
1004 | static void | 1000 | static void |
1005 | register_hosts (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1001 | register_hosts (void *cls) |
1006 | { | 1002 | { |
1007 | struct GNUNET_TESTBED_RunHandle *rc = cls; | 1003 | struct GNUNET_TESTBED_RunHandle *rc = cls; |
1008 | struct RunContextOperation *rcop; | 1004 | struct RunContextOperation *rcop; |
@@ -1194,15 +1190,15 @@ host_habitable_cb (void *cls, const struct GNUNET_TESTBED_Host *host, | |||
1194 | * Task run upon timeout while setting up the testbed | 1190 | * Task run upon timeout while setting up the testbed |
1195 | * | 1191 | * |
1196 | * @param cls the RunContext | 1192 | * @param cls the RunContext |
1197 | * @param tc the task context | ||
1198 | */ | 1193 | */ |
1199 | static void | 1194 | static void |
1200 | timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1195 | timeout_task (void *cls) |
1201 | { | 1196 | { |
1202 | struct GNUNET_TESTBED_RunHandle *rc = cls; | 1197 | struct GNUNET_TESTBED_RunHandle *rc = cls; |
1203 | 1198 | ||
1204 | rc->timeout_task = NULL; | 1199 | rc->timeout_task = NULL; |
1205 | LOG (GNUNET_ERROR_TYPE_ERROR, _("Shutting down testbed due to timeout while setup.\n")); | 1200 | LOG (GNUNET_ERROR_TYPE_ERROR, |
1201 | _("Shutting down testbed due to timeout while setup.\n")); | ||
1206 | GNUNET_SCHEDULER_shutdown (); | 1202 | GNUNET_SCHEDULER_shutdown (); |
1207 | if (NULL != rc->test_master) | 1203 | if (NULL != rc->test_master) |
1208 | rc->test_master (rc->test_master_cls, rc, 0, NULL, 0, 0); | 1204 | rc->test_master (rc->test_master_cls, rc, 0, NULL, 0, 0); |
diff --git a/src/testbed/testbed_logger_api.c b/src/testbed/testbed_logger_api.c index ca6bc354e..aa182e21c 100644 --- a/src/testbed/testbed_logger_api.c +++ b/src/testbed/testbed_logger_api.c | |||
@@ -170,10 +170,9 @@ cancel_timeout_flush (struct GNUNET_TESTBED_LOGGER_Handle *h) | |||
170 | * Task to call the flush completion notification | 170 | * Task to call the flush completion notification |
171 | * | 171 | * |
172 | * @param cls the logger handle | 172 | * @param cls the logger handle |
173 | * @param tc the scheduler task context | ||
174 | */ | 173 | */ |
175 | static void | 174 | static void |
176 | call_flush_completion (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 175 | call_flush_completion (void *cls) |
177 | { | 176 | { |
178 | struct GNUNET_TESTBED_LOGGER_Handle *h = cls; | 177 | struct GNUNET_TESTBED_LOGGER_Handle *h = cls; |
179 | GNUNET_TESTBED_LOGGER_FlushCompletion cb; | 178 | GNUNET_TESTBED_LOGGER_FlushCompletion cb; |
@@ -416,10 +415,9 @@ GNUNET_TESTBED_LOGGER_write (struct GNUNET_TESTBED_LOGGER_Handle *h, | |||
416 | * be called with 0 as the amount of data sent. | 415 | * be called with 0 as the amount of data sent. |
417 | * | 416 | * |
418 | * @param cls the logger handle | 417 | * @param cls the logger handle |
419 | * @param tc scheduler task context | ||
420 | */ | 418 | */ |
421 | static void | 419 | static void |
422 | timeout_flush (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 420 | timeout_flush (void *cls) |
423 | { | 421 | { |
424 | struct GNUNET_TESTBED_LOGGER_Handle *h = cls; | 422 | struct GNUNET_TESTBED_LOGGER_Handle *h = cls; |
425 | GNUNET_TESTBED_LOGGER_FlushCompletion cb; | 423 | GNUNET_TESTBED_LOGGER_FlushCompletion cb; |
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c index 1e640ec96..92dd17d98 100644 --- a/src/testing/gnunet-testing.c +++ b/src/testing/gnunet-testing.c | |||
@@ -197,10 +197,9 @@ create_hostkeys (const unsigned int no) | |||
197 | * Removes the temporary file. | 197 | * Removes the temporary file. |
198 | * | 198 | * |
199 | * @param cls unused | 199 | * @param cls unused |
200 | * @param tc scheduler context | ||
201 | */ | 200 | */ |
202 | static void | 201 | static void |
203 | cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 202 | cleanup (void *cls) |
204 | { | 203 | { |
205 | if (NULL != tmpfilename) | 204 | if (NULL != tmpfilename) |
206 | { | 205 | { |
@@ -224,14 +223,15 @@ cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
224 | * Called whenever we can read stdin non-blocking | 223 | * Called whenever we can read stdin non-blocking |
225 | * | 224 | * |
226 | * @param cls unused | 225 | * @param cls unused |
227 | * @param tc scheduler context | ||
228 | */ | 226 | */ |
229 | static void | 227 | static void |
230 | stdin_cb (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 228 | stdin_cb (void *cls) |
231 | { | 229 | { |
232 | int c; | 230 | int c; |
231 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
233 | 232 | ||
234 | tid = NULL; | 233 | tid = NULL; |
234 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
235 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 235 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
236 | return; | 236 | return; |
237 | GNUNET_assert (0 != (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)); | 237 | GNUNET_assert (0 != (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)); |
diff --git a/src/testing/test_testing_peerstartup.c b/src/testing/test_testing_peerstartup.c index 9b0c53642..956788f6c 100644 --- a/src/testing/test_testing_peerstartup.c +++ b/src/testing/test_testing_peerstartup.c | |||
@@ -63,10 +63,9 @@ struct TestingContext | |||
63 | * Task for shutdown | 63 | * Task for shutdown |
64 | * | 64 | * |
65 | * @param cls the testing context | 65 | * @param cls the testing context |
66 | * @param tc the tast context | ||
67 | */ | 66 | */ |
68 | static void | 67 | static void |
69 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | do_shutdown (void *cls) |
70 | { | 69 | { |
71 | struct TestingContext *test_ctx = cls; | 70 | struct TestingContext *test_ctx = cls; |
72 | 71 | ||
diff --git a/src/testing/test_testing_peerstartup2.c b/src/testing/test_testing_peerstartup2.c index edbd24df0..fd46e5c3e 100644 --- a/src/testing/test_testing_peerstartup2.c +++ b/src/testing/test_testing_peerstartup2.c | |||
@@ -83,7 +83,7 @@ struct TestingContext | |||
83 | 83 | ||
84 | 84 | ||
85 | static void | 85 | static void |
86 | do_shutdown2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 86 | do_shutdown2 (void *cls) |
87 | { | 87 | { |
88 | struct TestingContext *test_ctx = cls; | 88 | struct TestingContext *test_ctx = cls; |
89 | 89 | ||
@@ -102,10 +102,9 @@ do_shutdown2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | * Task for shutdown | 102 | * Task for shutdown |
103 | * | 103 | * |
104 | * @param cls the testing context | 104 | * @param cls the testing context |
105 | * @param tc the tast context | ||
106 | */ | 105 | */ |
107 | static void | 106 | static void |
108 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 107 | do_shutdown (void *cls); |
109 | 108 | ||
110 | 109 | ||
111 | static void | 110 | static void |
@@ -133,10 +132,9 @@ peer_status_cb (void *cls, struct GNUNET_TESTING_Peer *peer, int success) | |||
133 | * Task for shutdown | 132 | * Task for shutdown |
134 | * | 133 | * |
135 | * @param cls the testing context | 134 | * @param cls the testing context |
136 | * @param tc the tast context | ||
137 | */ | 135 | */ |
138 | static void | 136 | static void |
139 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 137 | do_shutdown (void *cls) |
140 | { | 138 | { |
141 | struct TestingContext *test_ctx = cls; | 139 | struct TestingContext *test_ctx = cls; |
142 | 140 | ||
@@ -149,7 +147,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
149 | test_ctx)); | 147 | test_ctx)); |
150 | } | 148 | } |
151 | else | 149 | else |
152 | do_shutdown2 (test_ctx, tc); | 150 | do_shutdown2 (test_ctx); |
153 | } | 151 | } |
154 | 152 | ||
155 | 153 | ||
diff --git a/src/testing/test_testing_sharedservices.c b/src/testing/test_testing_sharedservices.c index 7d1a3905d..ee1ac8530 100644 --- a/src/testing/test_testing_sharedservices.c +++ b/src/testing/test_testing_sharedservices.c | |||
@@ -64,10 +64,9 @@ struct TestingContext | |||
64 | * Task for shutdown | 64 | * Task for shutdown |
65 | * | 65 | * |
66 | * @param cls the testing context | 66 | * @param cls the testing context |
67 | * @param tc the tast context | ||
68 | */ | 67 | */ |
69 | static void | 68 | static void |
70 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 69 | do_shutdown (void *cls) |
71 | { | 70 | { |
72 | struct TestingContext *test_ctx = cls; | 71 | struct TestingContext *test_ctx = cls; |
73 | struct GNUNET_TESTING_Peer *peer; | 72 | struct GNUNET_TESTING_Peer *peer; |
diff --git a/src/testing/testing.c b/src/testing/testing.c index 07129fd6f..32cd09b84 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -1654,11 +1654,9 @@ struct ServiceContext | |||
1654 | * Callback to be called when SCHEDULER has been started | 1654 | * Callback to be called when SCHEDULER has been started |
1655 | * | 1655 | * |
1656 | * @param cls the ServiceContext | 1656 | * @param cls the ServiceContext |
1657 | * @param tc the TaskContext | ||
1658 | */ | 1657 | */ |
1659 | static void | 1658 | static void |
1660 | service_run_main (void *cls, | 1659 | service_run_main (void *cls) |
1661 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1662 | { | 1660 | { |
1663 | struct ServiceContext *sc = cls; | 1661 | struct ServiceContext *sc = cls; |
1664 | 1662 | ||
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 632cfc4ec..1a6c163ee 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -506,19 +506,19 @@ find_advertisable_hello (void *cls, | |||
506 | * peer and ask for it. | 506 | * peer and ask for it. |
507 | * | 507 | * |
508 | * @param cls for which peer to schedule the HELLO | 508 | * @param cls for which peer to schedule the HELLO |
509 | * @param tc task context | ||
510 | */ | 509 | */ |
511 | static void | 510 | static void |
512 | schedule_next_hello (void *cls, | 511 | schedule_next_hello (void *cls) |
513 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
514 | { | 512 | { |
515 | struct Peer *pl = cls; | 513 | struct Peer *pl = cls; |
516 | struct FindAdvHelloContext fah; | 514 | struct FindAdvHelloContext fah; |
517 | size_t next_want; | 515 | size_t next_want; |
518 | struct GNUNET_TIME_Relative delay; | 516 | struct GNUNET_TIME_Relative delay; |
517 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
519 | 518 | ||
520 | pl->hello_delay_task = NULL; | 519 | pl->hello_delay_task = NULL; |
521 | GNUNET_assert (GNUNET_YES == pl->is_connected); | 520 | GNUNET_assert (GNUNET_YES == pl->is_connected); |
521 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
522 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 522 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
523 | return; /* we're out of here */ | 523 | return; /* we're out of here */ |
524 | if (pl->hello_req != NULL) | 524 | if (pl->hello_req != NULL) |
@@ -669,11 +669,9 @@ try_add_peers (void *cls, | |||
669 | * Add peers and schedule connection attempt | 669 | * Add peers and schedule connection attempt |
670 | * | 670 | * |
671 | * @param cls unused, NULL | 671 | * @param cls unused, NULL |
672 | * @param tc scheduler context | ||
673 | */ | 672 | */ |
674 | static void | 673 | static void |
675 | add_peer_task (void *cls, | 674 | add_peer_task (void *cls) |
676 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
677 | { | 675 | { |
678 | add_task = NULL; | 676 | add_task = NULL; |
679 | 677 | ||
@@ -1133,11 +1131,9 @@ hello_advertising_ready (void *cls, | |||
1133 | * the transport and core. | 1131 | * the transport and core. |
1134 | * | 1132 | * |
1135 | * @param cls unused, NULL | 1133 | * @param cls unused, NULL |
1136 | * @param tc scheduler context | ||
1137 | */ | 1134 | */ |
1138 | static void | 1135 | static void |
1139 | cleaning_task (void *cls, | 1136 | cleaning_task (void *cls) |
1140 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1141 | { | 1137 | { |
1142 | if (NULL != peerinfo_notify) | 1138 | if (NULL != peerinfo_notify) |
1143 | { | 1139 | { |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index d5c0d4a86..9fde3d83e 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -250,11 +250,9 @@ process_payload (const struct GNUNET_HELLO_Address *address, | |||
250 | * Task to asynchronously terminate a session. | 250 | * Task to asynchronously terminate a session. |
251 | * | 251 | * |
252 | * @param cls the `struct GNUNET_ATS_SessionKiller` with the information for the kill | 252 | * @param cls the `struct GNUNET_ATS_SessionKiller` with the information for the kill |
253 | * @param tc scheduler context | ||
254 | */ | 253 | */ |
255 | static void | 254 | static void |
256 | kill_session_task (void *cls, | 255 | kill_session_task (void *cls) |
257 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
258 | { | 256 | { |
259 | struct GNUNET_ATS_SessionKiller *sk = cls; | 257 | struct GNUNET_ATS_SessionKiller *sk = cls; |
260 | 258 | ||
@@ -756,11 +754,9 @@ ats_request_address_change (void *cls, | |||
756 | * and cancels pending validations. | 754 | * and cancels pending validations. |
757 | * | 755 | * |
758 | * @param cls closure, unused | 756 | * @param cls closure, unused |
759 | * @param tc task context (unused) | ||
760 | */ | 757 | */ |
761 | static void | 758 | static void |
762 | shutdown_task (void *cls, | 759 | shutdown_task (void *cls) |
763 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
764 | { | 760 | { |
765 | GST_neighbours_stop (); | 761 | GST_neighbours_stop (); |
766 | GST_plugins_unload (); | 762 | GST_plugins_unload (); |
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c index 87d05b200..a20c998b3 100644 --- a/src/transport/gnunet-service-transport_ats.c +++ b/src/transport/gnunet-service-transport_ats.c | |||
@@ -294,11 +294,9 @@ GST_ats_is_known_no_session (const struct GNUNET_HELLO_Address *address) | |||
294 | * suggest it again. | 294 | * suggest it again. |
295 | * | 295 | * |
296 | * @param cls the `struct AddressInfo` of the address to unblock | 296 | * @param cls the `struct AddressInfo` of the address to unblock |
297 | * @param tc unused | ||
298 | */ | 297 | */ |
299 | static void | 298 | static void |
300 | unblock_address (void *cls, | 299 | unblock_address (void *cls) |
301 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
302 | { | 300 | { |
303 | struct AddressInfo *ai = cls; | 301 | struct AddressInfo *ai = cls; |
304 | 302 | ||
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index 14375fce4..ea5644390 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -205,11 +205,9 @@ static struct GNUNET_CONTAINER_MultiPeerMap *blacklist; | |||
205 | * Perform next action in the blacklist check. | 205 | * Perform next action in the blacklist check. |
206 | * | 206 | * |
207 | * @param cls the `struct BlacklistCheck*` | 207 | * @param cls the `struct BlacklistCheck*` |
208 | * @param tc unused | ||
209 | */ | 208 | */ |
210 | static void | 209 | static void |
211 | do_blacklist_check (void *cls, | 210 | do_blacklist_check (void *cls); |
212 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
213 | 211 | ||
214 | 212 | ||
215 | /** | 213 | /** |
@@ -395,7 +393,7 @@ GST_blacklist_stop () | |||
395 | * @return number of bytes copied to @a buf | 393 | * @return number of bytes copied to @a buf |
396 | */ | 394 | */ |
397 | static size_t | 395 | static size_t |
398 | transmit_blacklist_message (void *cls, | 396 | transmit_blacklist_message (void *cls, |
399 | size_t size, | 397 | size_t size, |
400 | void *buf) | 398 | void *buf) |
401 | { | 399 | { |
@@ -416,7 +414,7 @@ transmit_blacklist_message (void *cls, | |||
416 | } | 414 | } |
417 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 415 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
418 | "Sending blacklist test for peer `%s' to client %p\n", | 416 | "Sending blacklist test for peer `%s' to client %p\n", |
419 | GNUNET_i2s (&bc->peer), | 417 | GNUNET_i2s (&bc->peer), |
420 | bc->bl_pos->client); | 418 | bc->bl_pos->client); |
421 | bl = bc->bl_pos; | 419 | bl = bc->bl_pos; |
422 | bm.header.size = htons (sizeof (struct BlacklistMessage)); | 420 | bm.header.size = htons (sizeof (struct BlacklistMessage)); |
@@ -424,7 +422,7 @@ transmit_blacklist_message (void *cls, | |||
424 | bm.is_allowed = htonl (0); | 422 | bm.is_allowed = htonl (0); |
425 | bm.peer = bc->peer; | 423 | bm.peer = bc->peer; |
426 | memcpy (buf, | 424 | memcpy (buf, |
427 | &bm, | 425 | &bm, |
428 | sizeof (bm)); | 426 | sizeof (bm)); |
429 | if (GNUNET_YES == bl->call_receive_done) | 427 | if (GNUNET_YES == bl->call_receive_done) |
430 | { | 428 | { |
@@ -442,11 +440,9 @@ transmit_blacklist_message (void *cls, | |||
442 | * Perform next action in the blacklist check. | 440 | * Perform next action in the blacklist check. |
443 | * | 441 | * |
444 | * @param cls the `struct GST_BlacklistCheck *` | 442 | * @param cls the `struct GST_BlacklistCheck *` |
445 | * @param tc unused | ||
446 | */ | 443 | */ |
447 | static void | 444 | static void |
448 | do_blacklist_check (void *cls, | 445 | do_blacklist_check (void *cls) |
449 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
450 | { | 446 | { |
451 | struct GST_BlacklistCheck *bc = cls; | 447 | struct GST_BlacklistCheck *bc = cls; |
452 | struct Blacklisters *bl; | 448 | struct Blacklisters *bl; |
@@ -459,7 +455,7 @@ do_blacklist_check (void *cls, | |||
459 | "No other blacklist clients active, will allow neighbour `%s'\n", | 455 | "No other blacklist clients active, will allow neighbour `%s'\n", |
460 | GNUNET_i2s (&bc->peer)); | 456 | GNUNET_i2s (&bc->peer)); |
461 | 457 | ||
462 | bc->cont (bc->cont_cls, | 458 | bc->cont (bc->cont_cls, |
463 | &bc->peer, | 459 | &bc->peer, |
464 | bc->address, | 460 | bc->address, |
465 | bc->session, | 461 | bc->session, |
@@ -475,7 +471,7 @@ do_blacklist_check (void *cls, | |||
475 | GNUNET_SERVER_notify_transmit_ready (bl->client, | 471 | GNUNET_SERVER_notify_transmit_ready (bl->client, |
476 | sizeof (struct BlacklistMessage), | 472 | sizeof (struct BlacklistMessage), |
477 | GNUNET_TIME_UNIT_FOREVER_REL, | 473 | GNUNET_TIME_UNIT_FOREVER_REL, |
478 | &transmit_blacklist_message, | 474 | &transmit_blacklist_message, |
479 | bc); | 475 | bc); |
480 | } | 476 | } |
481 | 477 | ||
@@ -501,7 +497,7 @@ confirm_or_drop_neighbour (void *cls, | |||
501 | if (GNUNET_OK == allowed) | 497 | if (GNUNET_OK == allowed) |
502 | return; /* we're done */ | 498 | return; /* we're done */ |
503 | GNUNET_STATISTICS_update (GST_stats, | 499 | GNUNET_STATISTICS_update (GST_stats, |
504 | gettext_noop ("# disconnects due to blacklist"), | 500 | gettext_noop ("# disconnects due to blacklist"), |
505 | 1, | 501 | 1, |
506 | GNUNET_NO); | 502 | GNUNET_NO); |
507 | GST_neighbours_force_disconnect (peer); | 503 | GST_neighbours_force_disconnect (peer); |
@@ -666,7 +662,7 @@ GST_blacklist_handle_reply (void *cls, | |||
666 | GNUNET_CONTAINER_DLL_remove (bc_head, | 662 | GNUNET_CONTAINER_DLL_remove (bc_head, |
667 | bc_tail, | 663 | bc_tail, |
668 | bc); | 664 | bc); |
669 | bc->cont (bc->cont_cls, | 665 | bc->cont (bc->cont_cls, |
670 | &bc->peer, | 666 | &bc->peer, |
671 | bc->address, | 667 | bc->address, |
672 | bc->session, | 668 | bc->session, |
@@ -687,7 +683,7 @@ GST_blacklist_handle_reply (void *cls, | |||
687 | GNUNET_OK); | 683 | GNUNET_OK); |
688 | bl->call_receive_done = GNUNET_NO; | 684 | bl->call_receive_done = GNUNET_NO; |
689 | bc->bl_pos = bl->next; | 685 | bc->bl_pos = bl->next; |
690 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, | 686 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, |
691 | bc); | 687 | bc); |
692 | } | 688 | } |
693 | } | 689 | } |
@@ -695,7 +691,7 @@ GST_blacklist_handle_reply (void *cls, | |||
695 | for (bc = bc_head; bc != NULL; bc = bc->next) | 691 | for (bc = bc_head; bc != NULL; bc = bc->next) |
696 | if ((bc->bl_pos == bl) && (NULL == bc->task)) | 692 | if ((bc->bl_pos == bl) && (NULL == bc->task)) |
697 | { | 693 | { |
698 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, | 694 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, |
699 | bc); | 695 | bc); |
700 | break; | 696 | break; |
701 | } | 697 | } |
@@ -749,7 +745,7 @@ GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address, | |||
749 | struct GST_BlacklistCheck *bc; | 745 | struct GST_BlacklistCheck *bc; |
750 | struct GST_BlacklistCheck *n; | 746 | struct GST_BlacklistCheck *n; |
751 | 747 | ||
752 | n = bc_head; | 748 | n = bc_head; |
753 | while (NULL != (bc = n)) | 749 | while (NULL != (bc = n)) |
754 | { | 750 | { |
755 | n = bc->next; | 751 | n = bc->next; |
@@ -853,15 +849,15 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, | |||
853 | /* Disallowed by config, disapprove instantly */ | 849 | /* Disallowed by config, disapprove instantly */ |
854 | GNUNET_STATISTICS_update (GST_stats, | 850 | GNUNET_STATISTICS_update (GST_stats, |
855 | gettext_noop ("# disconnects due to blacklist"), | 851 | gettext_noop ("# disconnects due to blacklist"), |
856 | 1, | 852 | 1, |
857 | GNUNET_NO); | 853 | GNUNET_NO); |
858 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 854 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
859 | _("Disallowing connection to peer `%s' on transport %s\n"), | 855 | _("Disallowing connection to peer `%s' on transport %s\n"), |
860 | GNUNET_i2s (peer), | 856 | GNUNET_i2s (peer), |
861 | (NULL != transport_name) ? transport_name : "unspecified"); | 857 | (NULL != transport_name) ? transport_name : "unspecified"); |
862 | if (NULL != cont) | 858 | if (NULL != cont) |
863 | cont (cont_cls, | 859 | cont (cont_cls, |
864 | peer, | 860 | peer, |
865 | address, | 861 | address, |
866 | session, | 862 | session, |
867 | GNUNET_NO); | 863 | GNUNET_NO); |
@@ -886,7 +882,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, | |||
886 | 882 | ||
887 | /* need to query blacklist clients */ | 883 | /* need to query blacklist clients */ |
888 | bc = GNUNET_new (struct GST_BlacklistCheck); | 884 | bc = GNUNET_new (struct GST_BlacklistCheck); |
889 | GNUNET_CONTAINER_DLL_insert (bc_head, | 885 | GNUNET_CONTAINER_DLL_insert (bc_head, |
890 | bc_tail, | 886 | bc_tail, |
891 | bc); | 887 | bc); |
892 | bc->peer = *peer; | 888 | bc->peer = *peer; |
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 77c382ed0..1a3c2c32e 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -172,11 +172,9 @@ address_generator (void *cls, | |||
172 | * all of the transports. | 172 | * all of the transports. |
173 | * | 173 | * |
174 | * @param cls unused | 174 | * @param cls unused |
175 | * @param tc scheduler context | ||
176 | */ | 175 | */ |
177 | static void | 176 | static void |
178 | refresh_hello_task (void *cls, | 177 | refresh_hello_task (void *cls) |
179 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
180 | { | 178 | { |
181 | struct GeneratorContext gc; | 179 | struct GeneratorContext gc; |
182 | 180 | ||
@@ -243,7 +241,7 @@ GST_hello_start (int friend_only, | |||
243 | hello_cb = cb; | 241 | hello_cb = cb; |
244 | hello_cb_cls = cb_cls; | 242 | hello_cb_cls = cb_cls; |
245 | friend_option = friend_only; | 243 | friend_option = friend_only; |
246 | refresh_hello_task (NULL, NULL); | 244 | refresh_hello_task (NULL); |
247 | } | 245 | } |
248 | 246 | ||
249 | 247 | ||
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index 6eef8f300..bd3fed6d7 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c | |||
@@ -224,11 +224,9 @@ GST_manipulation_set_metric (void *cls, | |||
224 | * message. | 224 | * message. |
225 | * | 225 | * |
226 | * @param cls the `struct DelayQueueEntry` to transmit | 226 | * @param cls the `struct DelayQueueEntry` to transmit |
227 | * @param tc unused | ||
228 | */ | 227 | */ |
229 | static void | 228 | static void |
230 | send_delayed (void *cls, | 229 | send_delayed (void *cls) |
231 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
232 | { | 230 | { |
233 | struct DelayQueueEntry *dqe = cls; | 231 | struct DelayQueueEntry *dqe = cls; |
234 | struct DelayQueueEntry *next; | 232 | struct DelayQueueEntry *next; |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 0f1e86fe6..65428ef2a 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -695,11 +695,9 @@ free_address (struct NeighbourAddress *na) | |||
695 | * clean up after disconnect). | 695 | * clean up after disconnect). |
696 | * | 696 | * |
697 | * @param cls the `struct NeighbourMapEntry` for which we are running | 697 | * @param cls the `struct NeighbourMapEntry` for which we are running |
698 | * @param tc scheduler context (unused) | ||
699 | */ | 698 | */ |
700 | static void | 699 | static void |
701 | master_task (void *cls, | 700 | master_task (void *cls); |
702 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
703 | 701 | ||
704 | 702 | ||
705 | /** | 703 | /** |
@@ -2814,11 +2812,9 @@ send_utilization_data (void *cls, | |||
2814 | * Task transmitting utilization in a regular interval | 2812 | * Task transmitting utilization in a regular interval |
2815 | * | 2813 | * |
2816 | * @param cls the 'struct NeighbourMapEntry' for which we are running | 2814 | * @param cls the 'struct NeighbourMapEntry' for which we are running |
2817 | * @param tc scheduler context (unused) | ||
2818 | */ | 2815 | */ |
2819 | static void | 2816 | static void |
2820 | utilization_transmission (void *cls, | 2817 | utilization_transmission (void *cls) |
2821 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2822 | { | 2818 | { |
2823 | util_transmission_tk = NULL; | 2819 | util_transmission_tk = NULL; |
2824 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, | 2820 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, |
@@ -2883,11 +2879,9 @@ GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, | |||
2883 | * clean up after disconnect). | 2879 | * clean up after disconnect). |
2884 | * | 2880 | * |
2885 | * @param cls the 'struct NeighbourMapEntry' for which we are running | 2881 | * @param cls the 'struct NeighbourMapEntry' for which we are running |
2886 | * @param tc scheduler context (unused) | ||
2887 | */ | 2882 | */ |
2888 | static void | 2883 | static void |
2889 | master_task (void *cls, | 2884 | master_task (void *cls) |
2890 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2891 | { | 2885 | { |
2892 | struct NeighbourMapEntry *n = cls; | 2886 | struct NeighbourMapEntry *n = cls; |
2893 | struct GNUNET_TIME_Relative delay; | 2887 | struct GNUNET_TIME_Relative delay; |
@@ -3448,11 +3442,9 @@ GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target) | |||
3448 | * Task to asynchronously run #free_neighbour(). | 3442 | * Task to asynchronously run #free_neighbour(). |
3449 | * | 3443 | * |
3450 | * @param cls the `struct NeighbourMapEntry` to free | 3444 | * @param cls the `struct NeighbourMapEntry` to free |
3451 | * @param tc unused | ||
3452 | */ | 3445 | */ |
3453 | static void | 3446 | static void |
3454 | delayed_disconnect (void *cls, | 3447 | delayed_disconnect (void *cls) |
3455 | const struct GNUNET_SCHEDULER_TaskContext* tc) | ||
3456 | { | 3448 | { |
3457 | struct NeighbourMapEntry *n = cls; | 3449 | struct NeighbourMapEntry *n = cls; |
3458 | 3450 | ||
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index 9b8d750f0..836aa418c 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -463,11 +463,9 @@ cleanup_validation_entry (void *cls, | |||
463 | * longer valid and then possibly triggers its removal. | 463 | * longer valid and then possibly triggers its removal. |
464 | * | 464 | * |
465 | * @param cls the `struct ValidationEntry` | 465 | * @param cls the `struct ValidationEntry` |
466 | * @param tc scheduler context (unused) | ||
467 | */ | 466 | */ |
468 | static void | 467 | static void |
469 | timeout_hello_validation (void *cls, | 468 | timeout_hello_validation (void *cls) |
470 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
471 | { | 469 | { |
472 | struct ValidationEntry *ve = cls; | 470 | struct ValidationEntry *ve = cls; |
473 | struct GNUNET_TIME_Absolute max; | 471 | struct GNUNET_TIME_Absolute max; |
@@ -652,11 +650,9 @@ transmit_ping_if_allowed (void *cls, | |||
652 | * Do address validation again to keep address valid. | 650 | * Do address validation again to keep address valid. |
653 | * | 651 | * |
654 | * @param cls the `struct ValidationEntry` | 652 | * @param cls the `struct ValidationEntry` |
655 | * @param tc scheduler context (unused) | ||
656 | */ | 653 | */ |
657 | static void | 654 | static void |
658 | revalidate_address (void *cls, | 655 | revalidate_address (void *cls) |
659 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
660 | { | 656 | { |
661 | struct ValidationEntry *ve = cls; | 657 | struct ValidationEntry *ve = cls; |
662 | struct GNUNET_TIME_Relative canonical_delay; | 658 | struct GNUNET_TIME_Relative canonical_delay; |
diff --git a/src/transport/gnunet-transport-profiler.c b/src/transport/gnunet-transport-profiler.c index ed18bf418..624d1a16c 100644 --- a/src/transport/gnunet-transport-profiler.c +++ b/src/transport/gnunet-transport-profiler.c | |||
@@ -161,11 +161,9 @@ static int verbosity; | |||
161 | * Stops monitoring activity. | 161 | * Stops monitoring activity. |
162 | * | 162 | * |
163 | * @param cls NULL | 163 | * @param cls NULL |
164 | * @param tc scheduler context | ||
165 | */ | 164 | */ |
166 | static void | 165 | static void |
167 | shutdown_task (void *cls, | 166 | shutdown_task (void *cls) |
168 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
169 | { | 167 | { |
170 | struct Iteration *icur; | 168 | struct Iteration *icur; |
171 | struct Iteration *inext; | 169 | struct Iteration *inext; |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 03bece6b7..bed9bdc85 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -487,11 +487,9 @@ destroy_it (void *cls, | |||
487 | * Stops monitoring activity. | 487 | * Stops monitoring activity. |
488 | * | 488 | * |
489 | * @param cls NULL | 489 | * @param cls NULL |
490 | * @param tc scheduler context | ||
491 | */ | 490 | */ |
492 | static void | 491 | static void |
493 | shutdown_task (void *cls, | 492 | shutdown_task (void *cls) |
494 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
495 | { | 493 | { |
496 | struct GNUNET_TIME_Relative duration; | 494 | struct GNUNET_TIME_Relative duration; |
497 | struct ValidationResolutionContext *cur; | 495 | struct ValidationResolutionContext *cur; |
@@ -598,8 +596,7 @@ shutdown_task (void *cls, | |||
598 | * We are done, shut down. | 596 | * We are done, shut down. |
599 | */ | 597 | */ |
600 | static void | 598 | static void |
601 | operation_timeout (void *cls, | 599 | operation_timeout (void *cls) |
602 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
603 | { | 600 | { |
604 | struct PeerResolutionContext *cur; | 601 | struct PeerResolutionContext *cur; |
605 | struct PeerResolutionContext *next; | 602 | struct PeerResolutionContext *next; |
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index cd4710417..2b0b8939e 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -557,8 +557,7 @@ client_reschedule_session_timeout (struct GNUNET_ATS_Session *s) | |||
557 | * @param tc gnunet scheduler task context | 557 | * @param tc gnunet scheduler task context |
558 | */ | 558 | */ |
559 | static void | 559 | static void |
560 | client_run (void *cls, | 560 | client_run (void *cls); |
561 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
562 | 561 | ||
563 | 562 | ||
564 | /** | 563 | /** |
@@ -997,11 +996,9 @@ client_lookup_session (struct HTTP_Client_Plugin *plugin, | |||
997 | * is the delayed task that actually disconnects the PUT. | 996 | * is the delayed task that actually disconnects the PUT. |
998 | * | 997 | * |
999 | * @param cls the `struct GNUNET_ATS_Session *` with the put | 998 | * @param cls the `struct GNUNET_ATS_Session *` with the put |
1000 | * @param tc scheduler context | ||
1001 | */ | 999 | */ |
1002 | static void | 1000 | static void |
1003 | client_put_disconnect (void *cls, | 1001 | client_put_disconnect (void *cls) |
1004 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1005 | { | 1002 | { |
1006 | struct GNUNET_ATS_Session *s = cls; | 1003 | struct GNUNET_ATS_Session *s = cls; |
1007 | 1004 | ||
@@ -1128,15 +1125,15 @@ client_send_cb (void *stream, | |||
1128 | * Wake up a curl handle which was suspended | 1125 | * Wake up a curl handle which was suspended |
1129 | * | 1126 | * |
1130 | * @param cls the session | 1127 | * @param cls the session |
1131 | * @param tc task context | ||
1132 | */ | 1128 | */ |
1133 | static void | 1129 | static void |
1134 | client_wake_up (void *cls, | 1130 | client_wake_up (void *cls) |
1135 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1136 | { | 1131 | { |
1137 | struct GNUNET_ATS_Session *s = cls; | 1132 | struct GNUNET_ATS_Session *s = cls; |
1133 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1138 | 1134 | ||
1139 | s->recv_wakeup_task = NULL; | 1135 | s->recv_wakeup_task = NULL; |
1136 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1140 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1137 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1141 | return; | 1138 | return; |
1142 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1139 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1293,11 +1290,9 @@ client_receive (void *stream, | |||
1293 | * Task performing curl operations | 1290 | * Task performing curl operations |
1294 | * | 1291 | * |
1295 | * @param cls plugin as closure | 1292 | * @param cls plugin as closure |
1296 | * @param tc scheduler task context | ||
1297 | */ | 1293 | */ |
1298 | static void | 1294 | static void |
1299 | client_run (void *cls, | 1295 | client_run (void *cls) |
1300 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1301 | { | 1296 | { |
1302 | struct HTTP_Client_Plugin *plugin = cls; | 1297 | struct HTTP_Client_Plugin *plugin = cls; |
1303 | int running; | 1298 | int running; |
@@ -1306,8 +1301,10 @@ client_run (void *cls, | |||
1306 | CURLMsg *msg; | 1301 | CURLMsg *msg; |
1307 | int put_request; /* GNUNET_YES if easy handle is put, GNUNET_NO for get */ | 1302 | int put_request; /* GNUNET_YES if easy handle is put, GNUNET_NO for get */ |
1308 | int msgs_left; | 1303 | int msgs_left; |
1304 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1309 | 1305 | ||
1310 | plugin->client_perform_task = NULL; | 1306 | plugin->client_perform_task = NULL; |
1307 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1311 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1308 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1312 | return; | 1309 | return; |
1313 | 1310 | ||
@@ -1963,11 +1960,9 @@ http_client_plugin_get_network_for_address (void *cls, | |||
1963 | * Session was idle, so disconnect it | 1960 | * Session was idle, so disconnect it |
1964 | * | 1961 | * |
1965 | * @param cls the `struct GNUNET_ATS_Session` of the idle session | 1962 | * @param cls the `struct GNUNET_ATS_Session` of the idle session |
1966 | * @param tc scheduler context | ||
1967 | */ | 1963 | */ |
1968 | static void | 1964 | static void |
1969 | client_session_timeout (void *cls, | 1965 | client_session_timeout (void *cls) |
1970 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1971 | { | 1966 | { |
1972 | struct GNUNET_ATS_Session *s = cls; | 1967 | struct GNUNET_ATS_Session *s = cls; |
1973 | struct GNUNET_TIME_Relative left; | 1968 | struct GNUNET_TIME_Relative left; |
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index cc1548f20..dfd0294e5 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -491,14 +491,14 @@ notify_session_monitor (struct HTTP_Server_Plugin *plugin, | |||
491 | * Wake up an MHD connection which was suspended | 491 | * Wake up an MHD connection which was suspended |
492 | * | 492 | * |
493 | * @param cls the session | 493 | * @param cls the session |
494 | * @param tc task context | ||
495 | */ | 494 | */ |
496 | static void | 495 | static void |
497 | server_wake_up (void *cls, | 496 | server_wake_up (void *cls) |
498 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
499 | { | 497 | { |
500 | struct GNUNET_ATS_Session *s = cls; | 498 | struct GNUNET_ATS_Session *s = cls; |
499 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
501 | 500 | ||
501 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
502 | s->recv_wakeup_task = NULL; | 502 | s->recv_wakeup_task = NULL; |
503 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 503 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
504 | return; | 504 | return; |
@@ -641,11 +641,9 @@ http_server_plugin_disconnect_session (void *cls, | |||
641 | * Session was idle, so disconnect it | 641 | * Session was idle, so disconnect it |
642 | * | 642 | * |
643 | * @param cls the session | 643 | * @param cls the session |
644 | * @param tc task context | ||
645 | */ | 644 | */ |
646 | static void | 645 | static void |
647 | server_session_timeout (void *cls, | 646 | server_session_timeout (void *cls) |
648 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
649 | { | 647 | { |
650 | struct GNUNET_ATS_Session *s = cls; | 648 | struct GNUNET_ATS_Session *s = cls; |
651 | struct GNUNET_TIME_Relative left; | 649 | struct GNUNET_TIME_Relative left; |
@@ -910,15 +908,15 @@ http_server_plugin_get_session (void *cls, | |||
910 | * and schedule the next run. | 908 | * and schedule the next run. |
911 | * | 909 | * |
912 | * @param cls plugin as closure | 910 | * @param cls plugin as closure |
913 | * @param tc task context | ||
914 | */ | 911 | */ |
915 | static void | 912 | static void |
916 | server_v4_run (void *cls, | 913 | server_v4_run (void *cls) |
917 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
918 | { | 914 | { |
919 | struct HTTP_Server_Plugin *plugin = cls; | 915 | struct HTTP_Server_Plugin *plugin = cls; |
916 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
920 | 917 | ||
921 | plugin->server_v4_task = NULL; | 918 | plugin->server_v4_task = NULL; |
919 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
922 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 920 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
923 | return; | 921 | return; |
924 | plugin->server_v4_immediately = GNUNET_NO; | 922 | plugin->server_v4_immediately = GNUNET_NO; |
@@ -932,15 +930,15 @@ server_v4_run (void *cls, | |||
932 | * and schedule the next run. | 930 | * and schedule the next run. |
933 | * | 931 | * |
934 | * @param cls plugin as closure | 932 | * @param cls plugin as closure |
935 | * @param tc task context | ||
936 | */ | 933 | */ |
937 | static void | 934 | static void |
938 | server_v6_run (void *cls, | 935 | server_v6_run (void *cls) |
939 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
940 | { | 936 | { |
941 | struct HTTP_Server_Plugin *plugin = cls; | 937 | struct HTTP_Server_Plugin *plugin = cls; |
938 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
942 | 939 | ||
943 | plugin->server_v6_task = NULL; | 940 | plugin->server_v6_task = NULL; |
941 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
944 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 942 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
945 | return; | 943 | return; |
946 | plugin->server_v6_immediately = GNUNET_NO; | 944 | plugin->server_v6_immediately = GNUNET_NO; |
@@ -2844,19 +2842,19 @@ server_check_ipv6_support (struct HTTP_Server_Plugin *plugin) | |||
2844 | * Notify server about our external hostname | 2842 | * Notify server about our external hostname |
2845 | * | 2843 | * |
2846 | * @param cls plugin | 2844 | * @param cls plugin |
2847 | * @param tc task context (unused) | ||
2848 | */ | 2845 | */ |
2849 | static void | 2846 | static void |
2850 | server_notify_external_hostname (void *cls, | 2847 | server_notify_external_hostname (void *cls) |
2851 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2852 | { | 2848 | { |
2853 | struct HTTP_Server_Plugin *plugin = cls; | 2849 | struct HTTP_Server_Plugin *plugin = cls; |
2854 | struct HttpAddress *ext_addr; | 2850 | struct HttpAddress *ext_addr; |
2855 | size_t ext_addr_len; | 2851 | size_t ext_addr_len; |
2856 | unsigned int urlen; | 2852 | unsigned int urlen; |
2857 | char *url; | 2853 | char *url; |
2854 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
2858 | 2855 | ||
2859 | plugin->notify_ext_task = NULL; | 2856 | plugin->notify_ext_task = NULL; |
2857 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
2860 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 2858 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
2861 | return; | 2859 | return; |
2862 | 2860 | ||
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 52ab4414f..b1c68acdf 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -957,11 +957,9 @@ tcp_plugin_query_keepalive_factor (void *cls) | |||
957 | * Session was idle for too long, so disconnect it | 957 | * Session was idle for too long, so disconnect it |
958 | * | 958 | * |
959 | * @param cls the `struct GNUNET_ATS_Session` of the idle session | 959 | * @param cls the `struct GNUNET_ATS_Session` of the idle session |
960 | * @param tc scheduler context | ||
961 | */ | 960 | */ |
962 | static void | 961 | static void |
963 | session_timeout (void *cls, | 962 | session_timeout (void *cls) |
964 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
965 | { | 963 | { |
966 | struct GNUNET_ATS_Session *s = cls; | 964 | struct GNUNET_ATS_Session *s = cls; |
967 | struct GNUNET_TIME_Relative left; | 965 | struct GNUNET_TIME_Relative left; |
@@ -1457,11 +1455,9 @@ session_lookup_it (void *cls, | |||
1457 | * Task cleaning up a NAT connection attempt after timeout | 1455 | * Task cleaning up a NAT connection attempt after timeout |
1458 | * | 1456 | * |
1459 | * @param cls the `struct GNUNET_ATS_Session` | 1457 | * @param cls the `struct GNUNET_ATS_Session` |
1460 | * @param tc scheduler context (unused) | ||
1461 | */ | 1458 | */ |
1462 | static void | 1459 | static void |
1463 | nat_connect_timeout (void *cls, | 1460 | nat_connect_timeout (void *cls) |
1464 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1465 | { | 1461 | { |
1466 | struct GNUNET_ATS_Session *session = cls; | 1462 | struct GNUNET_ATS_Session *session = cls; |
1467 | 1463 | ||
@@ -1500,11 +1496,9 @@ tcp_plugin_update_session_timeout (void *cls, | |||
1500 | * receiving from the TCP client now. | 1496 | * receiving from the TCP client now. |
1501 | * | 1497 | * |
1502 | * @param cls the `struct GNUNET_ATS_Session *` | 1498 | * @param cls the `struct GNUNET_ATS_Session *` |
1503 | * @param tc task context (unused) | ||
1504 | */ | 1499 | */ |
1505 | static void | 1500 | static void |
1506 | delayed_done (void *cls, | 1501 | delayed_done (void *cls) |
1507 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1508 | { | 1502 | { |
1509 | struct GNUNET_ATS_Session *session = cls; | 1503 | struct GNUNET_ATS_Session *session = cls; |
1510 | 1504 | ||
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index ef470ffd1..89feb8f5c 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -728,11 +728,9 @@ udp_plugin_get_network_for_address (void *cls, | |||
728 | * Then reschedule this function to be called again once more is available. | 728 | * Then reschedule this function to be called again once more is available. |
729 | * | 729 | * |
730 | * @param cls the plugin handle | 730 | * @param cls the plugin handle |
731 | * @param tc the scheduling context (for rescheduling this function again) | ||
732 | */ | 731 | */ |
733 | static void | 732 | static void |
734 | udp_plugin_select_v4 (void *cls, | 733 | udp_plugin_select_v4 (void *cls); |
735 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
736 | 734 | ||
737 | 735 | ||
738 | /** | 736 | /** |
@@ -741,11 +739,9 @@ udp_plugin_select_v4 (void *cls, | |||
741 | * Then reschedule this function to be called again once more is available. | 739 | * Then reschedule this function to be called again once more is available. |
742 | * | 740 | * |
743 | * @param cls the plugin handle | 741 | * @param cls the plugin handle |
744 | * @param tc the scheduling context (for rescheduling this function again) | ||
745 | */ | 742 | */ |
746 | static void | 743 | static void |
747 | udp_plugin_select_v6 (void *cls, | 744 | udp_plugin_select_v6 (void *cls); |
748 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
749 | 745 | ||
750 | 746 | ||
751 | /** | 747 | /** |
@@ -2566,11 +2562,9 @@ udp_disconnect (void *cls, | |||
2566 | * Session was idle, so disconnect it. | 2562 | * Session was idle, so disconnect it. |
2567 | * | 2563 | * |
2568 | * @param cls the `struct GNUNET_ATS_Session` to time out | 2564 | * @param cls the `struct GNUNET_ATS_Session` to time out |
2569 | * @param tc scheduler context | ||
2570 | */ | 2565 | */ |
2571 | static void | 2566 | static void |
2572 | session_timeout (void *cls, | 2567 | session_timeout (void *cls) |
2573 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2574 | { | 2568 | { |
2575 | struct GNUNET_ATS_Session *s = cls; | 2569 | struct GNUNET_ATS_Session *s = cls; |
2576 | struct Plugin *plugin = s->plugin; | 2570 | struct Plugin *plugin = s->plugin; |
@@ -3516,14 +3510,14 @@ udp_select_send (struct Plugin *plugin, | |||
3516 | * Then reschedule this function to be called again once more is available. | 3510 | * Then reschedule this function to be called again once more is available. |
3517 | * | 3511 | * |
3518 | * @param cls the plugin handle | 3512 | * @param cls the plugin handle |
3519 | * @param tc the scheduling context | ||
3520 | */ | 3513 | */ |
3521 | static void | 3514 | static void |
3522 | udp_plugin_select_v4 (void *cls, | 3515 | udp_plugin_select_v4 (void *cls) |
3523 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3524 | { | 3516 | { |
3525 | struct Plugin *plugin = cls; | 3517 | struct Plugin *plugin = cls; |
3518 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
3526 | 3519 | ||
3520 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3527 | plugin->select_task_v4 = NULL; | 3521 | plugin->select_task_v4 = NULL; |
3528 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 3522 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
3529 | return; | 3523 | return; |
@@ -3546,14 +3540,14 @@ udp_plugin_select_v4 (void *cls, | |||
3546 | * Then reschedule this function to be called again once more is available. | 3540 | * Then reschedule this function to be called again once more is available. |
3547 | * | 3541 | * |
3548 | * @param cls the plugin handle | 3542 | * @param cls the plugin handle |
3549 | * @param tc the scheduling context | ||
3550 | */ | 3543 | */ |
3551 | static void | 3544 | static void |
3552 | udp_plugin_select_v6 (void *cls, | 3545 | udp_plugin_select_v6 (void *cls) |
3553 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3554 | { | 3546 | { |
3555 | struct Plugin *plugin = cls; | 3547 | struct Plugin *plugin = cls; |
3548 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
3556 | 3549 | ||
3550 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3557 | plugin->select_task_v6 = NULL; | 3551 | plugin->select_task_v6 = NULL; |
3558 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 3552 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
3559 | return; | 3553 | return; |
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index b2c9e1515..6c5efd5f1 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c | |||
@@ -232,8 +232,7 @@ prepare_beacon (struct Plugin *plugin, | |||
232 | 232 | ||
233 | 233 | ||
234 | static void | 234 | static void |
235 | udp_ipv4_broadcast_send (void *cls, | 235 | udp_ipv4_broadcast_send (void *cls) |
236 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
237 | { | 236 | { |
238 | struct BroadcastAddress *baddr = cls; | 237 | struct BroadcastAddress *baddr = cls; |
239 | struct Plugin *plugin = baddr->plugin; | 238 | struct Plugin *plugin = baddr->plugin; |
@@ -308,8 +307,7 @@ udp_ipv4_broadcast_send (void *cls, | |||
308 | 307 | ||
309 | 308 | ||
310 | static void | 309 | static void |
311 | udp_ipv6_broadcast_send (void *cls, | 310 | udp_ipv6_broadcast_send (void *cls) |
312 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
313 | { | 311 | { |
314 | struct BroadcastAddress *baddr = cls; | 312 | struct BroadcastAddress *baddr = cls; |
315 | struct Plugin *plugin = baddr->plugin; | 313 | struct Plugin *plugin = baddr->plugin; |
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 5ad5a0432..e320785d4 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -498,11 +498,9 @@ unix_plugin_session_disconnect (void *cls, | |||
498 | * Session was idle for too long, so disconnect it | 498 | * Session was idle for too long, so disconnect it |
499 | * | 499 | * |
500 | * @param cls the `struct GNUNET_ATS_Session *` to disconnect | 500 | * @param cls the `struct GNUNET_ATS_Session *` to disconnect |
501 | * @param tc scheduler context | ||
502 | */ | 501 | */ |
503 | static void | 502 | static void |
504 | session_timeout (void *cls, | 503 | session_timeout (void *cls) |
505 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
506 | { | 504 | { |
507 | struct GNUNET_ATS_Session *session = cls; | 505 | struct GNUNET_ATS_Session *session = cls; |
508 | struct GNUNET_TIME_Relative left; | 506 | struct GNUNET_TIME_Relative left; |
@@ -1225,14 +1223,14 @@ unix_plugin_do_write (struct Plugin *plugin) | |||
1225 | * Then reschedule this function to be called again once more is available. | 1223 | * Then reschedule this function to be called again once more is available. |
1226 | * | 1224 | * |
1227 | * @param cls the plugin handle | 1225 | * @param cls the plugin handle |
1228 | * @param tc the scheduling context | ||
1229 | */ | 1226 | */ |
1230 | static void | 1227 | static void |
1231 | unix_plugin_select_read (void *cls, | 1228 | unix_plugin_select_read (void *cls) |
1232 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1233 | { | 1229 | { |
1234 | struct Plugin *plugin = cls; | 1230 | struct Plugin *plugin = cls; |
1231 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1235 | 1232 | ||
1233 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1236 | plugin->read_task = NULL; | 1234 | plugin->read_task = NULL; |
1237 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1235 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1238 | return; | 1236 | return; |
@@ -1250,14 +1248,14 @@ unix_plugin_select_read (void *cls, | |||
1250 | * Then reschedule this function to be called again once more is available. | 1248 | * Then reschedule this function to be called again once more is available. |
1251 | * | 1249 | * |
1252 | * @param cls the plugin handle | 1250 | * @param cls the plugin handle |
1253 | * @param tc the scheduling context | ||
1254 | */ | 1251 | */ |
1255 | static void | 1252 | static void |
1256 | unix_plugin_select_write (void *cls, | 1253 | unix_plugin_select_write (void *cls) |
1257 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1258 | { | 1254 | { |
1259 | struct Plugin *plugin = cls; | 1255 | struct Plugin *plugin = cls; |
1256 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1260 | 1257 | ||
1258 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1261 | plugin->write_task = NULL; | 1259 | plugin->write_task = NULL; |
1262 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1260 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1263 | return; | 1261 | return; |
@@ -1617,11 +1615,9 @@ unix_plugin_string_to_address (void *cls, | |||
1617 | * Notify transport service about address | 1615 | * Notify transport service about address |
1618 | * | 1616 | * |
1619 | * @param cls the plugin | 1617 | * @param cls the plugin |
1620 | * @param tc unused | ||
1621 | */ | 1618 | */ |
1622 | static void | 1619 | static void |
1623 | address_notification (void *cls, | 1620 | address_notification (void *cls) |
1624 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1625 | { | 1621 | { |
1626 | struct Plugin *plugin = cls; | 1622 | struct Plugin *plugin = cls; |
1627 | struct GNUNET_HELLO_Address *address; | 1623 | struct GNUNET_HELLO_Address *address; |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 6e23299b9..9c9c1e8c2 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -828,11 +828,9 @@ wlan_plugin_query_keepalive_factor (void *cls) | |||
828 | * A session is timing out. Clean up. | 828 | * A session is timing out. Clean up. |
829 | * | 829 | * |
830 | * @param cls pointer to the Session | 830 | * @param cls pointer to the Session |
831 | * @param tc unused | ||
832 | */ | 831 | */ |
833 | static void | 832 | static void |
834 | session_timeout (void *cls, | 833 | session_timeout (void *cls) |
835 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
836 | { | 834 | { |
837 | struct GNUNET_ATS_Session *session = cls; | 835 | struct GNUNET_ATS_Session *session = cls; |
838 | struct GNUNET_TIME_Relative left; | 836 | struct GNUNET_TIME_Relative left; |
@@ -1072,11 +1070,9 @@ free_fragment_message (struct FragmentMessage *fm) | |||
1072 | * A FragmentMessage has timed out. Remove it. | 1070 | * A FragmentMessage has timed out. Remove it. |
1073 | * | 1071 | * |
1074 | * @param cls pointer to the 'struct FragmentMessage' | 1072 | * @param cls pointer to the 'struct FragmentMessage' |
1075 | * @param tc unused | ||
1076 | */ | 1073 | */ |
1077 | static void | 1074 | static void |
1078 | fragmentmessage_timeout (void *cls, | 1075 | fragmentmessage_timeout (void *cls) |
1079 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1080 | { | 1076 | { |
1081 | struct FragmentMessage *fm = cls; | 1077 | struct FragmentMessage *fm = cls; |
1082 | 1078 | ||
@@ -1200,11 +1196,9 @@ free_macendpoint (struct MacEndpoint *endpoint) | |||
1200 | * A MAC endpoint is timing out. Clean up. | 1196 | * A MAC endpoint is timing out. Clean up. |
1201 | * | 1197 | * |
1202 | * @param cls pointer to the `struct MacEndpoint *` | 1198 | * @param cls pointer to the `struct MacEndpoint *` |
1203 | * @param tc pointer to the GNUNET_SCHEDULER_TaskContext | ||
1204 | */ | 1199 | */ |
1205 | static void | 1200 | static void |
1206 | macendpoint_timeout (void *cls, | 1201 | macendpoint_timeout (void *cls) |
1207 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1208 | { | 1202 | { |
1209 | struct MacEndpoint *endpoint = cls; | 1203 | struct MacEndpoint *endpoint = cls; |
1210 | struct GNUNET_TIME_Relative timeout; | 1204 | struct GNUNET_TIME_Relative timeout; |
@@ -1681,11 +1675,9 @@ process_data (void *cls, | |||
1681 | * Task to (periodically) send a HELLO beacon | 1675 | * Task to (periodically) send a HELLO beacon |
1682 | * | 1676 | * |
1683 | * @param cls pointer to the plugin struct | 1677 | * @param cls pointer to the plugin struct |
1684 | * @param tc scheduler context | ||
1685 | */ | 1678 | */ |
1686 | static void | 1679 | static void |
1687 | send_hello_beacon (void *cls, | 1680 | send_hello_beacon (void *cls) |
1688 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1689 | { | 1681 | { |
1690 | struct Plugin *plugin = cls; | 1682 | struct Plugin *plugin = cls; |
1691 | uint16_t size; | 1683 | uint16_t size; |
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index b906020bb..e75cb7c7f 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c | |||
@@ -184,7 +184,7 @@ end () | |||
184 | 184 | ||
185 | 185 | ||
186 | static void | 186 | static void |
187 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 187 | end_badly (void *cls) |
188 | { | 188 | { |
189 | struct AddressWrapper *w; | 189 | struct AddressWrapper *w; |
190 | int c = 0; | 190 | int c = 0; |
@@ -255,7 +255,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
255 | } | 255 | } |
256 | 256 | ||
257 | static void | 257 | static void |
258 | wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 258 | wait_end (void *cls) |
259 | { | 259 | { |
260 | timeout_wait = NULL; | 260 | timeout_wait = NULL; |
261 | if (0 == addresses_reported) | 261 | if (0 == addresses_reported) |
@@ -325,8 +325,7 @@ address_pretty_printer_cb (void *cls, const char *address, int res) | |||
325 | 325 | ||
326 | 326 | ||
327 | static void | 327 | static void |
328 | test_addr_string (void *cls, | 328 | test_addr_string (void *cls) |
329 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
330 | { | 329 | { |
331 | struct AddressWrapper *w = cls; | 330 | struct AddressWrapper *w = cls; |
332 | void *s2a; | 331 | void *s2a; |
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index ad1ecbe7a..3889aa0ef 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -354,7 +354,7 @@ sendtask () | |||
354 | 354 | ||
355 | 355 | ||
356 | static void | 356 | static void |
357 | measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 357 | measure (void *cls) |
358 | { | 358 | { |
359 | static int counter; | 359 | static int counter; |
360 | 360 | ||
diff --git a/src/transport/test_transport_address_switch.c b/src/transport/test_transport_address_switch.c index 2780767ff..6c86a160f 100644 --- a/src/transport/test_transport_address_switch.c +++ b/src/transport/test_transport_address_switch.c | |||
@@ -564,8 +564,7 @@ sendtask () | |||
564 | 564 | ||
565 | 565 | ||
566 | static void | 566 | static void |
567 | progress_indicator (void *cls, | 567 | progress_indicator (void *cls) |
568 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
569 | { | 568 | { |
570 | static int counter; | 569 | static int counter; |
571 | 570 | ||
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 2ebd80a0c..13333b371 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -96,8 +96,9 @@ end () | |||
96 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); | 96 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); |
97 | } | 97 | } |
98 | 98 | ||
99 | |||
99 | static void | 100 | static void |
100 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 101 | end_badly (void *cls) |
101 | { | 102 | { |
102 | die_task = NULL; | 103 | die_task = NULL; |
103 | 104 | ||
@@ -225,10 +226,12 @@ notify_ready (void *cls, size_t size, void *buf) | |||
225 | 226 | ||
226 | 227 | ||
227 | static void | 228 | static void |
228 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 229 | sendtask (void *cls) |
229 | { | 230 | { |
230 | send_task = NULL; | 231 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
231 | 232 | ||
233 | send_task = NULL; | ||
234 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
232 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 235 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
233 | return; | 236 | return; |
234 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 237 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
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 | ||
97 | static void | 97 | static void |
98 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 98 | end_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 | ||
210 | static void | 210 | static void |
211 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 211 | sendtask (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)); |
diff --git a/src/transport/test_transport_api_blacklisting.c b/src/transport/test_transport_api_blacklisting.c index 275567131..f65fb74f9 100644 --- a/src/transport/test_transport_api_blacklisting.c +++ b/src/transport/test_transport_api_blacklisting.c | |||
@@ -76,7 +76,7 @@ static struct GNUNET_SCHEDULER_Task * shutdown_task; | |||
76 | 76 | ||
77 | 77 | ||
78 | static void | 78 | static void |
79 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 79 | end (void *cls) |
80 | { | 80 | { |
81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); | 81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); |
82 | 82 | ||
@@ -136,8 +136,9 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | |||
139 | static void | 140 | static void |
140 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 141 | end_badly (void *cls) |
141 | { | 142 | { |
142 | if (send_task != NULL) | 143 | if (send_task != NULL) |
143 | { | 144 | { |
@@ -259,10 +260,12 @@ notify_ready (void *cls, size_t size, void *buf) | |||
259 | 260 | ||
260 | 261 | ||
261 | static void | 262 | static void |
262 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 263 | sendtask (void *cls) |
263 | { | 264 | { |
264 | send_task = NULL; | 265 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
265 | 266 | ||
267 | send_task = NULL; | ||
268 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
266 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 269 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
267 | return; | 270 | return; |
268 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 271 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c index c6b247c1d..36497ece5 100644 --- a/src/transport/test_transport_api_disconnect.c +++ b/src/transport/test_transport_api_disconnect.c | |||
@@ -107,8 +107,9 @@ end () | |||
107 | ok = 0; | 107 | ok = 0; |
108 | } | 108 | } |
109 | 109 | ||
110 | |||
110 | static void | 111 | static void |
111 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | end_badly (void *cls) |
112 | { | 113 | { |
113 | die_task = NULL; | 114 | die_task = NULL; |
114 | 115 | ||
@@ -162,8 +163,11 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
162 | 163 | ||
163 | 164 | ||
164 | static void | 165 | static void |
165 | stop_peer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 166 | stop_peer (void *cls) |
166 | { | 167 | { |
168 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
169 | |||
170 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
167 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 171 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
168 | return; | 172 | return; |
169 | 173 | ||
@@ -248,10 +252,12 @@ notify_ready (void *cls, size_t size, void *buf) | |||
248 | 252 | ||
249 | 253 | ||
250 | static void | 254 | static void |
251 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 255 | sendtask (void *cls) |
252 | { | 256 | { |
253 | send_task = NULL; | 257 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
254 | 258 | ||
259 | send_task = NULL; | ||
260 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
255 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 261 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
256 | return; | 262 | return; |
257 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 263 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 284f5b9cc..8d875ed52 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -102,7 +102,7 @@ end () | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static void | 104 | static void |
105 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 105 | end_badly (void *cls) |
106 | { | 106 | { |
107 | die_task = NULL; | 107 | die_task = NULL; |
108 | 108 | ||
@@ -194,11 +194,14 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
194 | th = NULL; | 194 | th = NULL; |
195 | } | 195 | } |
196 | 196 | ||
197 | |||
197 | static void | 198 | static void |
198 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 199 | sendtask (void *cls) |
199 | { | 200 | { |
200 | send_task = NULL; | 201 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
201 | 202 | ||
203 | send_task = NULL; | ||
204 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
202 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 205 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
203 | return; | 206 | return; |
204 | 207 | ||
@@ -354,4 +357,3 @@ main (int argc, char *argv[]) | |||
354 | #endif | 357 | #endif |
355 | 358 | ||
356 | /* end of test_transport_api_limited_sockets.c */ | 359 | /* end of test_transport_api_limited_sockets.c */ |
357 | |||
diff --git a/src/transport/test_transport_api_manipulation_cfg.c b/src/transport/test_transport_api_manipulation_cfg.c index 89d5fe4d9..915b79719 100644 --- a/src/transport/test_transport_api_manipulation_cfg.c +++ b/src/transport/test_transport_api_manipulation_cfg.c | |||
@@ -109,7 +109,7 @@ end () | |||
109 | 109 | ||
110 | 110 | ||
111 | static void | 111 | static void |
112 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | end_badly (void *cls) |
113 | { | 113 | { |
114 | die_task = NULL; | 114 | die_task = NULL; |
115 | 115 | ||
@@ -204,11 +204,12 @@ notify_request_ready (void *cls, size_t size, void *buf) | |||
204 | 204 | ||
205 | 205 | ||
206 | static void | 206 | static void |
207 | sendtask_request_task (void *cls, | 207 | sendtask_request_task (void *cls) |
208 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
209 | { | 208 | { |
210 | send_task = NULL; | 209 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
211 | 210 | ||
211 | send_task = NULL; | ||
212 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
212 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 213 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
213 | return; | 214 | return; |
214 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p2->id)); | 215 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p2->id)); |
@@ -269,11 +270,12 @@ notify_response_ready (void *cls, size_t size, void *buf) | |||
269 | 270 | ||
270 | 271 | ||
271 | static void | 272 | static void |
272 | sendtask_response_task (void *cls, | 273 | sendtask_response_task (void *cls) |
273 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
274 | { | 274 | { |
275 | send_task = NULL; | 275 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
276 | 276 | ||
277 | send_task = NULL; | ||
278 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
277 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 279 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
278 | return; | 280 | return; |
279 | { | 281 | { |
diff --git a/src/transport/test_transport_api_manipulation_recv_tcp.c b/src/transport/test_transport_api_manipulation_recv_tcp.c index f48abfc7c..7b82236f9 100644 --- a/src/transport/test_transport_api_manipulation_recv_tcp.c +++ b/src/transport/test_transport_api_manipulation_recv_tcp.c | |||
@@ -104,8 +104,9 @@ end () | |||
104 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); | 104 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); |
105 | } | 105 | } |
106 | 106 | ||
107 | |||
107 | static void | 108 | static void |
108 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 109 | end_badly (void *cls) |
109 | { | 110 | { |
110 | die_task = NULL; | 111 | die_task = NULL; |
111 | 112 | ||
@@ -158,7 +159,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
158 | 159 | ||
159 | 160 | ||
160 | static void | 161 | static void |
161 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 162 | sendtask (void *cls); |
163 | |||
162 | 164 | ||
163 | static void | 165 | static void |
164 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 166 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
@@ -288,11 +290,12 @@ notify_ready (void *cls, size_t size, void *buf) | |||
288 | 290 | ||
289 | 291 | ||
290 | static void | 292 | static void |
291 | sendtask (void *cls, | 293 | sendtask (void *cls) |
292 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
293 | { | 294 | { |
294 | send_task = NULL; | 295 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
295 | 296 | ||
297 | send_task = NULL; | ||
298 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
296 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 299 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
297 | return; | 300 | return; |
298 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 301 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c index c2eaf7a50..22b420c27 100644 --- a/src/transport/test_transport_api_manipulation_send_tcp.c +++ b/src/transport/test_transport_api_manipulation_send_tcp.c | |||
@@ -107,7 +107,7 @@ end () | |||
107 | 107 | ||
108 | 108 | ||
109 | static void | 109 | static void |
110 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 110 | end_badly (void *cls) |
111 | { | 111 | { |
112 | die_task = NULL; | 112 | die_task = NULL; |
113 | 113 | ||
@@ -160,7 +160,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
160 | 160 | ||
161 | 161 | ||
162 | static void | 162 | static void |
163 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 163 | sendtask (void *cls); |
164 | 164 | ||
165 | 165 | ||
166 | static void | 166 | static void |
@@ -284,13 +284,14 @@ notify_ready (void *cls, size_t size, void *buf) | |||
284 | 284 | ||
285 | 285 | ||
286 | static void | 286 | static void |
287 | sendtask (void *cls, | 287 | sendtask (void *cls) |
288 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
289 | { | 288 | { |
290 | struct GNUNET_TIME_Relative delay; | 289 | struct GNUNET_TIME_Relative delay; |
291 | struct GNUNET_ATS_Properties prop; | 290 | struct GNUNET_ATS_Properties prop; |
291 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
292 | 292 | ||
293 | send_task = NULL; | 293 | send_task = NULL; |
294 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
294 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 295 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
295 | return; | 296 | return; |
296 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 297 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_monitor_peers.c b/src/transport/test_transport_api_monitor_peers.c index 152667a0b..79b39325c 100644 --- a/src/transport/test_transport_api_monitor_peers.c +++ b/src/transport/test_transport_api_monitor_peers.c | |||
@@ -129,8 +129,7 @@ end () | |||
129 | 129 | ||
130 | 130 | ||
131 | static void | 131 | static void |
132 | end_badly (void *cls, | 132 | end_badly (void *cls) |
133 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
134 | { | 133 | { |
135 | die_task = NULL; | 134 | die_task = NULL; |
136 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); | 135 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); |
@@ -261,10 +260,12 @@ notify_ready (void *cls, size_t size, void *buf) | |||
261 | 260 | ||
262 | 261 | ||
263 | static void | 262 | static void |
264 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 263 | sendtask (void *cls) |
265 | { | 264 | { |
266 | send_task = NULL; | 265 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
267 | 266 | ||
267 | send_task = NULL; | ||
268 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
268 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 269 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
269 | return; | 270 | return; |
270 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 271 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_monitor_validation.c b/src/transport/test_transport_api_monitor_validation.c index 907b9275f..37b8494f1 100644 --- a/src/transport/test_transport_api_monitor_validation.c +++ b/src/transport/test_transport_api_monitor_validation.c | |||
@@ -122,7 +122,7 @@ end () | |||
122 | } | 122 | } |
123 | 123 | ||
124 | static void | 124 | static void |
125 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 125 | end_badly (void *cls) |
126 | { | 126 | { |
127 | die_task = NULL; | 127 | die_task = NULL; |
128 | 128 | ||
@@ -273,10 +273,12 @@ notify_ready (void *cls, | |||
273 | 273 | ||
274 | 274 | ||
275 | static void | 275 | static void |
276 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 276 | sendtask (void *cls) |
277 | { | 277 | { |
278 | send_task = NULL; | 278 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
279 | 279 | ||
280 | send_task = NULL; | ||
281 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
280 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 282 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
281 | return; | 283 | return; |
282 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 284 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 86f294240..cc2115a48 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -526,8 +526,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
526 | 526 | ||
527 | 527 | ||
528 | static void | 528 | static void |
529 | sendtask (void *cls, | 529 | sendtask (void *cls) |
530 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
531 | { | 530 | { |
532 | start_time = GNUNET_TIME_absolute_get (); | 531 | start_time = GNUNET_TIME_absolute_get (); |
533 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 532 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c index f51b70e92..adec15f4f 100644 --- a/src/transport/test_transport_api_restart_1peer.c +++ b/src/transport/test_transport_api_restart_1peer.c | |||
@@ -112,8 +112,7 @@ end () | |||
112 | 112 | ||
113 | 113 | ||
114 | static void | 114 | static void |
115 | end_badly (void *cls, | 115 | end_badly (void *cls) |
116 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
117 | { | 116 | { |
118 | die_task = NULL; | 117 | die_task = NULL; |
119 | 118 | ||
@@ -259,10 +258,12 @@ notify_ready (void *cls, size_t size, void *buf) | |||
259 | 258 | ||
260 | 259 | ||
261 | static void | 260 | static void |
262 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 261 | sendtask (void *cls) |
263 | { | 262 | { |
264 | send_task = NULL; | 263 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
265 | 264 | ||
265 | send_task = NULL; | ||
266 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
266 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 267 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
267 | return; | 268 | return; |
268 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 269 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c index 985148d54..2a669c9a0 100644 --- a/src/transport/test_transport_api_restart_2peers.c +++ b/src/transport/test_transport_api_restart_2peers.c | |||
@@ -105,8 +105,7 @@ end () | |||
105 | 105 | ||
106 | 106 | ||
107 | static void | 107 | static void |
108 | end_badly (void *cls, | 108 | end_badly (void *cls) |
109 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
110 | { | 109 | { |
111 | die_task = NULL; | 110 | die_task = NULL; |
112 | 111 | ||
@@ -265,11 +264,12 @@ notify_ready (void *cls, | |||
265 | 264 | ||
266 | 265 | ||
267 | static void | 266 | static void |
268 | sendtask (void *cls, | 267 | sendtask (void *cls) |
269 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
270 | { | 268 | { |
271 | send_task = NULL; | 269 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
272 | 270 | ||
271 | send_task = NULL; | ||
272 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
273 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 273 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
274 | return; | 274 | return; |
275 | 275 | ||
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 | ||
diff --git a/src/transport/test_transport_blacklisting.c b/src/transport/test_transport_blacklisting.c index 8ac198cfe..6cb598f2f 100644 --- a/src/transport/test_transport_blacklisting.c +++ b/src/transport/test_transport_blacklisting.c | |||
@@ -85,11 +85,13 @@ static struct GNUNET_SCHEDULER_Task * stage_task; | |||
85 | #define OKPP do { ok++; } while (0) | 85 | #define OKPP do { ok++; } while (0) |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | |||
88 | static void | 89 | static void |
89 | run_stage(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 90 | run_stage(void *cls); |
91 | |||
90 | 92 | ||
91 | static void | 93 | static void |
92 | end(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 94 | end (void *cls) |
93 | { | 95 | { |
94 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); | 96 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); |
95 | 97 | ||
@@ -129,8 +131,9 @@ end(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
129 | } | 131 | } |
130 | } | 132 | } |
131 | 133 | ||
134 | |||
132 | static void | 135 | static void |
133 | end_badly(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 136 | end_badly (void *cls) |
134 | { | 137 | { |
135 | die_task = NULL; | 138 | die_task = NULL; |
136 | 139 | ||
@@ -172,17 +175,20 @@ testing_connect_cb(struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
172 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL ); | 175 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL ); |
173 | } | 176 | } |
174 | 177 | ||
178 | |||
175 | static void | 179 | static void |
176 | connect_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 180 | connect_timeout(void *cls) |
177 | { | 181 | { |
178 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peers not connected, next stage\n"); | 182 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peers not connected, next stage\n"); |
179 | timeout_task = NULL; | 183 | timeout_task = NULL; |
180 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL ); | 184 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL); |
181 | } | 185 | } |
182 | 186 | ||
187 | |||
183 | static int started; | 188 | static int started; |
184 | 189 | ||
185 | void | 190 | |
191 | static void | ||
186 | start_cb(struct PeerContext *p, void *cls) | 192 | start_cb(struct PeerContext *p, void *cls) |
187 | { | 193 | { |
188 | 194 | ||
@@ -243,8 +249,9 @@ static int check_blacklist_config (char *cfg_file, | |||
243 | return GNUNET_OK; | 249 | return GNUNET_OK; |
244 | } | 250 | } |
245 | 251 | ||
252 | |||
246 | static void | 253 | static void |
247 | run_stage(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 254 | run_stage (void *cls) |
248 | { | 255 | { |
249 | stage_task = NULL; | 256 | stage_task = NULL; |
250 | if (NULL != die_task) | 257 | if (NULL != die_task) |
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index b23a516f5..d49e3a8c0 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c | |||
@@ -63,9 +63,13 @@ end () | |||
63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n"); | 63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n"); |
64 | } | 64 | } |
65 | 65 | ||
66 | |||
66 | static void | 67 | static void |
67 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | end_badly (void *cls) |
68 | { | 69 | { |
70 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
71 | |||
72 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
69 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 73 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
70 | 74 | ||
71 | timeout_task = NULL; | 75 | timeout_task = NULL; |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 7538e2d6a..652a4e08f 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -195,11 +195,9 @@ get_hello (void *cb_cls, | |||
195 | * Offer the current HELLO of P2 to P1. | 195 | * Offer the current HELLO of P2 to P1. |
196 | * | 196 | * |
197 | * @param cls our `struct GNUNET_TRANSPORT_TESTING_ConnectRequest ` | 197 | * @param cls our `struct GNUNET_TRANSPORT_TESTING_ConnectRequest ` |
198 | * @param tc scheduler context | ||
199 | */ | 198 | */ |
200 | static void | 199 | static void |
201 | offer_hello (void *cls, | 200 | offer_hello (void *cls); |
202 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
203 | 201 | ||
204 | 202 | ||
205 | /** | 203 | /** |
@@ -207,8 +205,7 @@ offer_hello (void *cls, | |||
207 | * transport service. | 205 | * transport service. |
208 | */ | 206 | */ |
209 | static void | 207 | static void |
210 | hello_offered (void *cls, | 208 | hello_offered (void *cls) |
211 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
212 | { | 209 | { |
213 | struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls; | 210 | struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls; |
214 | 211 | ||
@@ -224,17 +221,17 @@ hello_offered (void *cls, | |||
224 | * Offer the current HELLO of P2 to P1. | 221 | * Offer the current HELLO of P2 to P1. |
225 | * | 222 | * |
226 | * @param cls our `struct GNUNET_TRANSPORT_TESTING_ConnectRequest ` | 223 | * @param cls our `struct GNUNET_TRANSPORT_TESTING_ConnectRequest ` |
227 | * @param tc scheduler context | ||
228 | */ | 224 | */ |
229 | static void | 225 | static void |
230 | offer_hello (void *cls, | 226 | offer_hello (void *cls) |
231 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
232 | { | 227 | { |
233 | struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls; | 228 | struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls; |
234 | struct PeerContext *p1 = cc->p1; | 229 | struct PeerContext *p1 = cc->p1; |
235 | struct PeerContext *p2 = cc->p2; | 230 | struct PeerContext *p2 = cc->p2; |
231 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
236 | 232 | ||
237 | cc->tct = NULL; | 233 | cc->tct = NULL; |
234 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
238 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 235 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
239 | return; | 236 | return; |
240 | { | 237 | { |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index b5f9e0a6b..6fc538f25 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -401,11 +401,9 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h); | |||
401 | * A neighbour has not gotten a SEND_OK in a while. Print a warning. | 401 | * A neighbour has not gotten a SEND_OK in a while. Print a warning. |
402 | * | 402 | * |
403 | * @param cls the `struct Neighbour` | 403 | * @param cls the `struct Neighbour` |
404 | * @param tc scheduler context | ||
405 | */ | 404 | */ |
406 | static void | 405 | static void |
407 | do_warn_unready (void *cls, | 406 | do_warn_unready (void *cls) |
408 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
409 | { | 407 | { |
410 | struct Neighbour *n = cls; | 408 | struct Neighbour *n = cls; |
411 | struct GNUNET_TIME_Relative delay; | 409 | struct GNUNET_TIME_Relative delay; |
@@ -830,11 +828,9 @@ demultiplexer (void *cls, | |||
830 | * network congestion. Notify the initiator and clean up. | 828 | * network congestion. Notify the initiator and clean up. |
831 | * | 829 | * |
832 | * @param cls the `struct GNUNET_TRANSPORT_TransmitHandle` | 830 | * @param cls the `struct GNUNET_TRANSPORT_TransmitHandle` |
833 | * @param tc scheduler context | ||
834 | */ | 831 | */ |
835 | static void | 832 | static void |
836 | timeout_request_due_to_congestion (void *cls, | 833 | timeout_request_due_to_congestion (void *cls) |
837 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
838 | { | 834 | { |
839 | struct GNUNET_TRANSPORT_TransmitHandle *th = cls; | 835 | struct GNUNET_TRANSPORT_TransmitHandle *th = cls; |
840 | struct Neighbour *n = th->neighbour; | 836 | struct Neighbour *n = th->neighbour; |
@@ -1015,11 +1011,9 @@ transport_notify_ready (void *cls, | |||
1015 | * list or the peer message queues to the service. | 1011 | * list or the peer message queues to the service. |
1016 | * | 1012 | * |
1017 | * @param cls transport service to schedule a transmission for | 1013 | * @param cls transport service to schedule a transmission for |
1018 | * @param tc scheduler context | ||
1019 | */ | 1014 | */ |
1020 | static void | 1015 | static void |
1021 | schedule_transmission_task (void *cls, | 1016 | schedule_transmission_task (void *cls) |
1022 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1023 | { | 1017 | { |
1024 | struct GNUNET_TRANSPORT_Handle *h = cls; | 1018 | struct GNUNET_TRANSPORT_Handle *h = cls; |
1025 | size_t size; | 1019 | size_t size; |
@@ -1197,15 +1191,15 @@ send_start (void *cls, | |||
1197 | * Try again to connect to transport service. | 1191 | * Try again to connect to transport service. |
1198 | * | 1192 | * |
1199 | * @param cls the handle to the transport service | 1193 | * @param cls the handle to the transport service |
1200 | * @param tc scheduler context | ||
1201 | */ | 1194 | */ |
1202 | static void | 1195 | static void |
1203 | reconnect (void *cls, | 1196 | reconnect (void *cls) |
1204 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1205 | { | 1197 | { |
1206 | struct GNUNET_TRANSPORT_Handle *h = cls; | 1198 | struct GNUNET_TRANSPORT_Handle *h = cls; |
1199 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1207 | 1200 | ||
1208 | h->reconnect_task = NULL; | 1201 | h->reconnect_task = NULL; |
1202 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1209 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1203 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1210 | { | 1204 | { |
1211 | /* shutdown, just give up */ | 1205 | /* shutdown, just give up */ |
@@ -1315,19 +1309,14 @@ send_hello (void *cls, | |||
1315 | struct GNUNET_TRANSPORT_OfferHelloHandle *ohh = cls; | 1309 | struct GNUNET_TRANSPORT_OfferHelloHandle *ohh = cls; |
1316 | struct GNUNET_MessageHeader *msg = ohh->msg; | 1310 | struct GNUNET_MessageHeader *msg = ohh->msg; |
1317 | uint16_t ssize; | 1311 | uint16_t ssize; |
1318 | struct GNUNET_SCHEDULER_TaskContext tc; | ||
1319 | 1312 | ||
1320 | tc.read_ready = NULL; | ||
1321 | tc.write_ready = NULL; | ||
1322 | tc.reason = GNUNET_SCHEDULER_REASON_TIMEOUT; | ||
1323 | if (NULL == buf) | 1313 | if (NULL == buf) |
1324 | { | 1314 | { |
1325 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1315 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1326 | "Timeout while trying to transmit `%s' request.\n", | 1316 | "Timeout while trying to transmit `%s' request.\n", |
1327 | "HELLO"); | 1317 | "HELLO"); |
1328 | if (NULL != ohh->cont) | 1318 | if (NULL != ohh->cont) |
1329 | ohh->cont (ohh->cls, | 1319 | ohh->cont (ohh->cls); |
1330 | &tc); | ||
1331 | GNUNET_free (msg); | 1320 | GNUNET_free (msg); |
1332 | GNUNET_CONTAINER_DLL_remove (ohh->th->oh_head, | 1321 | GNUNET_CONTAINER_DLL_remove (ohh->th->oh_head, |
1333 | ohh->th->oh_tail, | 1322 | ohh->th->oh_tail, |
@@ -1344,10 +1333,8 @@ send_hello (void *cls, | |||
1344 | msg, | 1333 | msg, |
1345 | ssize); | 1334 | ssize); |
1346 | GNUNET_free (msg); | 1335 | GNUNET_free (msg); |
1347 | tc.reason = GNUNET_SCHEDULER_REASON_READ_READY; | ||
1348 | if (NULL != ohh->cont) | 1336 | if (NULL != ohh->cont) |
1349 | ohh->cont (ohh->cls, | 1337 | ohh->cont (ohh->cls); |
1350 | &tc); | ||
1351 | GNUNET_CONTAINER_DLL_remove (ohh->th->oh_head, | 1338 | GNUNET_CONTAINER_DLL_remove (ohh->th->oh_head, |
1352 | ohh->th->oh_tail, | 1339 | ohh->th->oh_tail, |
1353 | ohh); | 1340 | ohh); |
@@ -1529,11 +1516,9 @@ GNUNET_TRANSPORT_check_peer_connected (struct GNUNET_TRANSPORT_Handle *handle, | |||
1529 | * Task to call the HelloUpdateCallback of the GetHelloHandle | 1516 | * Task to call the HelloUpdateCallback of the GetHelloHandle |
1530 | * | 1517 | * |
1531 | * @param cls the `struct GNUNET_TRANSPORT_GetHelloHandle` | 1518 | * @param cls the `struct GNUNET_TRANSPORT_GetHelloHandle` |
1532 | * @param tc the scheduler task context | ||
1533 | */ | 1519 | */ |
1534 | static void | 1520 | static void |
1535 | call_hello_update_cb_async (void *cls, | 1521 | call_hello_update_cb_async (void *cls) |
1536 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1537 | { | 1522 | { |
1538 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh = cls; | 1523 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh = cls; |
1539 | 1524 | ||
diff --git a/src/transport/transport_api_monitor_peers.c b/src/transport/transport_api_monitor_peers.c index 109461090..5d19ad6d7 100644 --- a/src/transport/transport_api_monitor_peers.c +++ b/src/transport/transport_api_monitor_peers.c | |||
@@ -204,11 +204,9 @@ send_peer_mon_request (struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx) | |||
204 | * Task run to re-establish the connection. | 204 | * Task run to re-establish the connection. |
205 | * | 205 | * |
206 | * @param cls our `struct GNUNET_TRANSPORT_PeerMonitoringContext *` | 206 | * @param cls our `struct GNUNET_TRANSPORT_PeerMonitoringContext *` |
207 | * @param tc scheduler context, unused | ||
208 | */ | 207 | */ |
209 | static void | 208 | static void |
210 | do_peer_connect (void *cls, | 209 | do_peer_connect (void *cls) |
211 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
212 | { | 210 | { |
213 | struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls; | 211 | struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls; |
214 | 212 | ||
diff --git a/src/transport/transport_api_monitor_plugins.c b/src/transport/transport_api_monitor_plugins.c index 9a7b3e44f..eef4a0830 100644 --- a/src/transport/transport_api_monitor_plugins.c +++ b/src/transport/transport_api_monitor_plugins.c | |||
@@ -133,11 +133,9 @@ send_plugin_mon_request (struct GNUNET_TRANSPORT_PluginMonitor *pm) | |||
133 | * Task run to re-establish the connection. | 133 | * Task run to re-establish the connection. |
134 | * | 134 | * |
135 | * @param cls our `struct GNUNET_TRANSPORT_PluginMonitor *` | 135 | * @param cls our `struct GNUNET_TRANSPORT_PluginMonitor *` |
136 | * @param tc scheduler context, unused | ||
137 | */ | 136 | */ |
138 | static void | 137 | static void |
139 | do_plugin_connect (void *cls, | 138 | do_plugin_connect (void *cls) |
140 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
141 | { | 139 | { |
142 | struct GNUNET_TRANSPORT_PluginMonitor *pm = cls; | 140 | struct GNUNET_TRANSPORT_PluginMonitor *pm = cls; |
143 | 141 | ||
diff --git a/src/transport/transport_api_monitor_validation.c b/src/transport/transport_api_monitor_validation.c index 04463c86a..fa76645dd 100644 --- a/src/transport/transport_api_monitor_validation.c +++ b/src/transport/transport_api_monitor_validation.c | |||
@@ -154,11 +154,9 @@ send_val_mon_request (struct GNUNET_TRANSPORT_ValidationMonitoringContext *val_c | |||
154 | * Task run to re-establish the connection. | 154 | * Task run to re-establish the connection. |
155 | * | 155 | * |
156 | * @param cls our `struct GNUNET_TRANSPORT_ValidationMonitoringContext *` | 156 | * @param cls our `struct GNUNET_TRANSPORT_ValidationMonitoringContext *` |
157 | * @param tc scheduler context, unused | ||
158 | */ | 157 | */ |
159 | static void | 158 | static void |
160 | do_val_connect (void *cls, | 159 | do_val_connect (void *cls) |
161 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
162 | { | 160 | { |
163 | struct GNUNET_TRANSPORT_ValidationMonitoringContext *val_ctx = cls; | 161 | struct GNUNET_TRANSPORT_ValidationMonitoringContext *val_ctx = cls; |
164 | 162 | ||
@@ -293,7 +291,7 @@ val_response_processor (void *cls, | |||
293 | } | 291 | } |
294 | addr = (const char *) &vr_msg[1]; | 292 | addr = (const char *) &vr_msg[1]; |
295 | transport_name = &addr[alen]; | 293 | transport_name = &addr[alen]; |
296 | 294 | ||
297 | if (transport_name[tlen - 1] != '\0') | 295 | if (transport_name[tlen - 1] != '\0') |
298 | { | 296 | { |
299 | /* Corrupt plugin name */ | 297 | /* Corrupt plugin name */ |
@@ -314,7 +312,7 @@ val_response_processor (void *cls, | |||
314 | } | 312 | } |
315 | return; | 313 | return; |
316 | } | 314 | } |
317 | 315 | ||
318 | /* notify client */ | 316 | /* notify client */ |
319 | address = GNUNET_HELLO_address_allocate (&vr_msg->peer, | 317 | address = GNUNET_HELLO_address_allocate (&vr_msg->peer, |
320 | transport_name, | 318 | transport_name, |
diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c index 5fbb608e7..2df2a9449 100644 --- a/src/util/bandwidth.c +++ b/src/util/bandwidth.c | |||
@@ -142,11 +142,9 @@ GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, | |||
142 | * Task run whenever we hit the bandwidth limit for a tracker. | 142 | * Task run whenever we hit the bandwidth limit for a tracker. |
143 | * | 143 | * |
144 | * @param cls the `struct GNUNET_BANDWIDTH_Tracker` | 144 | * @param cls the `struct GNUNET_BANDWIDTH_Tracker` |
145 | * @param tc scheduler context | ||
146 | */ | 145 | */ |
147 | static void | 146 | static void |
148 | excess_trigger (void *cls, | 147 | excess_trigger (void *cls) |
149 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
150 | { | 148 | { |
151 | struct GNUNET_BANDWIDTH_Tracker *av = cls; | 149 | struct GNUNET_BANDWIDTH_Tracker *av = cls; |
152 | 150 | ||
diff --git a/src/util/client.c b/src/util/client.c index d87be74f6..f93fd1d10 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -579,11 +579,9 @@ receive_helper (void *cls, | |||
579 | * Continuation to call the receive callback. | 579 | * Continuation to call the receive callback. |
580 | * | 580 | * |
581 | * @param cls our handle to the client connection | 581 | * @param cls our handle to the client connection |
582 | * @param tc scheduler context | ||
583 | */ | 582 | */ |
584 | static void | 583 | static void |
585 | receive_task (void *cls, | 584 | receive_task (void *cls) |
586 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
587 | { | 585 | { |
588 | struct GNUNET_CLIENT_Connection *client = cls; | 586 | struct GNUNET_CLIENT_Connection *client = cls; |
589 | GNUNET_CLIENT_MessageHandler handler = client->receiver_handler; | 587 | GNUNET_CLIENT_MessageHandler handler = client->receiver_handler; |
@@ -746,11 +744,9 @@ GNUNET_CLIENT_service_test_cancel (struct GNUNET_CLIENT_TestHandle *th) | |||
746 | * and then cleans up. | 744 | * and then cleans up. |
747 | * | 745 | * |
748 | * @param cls the `struct GNUNET_CLIENT_TestHandle` | 746 | * @param cls the `struct GNUNET_CLIENT_TestHandle` |
749 | * @param tc scheduler context | ||
750 | */ | 747 | */ |
751 | static void | 748 | static void |
752 | report_result (void *cls, | 749 | report_result (void *cls) |
753 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
754 | { | 750 | { |
755 | struct GNUNET_CLIENT_TestHandle *th = cls; | 751 | struct GNUNET_CLIENT_TestHandle *th = cls; |
756 | 752 | ||
@@ -1080,16 +1076,16 @@ client_notify (void *cls, size_t size, void *buf); | |||
1080 | * service after a while. | 1076 | * service after a while. |
1081 | * | 1077 | * |
1082 | * @param cls our `struct GNUNET_CLIENT_TransmitHandle` of the request | 1078 | * @param cls our `struct GNUNET_CLIENT_TransmitHandle` of the request |
1083 | * @param tc unused | ||
1084 | */ | 1079 | */ |
1085 | static void | 1080 | static void |
1086 | client_delayed_retry (void *cls, | 1081 | client_delayed_retry (void *cls) |
1087 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1088 | { | 1082 | { |
1089 | struct GNUNET_CLIENT_TransmitHandle *th = cls; | 1083 | struct GNUNET_CLIENT_TransmitHandle *th = cls; |
1084 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1090 | struct GNUNET_TIME_Relative delay; | 1085 | struct GNUNET_TIME_Relative delay; |
1091 | 1086 | ||
1092 | th->reconnect_task = NULL; | 1087 | th->reconnect_task = NULL; |
1088 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1093 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1089 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1094 | { | 1090 | { |
1095 | /* give up, was shutdown */ | 1091 | /* give up, was shutdown */ |
@@ -1153,11 +1149,14 @@ client_notify (void *cls, | |||
1153 | struct GNUNET_CLIENT_Connection *client = th->client; | 1149 | struct GNUNET_CLIENT_Connection *client = th->client; |
1154 | size_t ret; | 1150 | size_t ret; |
1155 | struct GNUNET_TIME_Relative delay; | 1151 | struct GNUNET_TIME_Relative delay; |
1152 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1153 | |||
1156 | 1154 | ||
1157 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1155 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1158 | "client_notify is running\n"); | 1156 | "client_notify is running\n"); |
1159 | th->th = NULL; | 1157 | th->th = NULL; |
1160 | client->th = NULL; | 1158 | client->th = NULL; |
1159 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1161 | if (NULL == buf) | 1160 | if (NULL == buf) |
1162 | { | 1161 | { |
1163 | delay = GNUNET_TIME_absolute_get_remaining (th->timeout); | 1162 | delay = GNUNET_TIME_absolute_get_remaining (th->timeout); |
@@ -1165,7 +1164,7 @@ client_notify (void *cls, | |||
1165 | if ( (GNUNET_YES != th->auto_retry) || | 1164 | if ( (GNUNET_YES != th->auto_retry) || |
1166 | (0 == --th->attempts_left) || | 1165 | (0 == --th->attempts_left) || |
1167 | (delay.rel_value_us < 1)|| | 1166 | (delay.rel_value_us < 1)|| |
1168 | (0 != (GNUNET_SCHEDULER_get_reason() & GNUNET_SCHEDULER_REASON_SHUTDOWN))) | 1167 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))) |
1169 | { | 1168 | { |
1170 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1169 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1171 | "Transmission failed %u times, giving up.\n", | 1170 | "Transmission failed %u times, giving up.\n", |
diff --git a/src/util/client_manager.c b/src/util/client_manager.c index 12c37b23f..f334bb5b6 100644 --- a/src/util/client_manager.c +++ b/src/util/client_manager.c | |||
@@ -240,7 +240,7 @@ transmit_next (struct GNUNET_CLIENT_MANAGER_Connection *mgr); | |||
240 | 240 | ||
241 | 241 | ||
242 | static void | 242 | static void |
243 | schedule_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 243 | schedule_disconnect (void *cls) |
244 | { | 244 | { |
245 | struct GNUNET_CLIENT_MANAGER_Connection *mgr = cls; | 245 | struct GNUNET_CLIENT_MANAGER_Connection *mgr = cls; |
246 | GNUNET_CLIENT_MANAGER_disconnect (mgr, GNUNET_NO, | 246 | GNUNET_CLIENT_MANAGER_disconnect (mgr, GNUNET_NO, |
@@ -341,11 +341,9 @@ transmit_next (struct GNUNET_CLIENT_MANAGER_Connection *mgr) | |||
341 | * | 341 | * |
342 | * @param cls | 342 | * @param cls |
343 | * Channel handle. | 343 | * Channel handle. |
344 | * @param tc | ||
345 | * Scheduler context. | ||
346 | */ | 344 | */ |
347 | static void | 345 | static void |
348 | schedule_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 346 | schedule_reconnect (void *cls) |
349 | { | 347 | { |
350 | struct GNUNET_CLIENT_MANAGER_Connection *mgr = cls; | 348 | struct GNUNET_CLIENT_MANAGER_Connection *mgr = cls; |
351 | mgr->reconnect_task = NULL; | 349 | mgr->reconnect_task = NULL; |
diff --git a/src/util/connection.c b/src/util/connection.c index 5aa277546..b3ea3b5af 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -606,10 +606,9 @@ connect_fail_continuation (struct GNUNET_CONNECTION_Handle *connection) | |||
606 | * We are ready to transmit (or got a timeout). | 606 | * We are ready to transmit (or got a timeout). |
607 | * | 607 | * |
608 | * @param cls our connection handle | 608 | * @param cls our connection handle |
609 | * @param tc task context describing why we are here | ||
610 | */ | 609 | */ |
611 | static void | 610 | static void |
612 | transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 611 | transmit_ready (void *cls); |
613 | 612 | ||
614 | 613 | ||
615 | /** | 614 | /** |
@@ -617,10 +616,9 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
617 | * to read. | 616 | * to read. |
618 | * | 617 | * |
619 | * @param cls connection to read from | 618 | * @param cls connection to read from |
620 | * @param tc scheduler context | ||
621 | */ | 619 | */ |
622 | static void | 620 | static void |
623 | receive_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 621 | receive_ready (void *cls); |
624 | 622 | ||
625 | 623 | ||
626 | /** | 624 | /** |
@@ -668,15 +666,14 @@ connect_success_continuation (struct GNUNET_CONNECTION_Handle *connection) | |||
668 | * Scheduler let us know that we're either ready to write on the | 666 | * Scheduler let us know that we're either ready to write on the |
669 | * socket OR connect timed out. Do the right thing. | 667 | * socket OR connect timed out. Do the right thing. |
670 | * | 668 | * |
671 | * @param cls the "struct AddressProbe*" with the address that we are probing | 669 | * @param cls the `struct AddressProbe *` with the address that we are probing |
672 | * @param tc success or failure info about the connect attempt. | ||
673 | */ | 670 | */ |
674 | static void | 671 | static void |
675 | connect_probe_continuation (void *cls, | 672 | connect_probe_continuation (void *cls) |
676 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
677 | { | 673 | { |
678 | struct AddressProbe *ap = cls; | 674 | struct AddressProbe *ap = cls; |
679 | struct GNUNET_CONNECTION_Handle *connection = ap->connection; | 675 | struct GNUNET_CONNECTION_Handle *connection = ap->connection; |
676 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
680 | struct AddressProbe *pos; | 677 | struct AddressProbe *pos; |
681 | int error; | 678 | int error; |
682 | socklen_t len; | 679 | socklen_t len; |
@@ -686,6 +683,7 @@ connect_probe_continuation (void *cls, | |||
686 | len = sizeof (error); | 683 | len = sizeof (error); |
687 | errno = 0; | 684 | errno = 0; |
688 | error = 0; | 685 | error = 0; |
686 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
689 | if ((0 == (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) || | 687 | if ((0 == (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) || |
690 | (GNUNET_OK != | 688 | (GNUNET_OK != |
691 | GNUNET_NETWORK_socket_getsockopt (ap->sock, SOL_SOCKET, SO_ERROR, &error, | 689 | GNUNET_NETWORK_socket_getsockopt (ap->sock, SOL_SOCKET, SO_ERROR, &error, |
@@ -1095,18 +1093,18 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *connection) | |||
1095 | * or have data ready to read. | 1093 | * or have data ready to read. |
1096 | * | 1094 | * |
1097 | * @param cls connection to read from | 1095 | * @param cls connection to read from |
1098 | * @param tc scheduler context | ||
1099 | */ | 1096 | */ |
1100 | static void | 1097 | static void |
1101 | receive_ready (void *cls, | 1098 | receive_ready (void *cls) |
1102 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1103 | { | 1099 | { |
1104 | struct GNUNET_CONNECTION_Handle *connection = cls; | 1100 | struct GNUNET_CONNECTION_Handle *connection = cls; |
1101 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1105 | char buffer[connection->max]; | 1102 | char buffer[connection->max]; |
1106 | ssize_t ret; | 1103 | ssize_t ret; |
1107 | GNUNET_CONNECTION_Receiver receiver; | 1104 | GNUNET_CONNECTION_Receiver receiver; |
1108 | 1105 | ||
1109 | connection->read_task = NULL; | 1106 | connection->read_task = NULL; |
1107 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1110 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1108 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1111 | { | 1109 | { |
1112 | /* ignore shutdown request, go again immediately */ | 1110 | /* ignore shutdown request, go again immediately */ |
@@ -1296,11 +1294,9 @@ process_notify (struct GNUNET_CONNECTION_Handle *connection) | |||
1296 | * This task notifies the client about the timeout. | 1294 | * This task notifies the client about the timeout. |
1297 | * | 1295 | * |
1298 | * @param cls the `struct GNUNET_CONNECTION_Handle` | 1296 | * @param cls the `struct GNUNET_CONNECTION_Handle` |
1299 | * @param tc scheduler context | ||
1300 | */ | 1297 | */ |
1301 | static void | 1298 | static void |
1302 | transmit_timeout (void *cls, | 1299 | transmit_timeout (void *cls) |
1303 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1304 | { | 1300 | { |
1305 | struct GNUNET_CONNECTION_Handle *connection = cls; | 1301 | struct GNUNET_CONNECTION_Handle *connection = cls; |
1306 | GNUNET_CONNECTION_TransmitReadyNotify notify; | 1302 | GNUNET_CONNECTION_TransmitReadyNotify notify; |
@@ -1327,11 +1323,9 @@ transmit_timeout (void *cls, | |||
1327 | * This task notifies the client about the error. | 1323 | * This task notifies the client about the error. |
1328 | * | 1324 | * |
1329 | * @param cls the `struct GNUNET_CONNECTION_Handle` | 1325 | * @param cls the `struct GNUNET_CONNECTION_Handle` |
1330 | * @param tc scheduler context | ||
1331 | */ | 1326 | */ |
1332 | static void | 1327 | static void |
1333 | connect_error (void *cls, | 1328 | connect_error (void *cls) |
1334 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1335 | { | 1329 | { |
1336 | struct GNUNET_CONNECTION_Handle *connection = cls; | 1330 | struct GNUNET_CONNECTION_Handle *connection = cls; |
1337 | GNUNET_CONNECTION_TransmitReadyNotify notify; | 1331 | GNUNET_CONNECTION_TransmitReadyNotify notify; |
@@ -1353,14 +1347,13 @@ connect_error (void *cls, | |||
1353 | * We are ready to transmit (or got a timeout). | 1347 | * We are ready to transmit (or got a timeout). |
1354 | * | 1348 | * |
1355 | * @param cls our connection handle | 1349 | * @param cls our connection handle |
1356 | * @param tc task context describing why we are here | ||
1357 | */ | 1350 | */ |
1358 | static void | 1351 | static void |
1359 | transmit_ready (void *cls, | 1352 | transmit_ready (void *cls) |
1360 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1361 | { | 1353 | { |
1362 | struct GNUNET_CONNECTION_Handle *connection = cls; | 1354 | struct GNUNET_CONNECTION_Handle *connection = cls; |
1363 | GNUNET_CONNECTION_TransmitReadyNotify notify; | 1355 | GNUNET_CONNECTION_TransmitReadyNotify notify; |
1356 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1364 | ssize_t ret; | 1357 | ssize_t ret; |
1365 | size_t have; | 1358 | size_t have; |
1366 | 1359 | ||
@@ -1370,6 +1363,7 @@ transmit_ready (void *cls, | |||
1370 | GNUNET_assert (NULL != connection->write_task); | 1363 | GNUNET_assert (NULL != connection->write_task); |
1371 | connection->write_task = NULL; | 1364 | connection->write_task = NULL; |
1372 | GNUNET_assert (NULL == connection->nth.timeout_task); | 1365 | GNUNET_assert (NULL == connection->nth.timeout_task); |
1366 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1373 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1367 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1374 | { | 1368 | { |
1375 | if (NULL != connection->sock) | 1369 | if (NULL != connection->sock) |
diff --git a/src/util/crypto_hash_file.c b/src/util/crypto_hash_file.c index 8bb03561b..f2d49d164 100644 --- a/src/util/crypto_hash_file.c +++ b/src/util/crypto_hash_file.c | |||
@@ -117,10 +117,9 @@ file_hash_finish (struct GNUNET_CRYPTO_FileHashContext *fhc, | |||
117 | * File hashing task. | 117 | * File hashing task. |
118 | * | 118 | * |
119 | * @param cls closure | 119 | * @param cls closure |
120 | * @param tc context | ||
121 | */ | 120 | */ |
122 | static void | 121 | static void |
123 | file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 122 | file_hash_task (void *cls) |
124 | { | 123 | { |
125 | struct GNUNET_CRYPTO_FileHashContext *fhc = cls; | 124 | struct GNUNET_CRYPTO_FileHashContext *fhc = cls; |
126 | struct GNUNET_HashCode *res; | 125 | struct GNUNET_HashCode *res; |
diff --git a/src/util/disk_iterator.c b/src/util/disk_iterator.c index 925d4c6fd..2315f2861 100644 --- a/src/util/disk_iterator.c +++ b/src/util/disk_iterator.c | |||
@@ -77,8 +77,7 @@ struct GNUNET_DISK_DirectoryIterator | |||
77 | * Task used by the directory iterator. | 77 | * Task used by the directory iterator. |
78 | */ | 78 | */ |
79 | static void | 79 | static void |
80 | directory_iterator_task (void *cls, | 80 | directory_iterator_task (void *cls) |
81 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
82 | { | 81 | { |
83 | struct GNUNET_DISK_DirectoryIterator *iter = cls; | 82 | struct GNUNET_DISK_DirectoryIterator *iter = cls; |
84 | char *name; | 83 | char *name; |
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index 434574ef0..7449d8042 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c | |||
@@ -110,8 +110,7 @@ count_leading_zeroes (const struct GNUNET_HashCode *hash) | |||
110 | * @param tc task context | 110 | * @param tc task context |
111 | */ | 111 | */ |
112 | static void | 112 | static void |
113 | find_proof (void *cls, | 113 | find_proof (void *cls) |
114 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
115 | { | 114 | { |
116 | #define ROUND_SIZE 10 | 115 | #define ROUND_SIZE 10 |
117 | uint64_t counter; | 116 | uint64_t counter; |
@@ -121,7 +120,9 @@ find_proof (void *cls, | |||
121 | unsigned int i; | 120 | unsigned int i; |
122 | struct GNUNET_TIME_Absolute timestamp; | 121 | struct GNUNET_TIME_Absolute timestamp; |
123 | struct GNUNET_TIME_Relative elapsed; | 122 | struct GNUNET_TIME_Relative elapsed; |
123 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
124 | 124 | ||
125 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
125 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 126 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
126 | { | 127 | { |
127 | write_proof (); | 128 | write_proof (); |
diff --git a/src/util/gnunet-uri.c b/src/util/gnunet-uri.c index ada67e310..75e70d2b7 100644 --- a/src/util/gnunet-uri.c +++ b/src/util/gnunet-uri.c | |||
@@ -47,10 +47,9 @@ static struct GNUNET_DISK_PipeHandle *sigpipe; | |||
47 | * process died) or when user presses CTRL-C. | 47 | * process died) or when user presses CTRL-C. |
48 | * | 48 | * |
49 | * @param cls closure, NULL | 49 | * @param cls closure, NULL |
50 | * @param tc scheduler context | ||
51 | */ | 50 | */ |
52 | static void | 51 | static void |
53 | maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 52 | maint_child_death (void *cls) |
54 | { | 53 | { |
55 | enum GNUNET_OS_ProcessStatusType type; | 54 | enum GNUNET_OS_ProcessStatusType type; |
56 | if ( (GNUNET_OK != | 55 | if ( (GNUNET_OK != |
diff --git a/src/util/helper.c b/src/util/helper.c index f0123460b..3ed1c7276 100644 --- a/src/util/helper.c +++ b/src/util/helper.c | |||
@@ -138,7 +138,7 @@ struct GNUNET_HELPER_Handle | |||
138 | * NULL-terminated list of command-line arguments. | 138 | * NULL-terminated list of command-line arguments. |
139 | */ | 139 | */ |
140 | char **binary_argv; | 140 | char **binary_argv; |
141 | 141 | ||
142 | /** | 142 | /** |
143 | * Task to read from the helper. | 143 | * Task to read from the helper. |
144 | */ | 144 | */ |
@@ -305,28 +305,26 @@ stop_helper (struct GNUNET_HELPER_Handle *h, | |||
305 | * Restart the helper process. | 305 | * Restart the helper process. |
306 | * | 306 | * |
307 | * @param cls handle to the helper process | 307 | * @param cls handle to the helper process |
308 | * @param tc scheduler context | ||
309 | */ | 308 | */ |
310 | static void | 309 | static void |
311 | restart_task (void *cls, | 310 | restart_task (void *cls); |
312 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
313 | 311 | ||
314 | 312 | ||
315 | /** | 313 | /** |
316 | * Read from the helper-process | 314 | * Read from the helper-process |
317 | * | 315 | * |
318 | * @param cls handle to the helper process | 316 | * @param cls handle to the helper process |
319 | * @param tc scheduler context | ||
320 | */ | 317 | */ |
321 | static void | 318 | static void |
322 | helper_read (void *cls, | 319 | helper_read (void *cls) |
323 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
324 | { | 320 | { |
325 | struct GNUNET_HELPER_Handle *h = cls; | 321 | struct GNUNET_HELPER_Handle *h = cls; |
322 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
326 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE] GNUNET_ALIGN; | 323 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE] GNUNET_ALIGN; |
327 | ssize_t t; | 324 | ssize_t t; |
328 | 325 | ||
329 | h->read_task = NULL; | 326 | h->read_task = NULL; |
327 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
330 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 328 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
331 | { | 329 | { |
332 | /* try again */ | 330 | /* try again */ |
@@ -458,17 +456,15 @@ start_helper (struct GNUNET_HELPER_Handle *h) | |||
458 | * Restart the helper process. | 456 | * Restart the helper process. |
459 | * | 457 | * |
460 | * @param cls handle to the helper process | 458 | * @param cls handle to the helper process |
461 | * @param tc scheduler context | ||
462 | */ | 459 | */ |
463 | static void | 460 | static void |
464 | restart_task (void *cls, | 461 | restart_task (void *cls) |
465 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
466 | { | 462 | { |
467 | struct GNUNET_HELPER_Handle*h = cls; | 463 | struct GNUNET_HELPER_Handle*h = cls; |
468 | 464 | ||
469 | h->restart_task = NULL; | 465 | h->restart_task = NULL; |
470 | h->retry_back_off++; | 466 | h->retry_back_off++; |
471 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 467 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
472 | "Restarting helper with back-off %u\n", | 468 | "Restarting helper with back-off %u\n", |
473 | h->retry_back_off); | 469 | h->retry_back_off); |
474 | start_helper (h); | 470 | start_helper (h); |
@@ -582,18 +578,18 @@ GNUNET_HELPER_stop (struct GNUNET_HELPER_Handle *h, | |||
582 | * Write to the helper-process | 578 | * Write to the helper-process |
583 | * | 579 | * |
584 | * @param cls handle to the helper process | 580 | * @param cls handle to the helper process |
585 | * @param tc scheduler context | ||
586 | */ | 581 | */ |
587 | static void | 582 | static void |
588 | helper_write (void *cls, | 583 | helper_write (void *cls) |
589 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
590 | { | 584 | { |
591 | struct GNUNET_HELPER_Handle *h = cls; | 585 | struct GNUNET_HELPER_Handle *h = cls; |
586 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
592 | struct GNUNET_HELPER_SendHandle *sh; | 587 | struct GNUNET_HELPER_SendHandle *sh; |
593 | const char *buf; | 588 | const char *buf; |
594 | ssize_t t; | 589 | ssize_t t; |
595 | 590 | ||
596 | h->write_task = NULL; | 591 | h->write_task = NULL; |
592 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
597 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 593 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
598 | { | 594 | { |
599 | /* try again */ | 595 | /* try again */ |
diff --git a/src/util/mq.c b/src/util/mq.c index f5ebe33a5..aff9f465c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -297,15 +297,15 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, | |||
297 | * results in undefined behavior if not used carefully. | 297 | * results in undefined behavior if not used carefully. |
298 | * | 298 | * |
299 | * @param cls message queue to send the next message with | 299 | * @param cls message queue to send the next message with |
300 | * @param tc scheduler context | ||
301 | */ | 300 | */ |
302 | static void | 301 | static void |
303 | impl_send_continue (void *cls, | 302 | impl_send_continue (void *cls) |
304 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
305 | { | 303 | { |
306 | struct GNUNET_MQ_Handle *mq = cls; | 304 | struct GNUNET_MQ_Handle *mq = cls; |
305 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
307 | struct GNUNET_MQ_Envelope *current_envelope; | 306 | struct GNUNET_MQ_Envelope *current_envelope; |
308 | 307 | ||
308 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
309 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 309 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
310 | return; | 310 | return; |
311 | 311 | ||
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 52e2f6d0e..8dfec6c5e 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -70,18 +70,19 @@ static struct GNUNET_OS_Process current_process; | |||
70 | * This handler is called when there are control data to be read on the pipe | 70 | * This handler is called when there are control data to be read on the pipe |
71 | * | 71 | * |
72 | * @param cls the 'struct GNUNET_DISK_FileHandle' of the control pipe | 72 | * @param cls the 'struct GNUNET_DISK_FileHandle' of the control pipe |
73 | * @param tc scheduler context | ||
74 | */ | 73 | */ |
75 | static void | 74 | static void |
76 | parent_control_handler (void *cls, | 75 | parent_control_handler (void *cls) |
77 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
78 | { | 76 | { |
79 | struct GNUNET_DISK_FileHandle *control_pipe = cls; | 77 | struct GNUNET_DISK_FileHandle *control_pipe = cls; |
78 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
80 | char sig; | 79 | char sig; |
81 | char *pipe_fd; | 80 | char *pipe_fd; |
82 | ssize_t ret; | 81 | ssize_t ret; |
83 | 82 | ||
84 | LOG (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n", __FUNCTION__, | 83 | tc = GNUNET_SCHEDULER_get_task_context (); |
84 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
85 | "`%s' invoked because of %d\n", __FUNCTION__, | ||
85 | tc->reason); | 86 | tc->reason); |
86 | if (0 != (tc->reason & | 87 | if (0 != (tc->reason & |
87 | (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT))) | 88 | (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT))) |
@@ -118,12 +119,9 @@ parent_control_handler (void *cls, | |||
118 | * variable) and raise those signals. | 119 | * variable) and raise those signals. |
119 | * | 120 | * |
120 | * @param cls closure (unused) | 121 | * @param cls closure (unused) |
121 | * @param tc scheduler context (unused) | ||
122 | */ | 122 | */ |
123 | void | 123 | void |
124 | GNUNET_OS_install_parent_control_handler (void *cls, | 124 | GNUNET_OS_install_parent_control_handler (void *cls) |
125 | const struct | ||
126 | GNUNET_SCHEDULER_TaskContext *tc) | ||
127 | { | 125 | { |
128 | const char *env_buf; | 126 | const char *env_buf; |
129 | char *env_buf_end; | 127 | char *env_buf_end; |
@@ -1751,18 +1749,19 @@ GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd) | |||
1751 | /** | 1749 | /** |
1752 | * Read from the process and call the line processor. | 1750 | * Read from the process and call the line processor. |
1753 | * | 1751 | * |
1754 | * @param cls the 'struct GNUNET_OS_CommandHandle' | 1752 | * @param cls the `struct GNUNET_OS_CommandHandle *` |
1755 | * @param tc scheduler context | ||
1756 | */ | 1753 | */ |
1757 | static void | 1754 | static void |
1758 | cmd_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1755 | cmd_read (void *cls) |
1759 | { | 1756 | { |
1760 | struct GNUNET_OS_CommandHandle *cmd = cls; | 1757 | struct GNUNET_OS_CommandHandle *cmd = cls; |
1758 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1761 | GNUNET_OS_LineProcessor proc; | 1759 | GNUNET_OS_LineProcessor proc; |
1762 | char *end; | 1760 | char *end; |
1763 | ssize_t ret; | 1761 | ssize_t ret; |
1764 | 1762 | ||
1765 | cmd->rtask = NULL; | 1763 | cmd->rtask = NULL; |
1764 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1766 | if (GNUNET_YES != GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, cmd->r)) | 1765 | if (GNUNET_YES != GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, cmd->r)) |
1767 | { | 1766 | { |
1768 | /* timeout, shutdown, etc. */ | 1767 | /* timeout, shutdown, etc. */ |
diff --git a/src/util/program.c b/src/util/program.c index 7023552f6..69dd455cd 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -73,10 +73,12 @@ struct CommandContext | |||
73 | * program. Runs the program-specific main task. | 73 | * program. Runs the program-specific main task. |
74 | */ | 74 | */ |
75 | static void | 75 | static void |
76 | program_main (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 76 | program_main (void *cls) |
77 | { | 77 | { |
78 | struct CommandContext *cc = cls; | 78 | struct CommandContext *cc = cls; |
79 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
79 | 80 | ||
81 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
80 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 82 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
81 | return; | 83 | return; |
82 | GNUNET_SPEEDUP_start_(cc->cfg); | 84 | GNUNET_SPEEDUP_start_(cc->cfg); |
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 81ec01af4..e7a836f03 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -532,11 +532,9 @@ handle_response (void *cls, | |||
532 | * numeric addresses. | 532 | * numeric addresses. |
533 | * | 533 | * |
534 | * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request | 534 | * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request |
535 | * @param tc unused scheduler context | ||
536 | */ | 535 | */ |
537 | static void | 536 | static void |
538 | numeric_resolution (void *cls, | 537 | numeric_resolution (void *cls) |
539 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
540 | { | 538 | { |
541 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; | 539 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; |
542 | struct sockaddr_in v4; | 540 | struct sockaddr_in v4; |
@@ -600,11 +598,9 @@ numeric_resolution (void *cls, | |||
600 | * respective loopback numeric addresses. | 598 | * respective loopback numeric addresses. |
601 | * | 599 | * |
602 | * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request | 600 | * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request |
603 | * @param tc unused scheduler context | ||
604 | */ | 601 | */ |
605 | static void | 602 | static void |
606 | loopback_resolution (void *cls, | 603 | loopback_resolution (void *cls) |
607 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
608 | { | 604 | { |
609 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; | 605 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; |
610 | struct sockaddr_in v4; | 606 | struct sockaddr_in v4; |
@@ -658,8 +654,7 @@ loopback_resolution (void *cls, | |||
658 | * Task executed on system shutdown. | 654 | * Task executed on system shutdown. |
659 | */ | 655 | */ |
660 | static void | 656 | static void |
661 | shutdown_task (void *cls, | 657 | shutdown_task (void *cls) |
662 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
663 | { | 658 | { |
664 | s_task = NULL; | 659 | s_task = NULL; |
665 | GNUNET_RESOLVER_disconnect (); | 660 | GNUNET_RESOLVER_disconnect (); |
@@ -728,15 +723,16 @@ process_requests () | |||
728 | * Now try to reconnect to the resolver service. | 723 | * Now try to reconnect to the resolver service. |
729 | * | 724 | * |
730 | * @param cls NULL | 725 | * @param cls NULL |
731 | * @param tc scheduler context | ||
732 | */ | 726 | */ |
733 | static void | 727 | static void |
734 | reconnect_task (void *cls, | 728 | reconnect_task (void *cls) |
735 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
736 | { | 729 | { |
730 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
731 | |||
737 | r_task = NULL; | 732 | r_task = NULL; |
738 | if (NULL == req_head) | 733 | if (NULL == req_head) |
739 | return; /* no work pending */ | 734 | return; /* no work pending */ |
735 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
740 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 736 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
741 | return; | 737 | return; |
742 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 738 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -802,11 +798,9 @@ reconnect () | |||
802 | * A DNS resolution timed out. Notify the application. | 798 | * A DNS resolution timed out. Notify the application. |
803 | * | 799 | * |
804 | * @param cls the `struct GNUNET_RESOLVER_RequestHandle *` | 800 | * @param cls the `struct GNUNET_RESOLVER_RequestHandle *` |
805 | * @param tc scheduler context | ||
806 | */ | 801 | */ |
807 | static void | 802 | static void |
808 | handle_lookup_timeout (void *cls, | 803 | handle_lookup_timeout (void *cls) |
809 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
810 | { | 804 | { |
811 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; | 805 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; |
812 | 806 | ||
@@ -902,11 +896,9 @@ GNUNET_RESOLVER_ip_get (const char *hostname, | |||
902 | * conversion and invoke the callback. | 896 | * conversion and invoke the callback. |
903 | * | 897 | * |
904 | * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request | 898 | * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request |
905 | * @param tc unused scheduler context | ||
906 | */ | 899 | */ |
907 | static void | 900 | static void |
908 | numeric_reverse (void *cls, | 901 | numeric_reverse (void *cls) |
909 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
910 | { | 902 | { |
911 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; | 903 | struct GNUNET_RESOLVER_RequestHandle *rh = cls; |
912 | char *result; | 904 | char *result; |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 6405ea336..dcf5aeeaa 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -256,6 +256,11 @@ static int current_lifeness; | |||
256 | static GNUNET_SCHEDULER_select scheduler_select; | 256 | static GNUNET_SCHEDULER_select scheduler_select; |
257 | 257 | ||
258 | /** | 258 | /** |
259 | * Task context of the current task. | ||
260 | */ | ||
261 | static struct GNUNET_SCHEDULER_TaskContext tc; | ||
262 | |||
263 | /** | ||
259 | * Closure for #scheduler_select. | 264 | * Closure for #scheduler_select. |
260 | */ | 265 | */ |
261 | static void *scheduler_select_cls; | 266 | static void *scheduler_select_cls; |
@@ -533,7 +538,6 @@ run_ready (struct GNUNET_NETWORK_FDSet *rs, | |||
533 | { | 538 | { |
534 | enum GNUNET_SCHEDULER_Priority p; | 539 | enum GNUNET_SCHEDULER_Priority p; |
535 | struct GNUNET_SCHEDULER_Task *pos; | 540 | struct GNUNET_SCHEDULER_Task *pos; |
536 | struct GNUNET_SCHEDULER_TaskContext tc; | ||
537 | 541 | ||
538 | max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP; | 542 | max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP; |
539 | do | 543 | do |
@@ -584,7 +588,7 @@ run_ready (struct GNUNET_NETWORK_FDSet *rs, | |||
584 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 588 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
585 | "Running task: %p\n", | 589 | "Running task: %p\n", |
586 | pos); | 590 | pos); |
587 | pos->callback (pos->callback_cls, &tc); | 591 | pos->callback (pos->callback_cls); |
588 | #if EXECINFO | 592 | #if EXECINFO |
589 | unsigned int i; | 593 | unsigned int i; |
590 | 594 | ||
@@ -902,17 +906,16 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_TaskCallback task, | |||
902 | 906 | ||
903 | 907 | ||
904 | /** | 908 | /** |
905 | * Obtain the reason code for why the current task was | 909 | * Obtain the task context, giving the reason why the current task was |
906 | * started. Will return the same value as | 910 | * started. |
907 | * the `struct GNUNET_SCHEDULER_TaskContext`'s reason field. | ||
908 | * | 911 | * |
909 | * @return reason(s) why the current task is run | 912 | * @return current tasks' scheduler context |
910 | */ | 913 | */ |
911 | enum GNUNET_SCHEDULER_Reason | 914 | const struct GNUNET_SCHEDULER_TaskContext * |
912 | GNUNET_SCHEDULER_get_reason () | 915 | GNUNET_SCHEDULER_get_task_context () |
913 | { | 916 | { |
914 | GNUNET_assert (NULL != active_task); | 917 | GNUNET_assert (NULL != active_task); |
915 | return active_task->reason; | 918 | return &tc; |
916 | } | 919 | } |
917 | 920 | ||
918 | 921 | ||
diff --git a/src/util/server.c b/src/util/server.c index 0433feb58..8dedd28fd 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -389,17 +389,17 @@ GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client, | |||
389 | * | 389 | * |
390 | * @param cls handle to our server for which we are processing the listen | 390 | * @param cls handle to our server for which we are processing the listen |
391 | * socket | 391 | * socket |
392 | * @param tc reason why we are running right now | ||
393 | */ | 392 | */ |
394 | static void | 393 | static void |
395 | process_listen_socket (void *cls, | 394 | process_listen_socket (void *cls) |
396 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
397 | { | 395 | { |
398 | struct GNUNET_SERVER_Handle *server = cls; | 396 | struct GNUNET_SERVER_Handle *server = cls; |
397 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
399 | struct GNUNET_CONNECTION_Handle *sock; | 398 | struct GNUNET_CONNECTION_Handle *sock; |
400 | unsigned int i; | 399 | unsigned int i; |
401 | 400 | ||
402 | server->listen_task = NULL; | 401 | server->listen_task = NULL; |
402 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
403 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 403 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
404 | { | 404 | { |
405 | /* ignore shutdown, someone else will take care of it! */ | 405 | /* ignore shutdown, someone else will take care of it! */ |
@@ -655,12 +655,10 @@ GNUNET_SERVER_client_mark_monitor (struct GNUNET_SERVER_Client *client) | |||
655 | * Helper function for #test_monitor_clients() to trigger | 655 | * Helper function for #test_monitor_clients() to trigger |
656 | * #GNUNET_SERVER_destroy() after the stack has unwound. | 656 | * #GNUNET_SERVER_destroy() after the stack has unwound. |
657 | * | 657 | * |
658 | * @param cls the 'struct GNUNET_SERVER_Handle' to destroy | 658 | * @param cls the `struct GNUNET_SERVER_Handle *` to destroy |
659 | * @param tc unused | ||
660 | */ | 659 | */ |
661 | static void | 660 | static void |
662 | do_destroy (void *cls, | 661 | do_destroy (void *cls) |
663 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
664 | { | 662 | { |
665 | struct GNUNET_SERVER_Handle *server = cls; | 663 | struct GNUNET_SERVER_Handle *server = cls; |
666 | 664 | ||
@@ -887,18 +885,18 @@ GNUNET_SERVER_set_callbacks (struct GNUNET_SERVER_Handle *server, | |||
887 | * Task run to warn about missing calls to #GNUNET_SERVER_receive_done. | 885 | * Task run to warn about missing calls to #GNUNET_SERVER_receive_done. |
888 | * | 886 | * |
889 | * @param cls our `struct GNUNET_SERVER_Client *` to process more requests from | 887 | * @param cls our `struct GNUNET_SERVER_Client *` to process more requests from |
890 | * @param tc scheduler context (unused) | ||
891 | */ | 888 | */ |
892 | static void | 889 | static void |
893 | warn_no_receive_done (void *cls, | 890 | warn_no_receive_done (void *cls) |
894 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
895 | { | 891 | { |
896 | struct GNUNET_SERVER_Client *client = cls; | 892 | struct GNUNET_SERVER_Client *client = cls; |
893 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
897 | 894 | ||
898 | GNUNET_break (0 != client->warn_type); /* type should never be 0 here, as we don't use 0 */ | 895 | GNUNET_break (0 != client->warn_type); /* type should never be 0 here, as we don't use 0 */ |
899 | client->warn_task = | 896 | client->warn_task = |
900 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, | 897 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, |
901 | &warn_no_receive_done, client); | 898 | &warn_no_receive_done, client); |
899 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
902 | if (0 == (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 900 | if (0 == (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
903 | LOG (GNUNET_ERROR_TYPE_WARNING, | 901 | LOG (GNUNET_ERROR_TYPE_WARNING, |
904 | _("Processing code for message of type %u did not call `GNUNET_SERVER_receive_done' after %s\n"), | 902 | _("Processing code for message of type %u did not call `GNUNET_SERVER_receive_done' after %s\n"), |
@@ -1199,11 +1197,9 @@ process_incoming (void *cls, | |||
1199 | * and process requests. | 1197 | * and process requests. |
1200 | * | 1198 | * |
1201 | * @param cls our `struct GNUNET_SERVER_Client *` to process more requests from | 1199 | * @param cls our `struct GNUNET_SERVER_Client *` to process more requests from |
1202 | * @param tc scheduler context (unused) | ||
1203 | */ | 1200 | */ |
1204 | static void | 1201 | static void |
1205 | restart_processing (void *cls, | 1202 | restart_processing (void *cls) |
1206 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1207 | { | 1203 | { |
1208 | struct GNUNET_SERVER_Client *client = cls; | 1204 | struct GNUNET_SERVER_Client *client = cls; |
1209 | 1205 | ||
@@ -1497,11 +1493,9 @@ GNUNET_SERVER_connect_notify_cancel (struct GNUNET_SERVER_Handle *server, | |||
1497 | * 'connection.c' is not allowed (see #2329). | 1493 | * 'connection.c' is not allowed (see #2329). |
1498 | * | 1494 | * |
1499 | * @param cls connection to destroy | 1495 | * @param cls connection to destroy |
1500 | * @param tc scheduler context (unused) | ||
1501 | */ | 1496 | */ |
1502 | static void | 1497 | static void |
1503 | destroy_connection (void *cls, | 1498 | destroy_connection (void *cls) |
1504 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1505 | { | 1499 | { |
1506 | struct GNUNET_CONNECTION_Handle *connection = cls; | 1500 | struct GNUNET_CONNECTION_Handle *connection = cls; |
1507 | 1501 | ||
diff --git a/src/util/service.c b/src/util/service.c index be3b4442a..76e540302 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1126,11 +1126,9 @@ write_pid_file (struct GNUNET_SERVICE_Context *sctx, pid_t pid) | |||
1126 | * Task run during shutdown. Stops the server/service. | 1126 | * Task run during shutdown. Stops the server/service. |
1127 | * | 1127 | * |
1128 | * @param cls the `struct GNUNET_SERVICE_Context` | 1128 | * @param cls the `struct GNUNET_SERVICE_Context` |
1129 | * @param tc unused | ||
1130 | */ | 1129 | */ |
1131 | static void | 1130 | static void |
1132 | shutdown_task (void *cls, | 1131 | shutdown_task (void *cls) |
1133 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1134 | { | 1132 | { |
1135 | struct GNUNET_SERVICE_Context *service = cls; | 1133 | struct GNUNET_SERVICE_Context *service = cls; |
1136 | struct GNUNET_SERVER_Handle *server = service->server; | 1134 | struct GNUNET_SERVER_Handle *server = service->server; |
@@ -1147,14 +1145,15 @@ shutdown_task (void *cls, | |||
1147 | * Initial task for the service. | 1145 | * Initial task for the service. |
1148 | * | 1146 | * |
1149 | * @param cls service context | 1147 | * @param cls service context |
1150 | * @param tc unused | ||
1151 | */ | 1148 | */ |
1152 | static void | 1149 | static void |
1153 | service_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1150 | service_task (void *cls) |
1154 | { | 1151 | { |
1155 | struct GNUNET_SERVICE_Context *sctx = cls; | 1152 | struct GNUNET_SERVICE_Context *sctx = cls; |
1156 | unsigned int i; | 1153 | unsigned int i; |
1154 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1157 | 1155 | ||
1156 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1158 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 1157 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
1159 | return; | 1158 | return; |
1160 | (void) GNUNET_SPEEDUP_start_ (sctx->cfg); | 1159 | (void) GNUNET_SPEEDUP_start_ (sctx->cfg); |
diff --git a/src/util/socks.c b/src/util/socks.c index 3fa18cca9..cc59858dd 100644 --- a/src/util/socks.c +++ b/src/util/socks.c | |||
@@ -105,7 +105,7 @@ unsigned char * SOCK5_proto_string(unsigned char * b, const char * s) | |||
105 | /** | 105 | /** |
106 | * State of the SOCKS5 handshake. | 106 | * State of the SOCKS5 handshake. |
107 | */ | 107 | */ |
108 | struct GNUNET_SOCKS_Handshake | 108 | struct GNUNET_SOCKS_Handshake |
109 | { | 109 | { |
110 | 110 | ||
111 | /** | 111 | /** |
@@ -124,7 +124,7 @@ struct GNUNET_SOCKS_Handshake | |||
124 | struct GNUNET_CONNECTION_TransmitHandle *th; | 124 | struct GNUNET_CONNECTION_TransmitHandle *th; |
125 | 125 | ||
126 | /** | 126 | /** |
127 | * Our stage in the SOCKS5 handshake | 127 | * Our stage in the SOCKS5 handshake |
128 | */ | 128 | */ |
129 | int step; | 129 | int step; |
130 | 130 | ||
@@ -199,7 +199,7 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih) | |||
199 | GNUNET_assert (SOCKS5_step_done > ih->step && ih->step >= 0); | 199 | GNUNET_assert (SOCKS5_step_done > ih->step && ih->step >= 0); |
200 | switch (ih->step) { | 200 | switch (ih->step) { |
201 | case SOCKS5_step_greet: /* SOCKS5 server's greeting */ | 201 | case SOCKS5_step_greet: /* SOCKS5 server's greeting */ |
202 | if (b[0] != 5) | 202 | if (b[0] != 5) |
203 | { | 203 | { |
204 | LOG (GNUNET_ERROR_TYPE_ERROR, | 204 | LOG (GNUNET_ERROR_TYPE_ERROR, |
205 | "Not a SOCKS5 server\n"); | 205 | "Not a SOCKS5 server\n"); |
@@ -234,7 +234,7 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih) | |||
234 | b += 2; | 234 | b += 2; |
235 | break; | 235 | break; |
236 | case SOCKS5_step_cmd: /* SOCKS5 server's responce to command */ | 236 | case SOCKS5_step_cmd: /* SOCKS5 server's responce to command */ |
237 | if (b[0] != 5) | 237 | if (b[0] != 5) |
238 | { | 238 | { |
239 | LOG (GNUNET_ERROR_TYPE_ERROR, | 239 | LOG (GNUNET_ERROR_TYPE_ERROR, |
240 | "SOCKS5 protocol error\n"); | 240 | "SOCKS5 protocol error\n"); |
@@ -271,11 +271,11 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih) | |||
271 | ih->instart = b; | 271 | ih->instart = b; |
272 | SOCKS5_handshake_done (ih); | 272 | SOCKS5_handshake_done (ih); |
273 | return; | 273 | return; |
274 | case SOCKS5_step_done: | 274 | case SOCKS5_step_done: |
275 | GNUNET_assert (0); | 275 | GNUNET_assert (0); |
276 | } | 276 | } |
277 | ih->instart = b; | 277 | ih->instart = b; |
278 | /* Do not reschedule the sender unless we're done reading. | 278 | /* Do not reschedule the sender unless we're done reading. |
279 | * I imagine this lets us avoid ever cancelling the transmit handle. */ | 279 | * I imagine this lets us avoid ever cancelling the transmit handle. */ |
280 | register_sender (ih); | 280 | register_sender (ih); |
281 | } | 281 | } |
@@ -289,7 +289,7 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih) | |||
289 | * @param handler_cls closure for @a handler | 289 | * @param handler_cls closure for @a handler |
290 | */ | 290 | */ |
291 | void | 291 | void |
292 | reciever (void *cls, | 292 | reciever (void *cls, |
293 | const void *buf, size_t available, | 293 | const void *buf, size_t available, |
294 | const struct sockaddr * addr, | 294 | const struct sockaddr * addr, |
295 | socklen_t addrlen, int errCode) | 295 | socklen_t addrlen, int errCode) |
@@ -330,7 +330,7 @@ register_reciever (struct GNUNET_SOCKS_Handshake *ih, int want) | |||
330 | */ | 330 | */ |
331 | 331 | ||
332 | size_t | 332 | size_t |
333 | transmit_ready (void *cls, | 333 | transmit_ready (void *cls, |
334 | size_t size, | 334 | size_t size, |
335 | void *buf) | 335 | void *buf) |
336 | { | 336 | { |
@@ -345,23 +345,28 @@ transmit_ready (void *cls, | |||
345 | * GNUNET_CONNECTION_notify_transmit_ready() can schedule : | 345 | * GNUNET_CONNECTION_notify_transmit_ready() can schedule : |
346 | * transmit_timeout() - DNS still working | 346 | * transmit_timeout() - DNS still working |
347 | * connect_error() - DNS done but no socket? | 347 | * connect_error() - DNS done but no socket? |
348 | * transmit_ready() - scheduler shutdown or timeout, or signal_transmit_error() | 348 | * transmit_ready() - scheduler shutdown or timeout, or signal_transmit_error() |
349 | * We'd need to dig into the scheduler to guess at the reason, as | 349 | * We'd need to dig into the scheduler to guess at the reason, as |
350 | * connection.c tells us nothing itself, but mostly its timouts. | 350 | * connection.c tells us nothing itself, but mostly its timouts. |
351 | * Initially, we'll simply ignore this and leave massive timeouts, but | 351 | * Initially, we'll simply ignore this and leave massive timeouts, but |
352 | * maybe that should change for error handling pruposes. It appears that | 352 | * maybe that should change for error handling pruposes. It appears that |
353 | * successful operations, including DNS resolution, do not use this. */ | 353 | * successful operations, including DNS resolution, do not use this. */ |
354 | if (NULL==buf) | 354 | if (NULL == buf) |
355 | { | 355 | { |
356 | enum GNUNET_SCHEDULER_Reason reason = GNUNET_SCHEDULER_get_reason (); | 356 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
357 | if (0 != (reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 357 | |
358 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
359 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | ||
358 | return 0; | 360 | return 0; |
359 | if (0 != (reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) { | 361 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) { |
360 | if (0==ih->step) { | 362 | if (0==ih->step) |
363 | { | ||
361 | LOG (GNUNET_ERROR_TYPE_WARNING, | 364 | LOG (GNUNET_ERROR_TYPE_WARNING, |
362 | "Timeout contacting SOCKS server, retrying indefinitely, but probably hopeless.\n"); | 365 | "Timeout contacting SOCKS server, retrying indefinitely, but probably hopeless.\n"); |
363 | register_sender (ih); | 366 | register_sender (ih); |
364 | } else { | 367 | } |
368 | else | ||
369 | { | ||
365 | LOG (GNUNET_ERROR_TYPE_ERROR, | 370 | LOG (GNUNET_ERROR_TYPE_ERROR, |
366 | "Timeout during mid SOCKS handshake (step %u), probably not a SOCKS server.\n", | 371 | "Timeout during mid SOCKS handshake (step %u), probably not a SOCKS server.\n", |
367 | ih->step); | 372 | ih->step); |
@@ -418,7 +423,7 @@ register_sender (struct GNUNET_SOCKS_Handshake *ih) | |||
418 | /** | 423 | /** |
419 | * Initialize a SOCKS5 handshake for authentication via username and | 424 | * Initialize a SOCKS5 handshake for authentication via username and |
420 | * password. Tor uses SOCKS username and password authentication to assign | 425 | * password. Tor uses SOCKS username and password authentication to assign |
421 | * programs unique circuits. | 426 | * programs unique circuits. |
422 | * | 427 | * |
423 | * @param user username for the proxy | 428 | * @param user username for the proxy |
424 | * @param pass password for the proxy | 429 | * @param pass password for the proxy |
@@ -435,7 +440,7 @@ GNUNET_SOCKS_init_handshake (const char *user, const char *pass) | |||
435 | unsigned char * n = b++; | 440 | unsigned char * n = b++; |
436 | *n = 1; /* Number of authentication methods */ | 441 | *n = 1; /* Number of authentication methods */ |
437 | /* We support no authentication even when requesting authentication, | 442 | /* We support no authentication even when requesting authentication, |
438 | * but this appears harmless, given the way that Tor uses authentication. | 443 | * but this appears harmless, given the way that Tor uses authentication. |
439 | * And some SOCKS5 servers might require this. */ | 444 | * And some SOCKS5 servers might require this. */ |
440 | *(b++) = SOCKS5_AUTH_NOAUTH; | 445 | *(b++) = SOCKS5_AUTH_NOAUTH; |
441 | if (NULL != user) { | 446 | if (NULL != user) { |
@@ -445,7 +450,7 @@ GNUNET_SOCKS_init_handshake (const char *user, const char *pass) | |||
445 | /* There is no apperent reason to support authentication methods beyond | 450 | /* There is no apperent reason to support authentication methods beyond |
446 | * username and password since afaik Tor does not support them. */ | 451 | * username and password since afaik Tor does not support them. */ |
447 | 452 | ||
448 | /* We authenticate with an empty username and password if the server demands | 453 | /* We authenticate with an empty username and password if the server demands |
449 | * them but we do not have any. */ | 454 | * them but we do not have any. */ |
450 | if (user == NULL) | 455 | if (user == NULL) |
451 | user = ""; | 456 | user = ""; |
@@ -466,7 +471,7 @@ GNUNET_SOCKS_init_handshake (const char *user, const char *pass) | |||
466 | 471 | ||
467 | 472 | ||
468 | /** | 473 | /** |
469 | * Initialize a SOCKS5 handshake without authentication, thereby possibly | 474 | * Initialize a SOCKS5 handshake without authentication, thereby possibly |
470 | * sharing a Tor circuit with another process. | 475 | * sharing a Tor circuit with another process. |
471 | * | 476 | * |
472 | * @return Valid SOCKS5 hanbdshake handle | 477 | * @return Valid SOCKS5 hanbdshake handle |
@@ -480,11 +485,11 @@ GNUNET_SOCKS_init_handshake_noauth () | |||
480 | 485 | ||
481 | /** | 486 | /** |
482 | * Build request that the SOCKS5 proxy open a TCP/IP stream to the given host | 487 | * Build request that the SOCKS5 proxy open a TCP/IP stream to the given host |
483 | * and port. | 488 | * and port. |
484 | * | 489 | * |
485 | * @param ih SOCKS5 handshake | 490 | * @param ih SOCKS5 handshake |
486 | * @param hostname | 491 | * @param hostname |
487 | * @param port | 492 | * @param port |
488 | */ | 493 | */ |
489 | void | 494 | void |
490 | GNUNET_SOCKS_set_handshake_destination (struct GNUNET_SOCKS_Handshake *ih, | 495 | GNUNET_SOCKS_set_handshake_destination (struct GNUNET_SOCKS_Handshake *ih, |
@@ -529,7 +534,7 @@ GNUNET_SOCKS_set_handshake_destination (struct GNUNET_SOCKS_Handshake *ih, | |||
529 | * @param c open unused connection, consumed here. | 534 | * @param c open unused connection, consumed here. |
530 | * @return Connection handle that becomes usable when the SOCKS5 handshake completes. | 535 | * @return Connection handle that becomes usable when the SOCKS5 handshake completes. |
531 | */ | 536 | */ |
532 | struct GNUNET_CONNECTION_Handle * | 537 | struct GNUNET_CONNECTION_Handle * |
533 | GNUNET_SOCKS_run_handshake(struct GNUNET_SOCKS_Handshake *ih, | 538 | GNUNET_SOCKS_run_handshake(struct GNUNET_SOCKS_Handshake *ih, |
534 | struct GNUNET_CONNECTION_Handle *c) | 539 | struct GNUNET_CONNECTION_Handle *c) |
535 | { | 540 | { |
@@ -580,7 +585,7 @@ GNUNET_SOCKS_do_connect (const char *service_name, | |||
580 | if (GNUNET_OK != | 585 | if (GNUNET_OK != |
581 | GNUNET_CONFIGURATION_get_value_number (cfg, service_name, "SOCKSPORT", &port0)) | 586 | GNUNET_CONFIGURATION_get_value_number (cfg, service_name, "SOCKSPORT", &port0)) |
582 | port0 = 9050; | 587 | port0 = 9050; |
583 | /* A typical Tor client should usually try port 9150 for the TBB too, but | 588 | /* A typical Tor client should usually try port 9150 for the TBB too, but |
584 | * GUNNet can probably assume a system Tor instalation. */ | 589 | * GUNNet can probably assume a system Tor instalation. */ |
585 | if (GNUNET_OK != | 590 | if (GNUNET_OK != |
586 | GNUNET_CONFIGURATION_get_value_string (cfg, service_name, "SOCKSHOST", &host0)) | 591 | GNUNET_CONFIGURATION_get_value_string (cfg, service_name, "SOCKSHOST", &host0)) |
diff --git a/src/util/speedup.c b/src/util/speedup.c index a42ed7faf..6dce6a490 100644 --- a/src/util/speedup.c +++ b/src/util/speedup.c | |||
@@ -34,16 +34,17 @@ static struct GNUNET_TIME_Relative interval; | |||
34 | 34 | ||
35 | static struct GNUNET_TIME_Relative delta; | 35 | static struct GNUNET_TIME_Relative delta; |
36 | 36 | ||
37 | static struct GNUNET_SCHEDULER_Task * speedup_task; | 37 | static struct GNUNET_SCHEDULER_Task *speedup_task; |
38 | 38 | ||
39 | 39 | ||
40 | static void | 40 | static void |
41 | do_speedup (void *cls, | 41 | do_speedup (void *cls) |
42 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
43 | { | 42 | { |
44 | static long long current_offset; | 43 | static long long current_offset; |
44 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
45 | 45 | ||
46 | speedup_task = NULL; | 46 | speedup_task = NULL; |
47 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
47 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 48 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
48 | return; | 49 | return; |
49 | current_offset += delta.rel_value_us; | 50 | current_offset += delta.rel_value_us; |
diff --git a/src/util/test_client.c b/src/util/test_client.c index d8bf67ac6..dab985e5f 100644 --- a/src/util/test_client.c +++ b/src/util/test_client.c | |||
@@ -125,7 +125,7 @@ make_msg (void *cls, size_t size, void *buf) | |||
125 | 125 | ||
126 | 126 | ||
127 | static void | 127 | static void |
128 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 128 | task (void *cls) |
129 | { | 129 | { |
130 | struct sockaddr_in sa; | 130 | struct sockaddr_in sa; |
131 | struct sockaddr *sap[2]; | 131 | struct sockaddr *sap[2]; |
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 6c33c2da1..21eb3c6c6 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -58,7 +58,7 @@ runone (void); | |||
58 | 58 | ||
59 | 59 | ||
60 | static void | 60 | static void |
61 | end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 61 | end_task (void *cls) |
62 | { | 62 | { |
63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending phase %d, ok is %d\n", phase, | 63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending phase %d, ok is %d\n", phase, |
64 | ok); | 64 | ok); |
@@ -215,7 +215,7 @@ static int bytes; | |||
215 | 215 | ||
216 | 216 | ||
217 | static void | 217 | static void |
218 | read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 218 | read_call (void *cls) |
219 | { | 219 | { |
220 | const struct GNUNET_DISK_FileHandle *stdout_read_handle = cls; | 220 | const struct GNUNET_DISK_FileHandle *stdout_read_handle = cls; |
221 | char level[8]; | 221 | char level[8]; |
@@ -425,7 +425,7 @@ runone () | |||
425 | 425 | ||
426 | 426 | ||
427 | static void | 427 | static void |
428 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 428 | task (void *cls) |
429 | { | 429 | { |
430 | phase = 0; | 430 | phase = 0; |
431 | runone (); | 431 | runone (); |
diff --git a/src/util/test_connection.c b/src/util/test_connection.c index c4987d27d..eaca75c2e 100644 --- a/src/util/test_connection.c +++ b/src/util/test_connection.c | |||
@@ -98,7 +98,7 @@ receive_check (void *cls, const void *buf, size_t available, | |||
98 | 98 | ||
99 | 99 | ||
100 | static void | 100 | static void |
101 | run_accept (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 101 | run_accept (void *cls) |
102 | { | 102 | { |
103 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test accepts connection\n"); | 103 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test accepts connection\n"); |
104 | asock = GNUNET_CONNECTION_create_from_accept (NULL, NULL, ls); | 104 | asock = GNUNET_CONNECTION_create_from_accept (NULL, NULL, ls); |
@@ -128,7 +128,7 @@ make_hello (void *cls, size_t size, void *buf) | |||
128 | 128 | ||
129 | 129 | ||
130 | static void | 130 | static void |
131 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 131 | task (void *cls) |
132 | { | 132 | { |
133 | ls = open_listen_socket (); | 133 | ls = open_listen_socket (); |
134 | lsock = GNUNET_CONNECTION_create_from_existing (ls); | 134 | lsock = GNUNET_CONNECTION_create_from_existing (ls); |
diff --git a/src/util/test_connection_addressing.c b/src/util/test_connection_addressing.c index 5d2766f5f..a6345b10a 100644 --- a/src/util/test_connection_addressing.c +++ b/src/util/test_connection_addressing.c | |||
@@ -102,7 +102,7 @@ receive_check (void *cls, const void *buf, size_t available, | |||
102 | 102 | ||
103 | 103 | ||
104 | static void | 104 | static void |
105 | run_accept (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 105 | run_accept (void *cls) |
106 | { | 106 | { |
107 | void *addr; | 107 | void *addr; |
108 | size_t alen; | 108 | size_t alen; |
@@ -142,7 +142,7 @@ make_hello (void *cls, size_t size, void *buf) | |||
142 | 142 | ||
143 | 143 | ||
144 | static void | 144 | static void |
145 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 145 | task (void *cls) |
146 | { | 146 | { |
147 | struct sockaddr_in v4; | 147 | struct sockaddr_in v4; |
148 | 148 | ||
diff --git a/src/util/test_connection_receive_cancel.c b/src/util/test_connection_receive_cancel.c index 73a041bdf..9ec96d8a6 100644 --- a/src/util/test_connection_receive_cancel.c +++ b/src/util/test_connection_receive_cancel.c | |||
@@ -79,7 +79,7 @@ dead_receive (void *cls, const void *buf, size_t available, | |||
79 | 79 | ||
80 | 80 | ||
81 | static void | 81 | static void |
82 | run_accept_cancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 82 | run_accept_cancel (void *cls) |
83 | { | 83 | { |
84 | asock = GNUNET_CONNECTION_create_from_accept (NULL, NULL, ls); | 84 | asock = GNUNET_CONNECTION_create_from_accept (NULL, NULL, ls); |
85 | GNUNET_assert (asock != NULL); | 85 | GNUNET_assert (asock != NULL); |
@@ -92,7 +92,7 @@ run_accept_cancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
92 | 92 | ||
93 | 93 | ||
94 | static void | 94 | static void |
95 | receive_cancel_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 95 | receive_cancel_task (void *cls) |
96 | { | 96 | { |
97 | int *ok = cls; | 97 | int *ok = cls; |
98 | 98 | ||
@@ -105,7 +105,7 @@ receive_cancel_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | 105 | ||
106 | 106 | ||
107 | static void | 107 | static void |
108 | task_receive_cancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | task_receive_cancel (void *cls) |
109 | { | 109 | { |
110 | ls = open_listen_socket (); | 110 | ls = open_listen_socket (); |
111 | lsock = GNUNET_CONNECTION_create_from_existing (ls); | 111 | lsock = GNUNET_CONNECTION_create_from_existing (ls); |
diff --git a/src/util/test_connection_timeout.c b/src/util/test_connection_timeout.c index 5a649f5b0..e78cec669 100644 --- a/src/util/test_connection_timeout.c +++ b/src/util/test_connection_timeout.c | |||
@@ -93,7 +93,7 @@ send_kilo (void *cls, size_t size, void *buf) | |||
93 | 93 | ||
94 | 94 | ||
95 | static void | 95 | static void |
96 | task_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 96 | task_timeout (void *cls) |
97 | { | 97 | { |
98 | 98 | ||
99 | ls = open_listen_socket (); | 99 | ls = open_listen_socket (); |
diff --git a/src/util/test_connection_timeout_no_connect.c b/src/util/test_connection_timeout_no_connect.c index 1e3230d2f..ebcd4b71e 100644 --- a/src/util/test_connection_timeout_no_connect.c +++ b/src/util/test_connection_timeout_no_connect.c | |||
@@ -44,7 +44,7 @@ handle_timeout (void *cls, size_t size, void *buf) | |||
44 | 44 | ||
45 | 45 | ||
46 | static void | 46 | static void |
47 | task_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 47 | task_timeout (void *cls) |
48 | { | 48 | { |
49 | csock = GNUNET_CONNECTION_create_from_connect (cfg, "localhost", PORT); | 49 | csock = GNUNET_CONNECTION_create_from_connect (cfg, "localhost", PORT); |
50 | GNUNET_assert (csock != NULL); | 50 | GNUNET_assert (csock != NULL); |
diff --git a/src/util/test_connection_transmit_cancel.c b/src/util/test_connection_transmit_cancel.c index 8d016068c..9ef0720ed 100644 --- a/src/util/test_connection_transmit_cancel.c +++ b/src/util/test_connection_transmit_cancel.c | |||
@@ -38,7 +38,7 @@ not_run (void *cls, size_t size, void *buf) | |||
38 | 38 | ||
39 | 39 | ||
40 | static void | 40 | static void |
41 | task_transmit_cancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 41 | task_transmit_cancel (void *cls) |
42 | { | 42 | { |
43 | int *ok = cls; | 43 | int *ok = cls; |
44 | struct GNUNET_CONNECTION_TransmitHandle *th; | 44 | struct GNUNET_CONNECTION_TransmitHandle *th; |
diff --git a/src/util/test_crypto_hash.c b/src/util/test_crypto_hash.c index fa0013264..731205841 100644 --- a/src/util/test_crypto_hash.c +++ b/src/util/test_crypto_hash.c | |||
@@ -114,7 +114,7 @@ finished_task (void *cls, const struct GNUNET_HashCode * res) | |||
114 | 114 | ||
115 | 115 | ||
116 | static void | 116 | static void |
117 | file_hasher (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 117 | file_hasher (void *cls) |
118 | { | 118 | { |
119 | GNUNET_assert (NULL != | 119 | GNUNET_assert (NULL != |
120 | GNUNET_CRYPTO_hash_file (GNUNET_SCHEDULER_PRIORITY_DEFAULT, | 120 | GNUNET_CRYPTO_hash_file (GNUNET_SCHEDULER_PRIORITY_DEFAULT, |
diff --git a/src/util/test_disk.c b/src/util/test_disk.c index 560b6710e..86b96e16c 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c | |||
@@ -141,12 +141,13 @@ iter_callback (void *cls, struct GNUNET_DISK_DirectoryIterator *di, | |||
141 | } | 141 | } |
142 | 142 | ||
143 | static void | 143 | static void |
144 | iter_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 144 | iter_task (void *cls) |
145 | { | 145 | { |
146 | GNUNET_DISK_directory_iterator_start (GNUNET_SCHEDULER_PRIORITY_DEFAULT, | 146 | GNUNET_DISK_directory_iterator_start (GNUNET_SCHEDULER_PRIORITY_DEFAULT, |
147 | "test", &iter_callback, cls); | 147 | "test", &iter_callback, cls); |
148 | } | 148 | } |
149 | 149 | ||
150 | |||
150 | static int | 151 | static int |
151 | testDirIter () | 152 | testDirIter () |
152 | { | 153 | { |
diff --git a/src/util/test_mq_client.c b/src/util/test_mq_client.c index 0d2f3befe..f894c3912 100644 --- a/src/util/test_mq_client.c +++ b/src/util/test_mq_client.c | |||
@@ -62,7 +62,7 @@ recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | |||
62 | 62 | ||
63 | 63 | ||
64 | static void | 64 | static void |
65 | clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 65 | clean_up (void *cls) |
66 | { | 66 | { |
67 | GNUNET_SERVER_destroy (server); | 67 | GNUNET_SERVER_destroy (server); |
68 | server = NULL; | 68 | server = NULL; |
@@ -134,7 +134,7 @@ test_mq (struct GNUNET_CLIENT_Connection *client) | |||
134 | 134 | ||
135 | 135 | ||
136 | static void | 136 | static void |
137 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 137 | task (void *cls) |
138 | { | 138 | { |
139 | struct sockaddr_in sa; | 139 | struct sockaddr_in sa; |
140 | struct sockaddr *sap[2]; | 140 | struct sockaddr *sap[2]; |
@@ -181,4 +181,3 @@ main (int argc, char *argv[]) | |||
181 | GNUNET_assert (GNUNET_YES == notify); | 181 | GNUNET_assert (GNUNET_YES == notify); |
182 | return ok; | 182 | return ok; |
183 | } | 183 | } |
184 | |||
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 3823beb3d..c617917cc 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -58,7 +58,7 @@ struct read_context | |||
58 | struct read_context rc; | 58 | struct read_context rc; |
59 | 59 | ||
60 | static void | 60 | static void |
61 | end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 61 | end_task (void *cls) |
62 | { | 62 | { |
63 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) | 63 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
64 | { | 64 | { |
@@ -73,7 +73,7 @@ end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
73 | 73 | ||
74 | 74 | ||
75 | static void | 75 | static void |
76 | read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 76 | read_call (void *cls) |
77 | { | 77 | { |
78 | int bytes; | 78 | int bytes; |
79 | 79 | ||
@@ -110,7 +110,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
110 | 110 | ||
111 | 111 | ||
112 | static void | 112 | static void |
113 | run_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 113 | run_task (void *cls) |
114 | { | 114 | { |
115 | char *fn; | 115 | char *fn; |
116 | const struct GNUNET_DISK_FileHandle *stdout_read_handle; | 116 | const struct GNUNET_DISK_FileHandle *stdout_read_handle; |
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c index 01d93febd..a246d75c5 100644 --- a/src/util/test_scheduler.c +++ b/src/util/test_scheduler.c | |||
@@ -31,7 +31,7 @@ static const struct GNUNET_DISK_FileHandle *fds[2]; | |||
31 | 31 | ||
32 | 32 | ||
33 | static void | 33 | static void |
34 | task2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 34 | task2 (void *cls) |
35 | { | 35 | { |
36 | int *ok = cls; | 36 | int *ok = cls; |
37 | 37 | ||
@@ -44,7 +44,7 @@ task2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
44 | 44 | ||
45 | 45 | ||
46 | static void | 46 | static void |
47 | task3 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 47 | task3 (void *cls) |
48 | { | 48 | { |
49 | int *ok = cls; | 49 | int *ok = cls; |
50 | 50 | ||
@@ -54,11 +54,13 @@ task3 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
54 | 54 | ||
55 | 55 | ||
56 | static void | 56 | static void |
57 | taskWrt (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 57 | taskWrt (void *cls) |
58 | { | 58 | { |
59 | static char c; | 59 | static char c; |
60 | int *ok = cls; | 60 | int *ok = cls; |
61 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
61 | 62 | ||
63 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
62 | GNUNET_assert (6 == *ok); | 64 | GNUNET_assert (6 == *ok); |
63 | GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->write_ready, fds[1])); | 65 | GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->write_ready, fds[1])); |
64 | (*ok) = 7; | 66 | (*ok) = 7; |
@@ -67,14 +69,14 @@ taskWrt (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
67 | 69 | ||
68 | 70 | ||
69 | static void | 71 | static void |
70 | taskNeverRun (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 72 | taskNeverRun (void *cls) |
71 | { | 73 | { |
72 | GNUNET_assert (0); | 74 | GNUNET_assert (0); |
73 | } | 75 | } |
74 | 76 | ||
75 | 77 | ||
76 | static void | 78 | static void |
77 | taskLast (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 79 | taskLast (void *cls) |
78 | { | 80 | { |
79 | int *ok = cls; | 81 | int *ok = cls; |
80 | 82 | ||
@@ -85,11 +87,13 @@ taskLast (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
85 | 87 | ||
86 | 88 | ||
87 | static void | 89 | static void |
88 | taskRd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 90 | taskRd (void *cls) |
89 | { | 91 | { |
90 | static char c; | 92 | static char c; |
91 | int *ok = cls; | 93 | int *ok = cls; |
94 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
92 | 95 | ||
96 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
93 | GNUNET_assert (7 == *ok); | 97 | GNUNET_assert (7 == *ok); |
94 | GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, fds[0])); | 98 | GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, fds[0])); |
95 | GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1)); | 99 | GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1)); |
@@ -101,7 +105,7 @@ taskRd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
101 | 105 | ||
102 | 106 | ||
103 | static void | 107 | static void |
104 | task4 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | task4 (void *cls) |
105 | { | 109 | { |
106 | int *ok = cls; | 110 | int *ok = cls; |
107 | 111 | ||
@@ -119,7 +123,7 @@ task4 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
119 | 123 | ||
120 | 124 | ||
121 | static void | 125 | static void |
122 | task1 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 126 | task1 (void *cls) |
123 | { | 127 | { |
124 | int *ok = cls; | 128 | int *ok = cls; |
125 | 129 | ||
@@ -148,7 +152,7 @@ check () | |||
148 | 152 | ||
149 | 153 | ||
150 | static void | 154 | static void |
151 | taskShutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 155 | taskShutdown (void *cls) |
152 | { | 156 | { |
153 | int *ok = cls; | 157 | int *ok = cls; |
154 | 158 | ||
@@ -176,7 +180,7 @@ checkShutdown () | |||
176 | 180 | ||
177 | #ifndef MINGW | 181 | #ifndef MINGW |
178 | static void | 182 | static void |
179 | taskSig (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 183 | taskSig (void *cls) |
180 | { | 184 | { |
181 | int *ok = cls; | 185 | int *ok = cls; |
182 | 186 | ||
@@ -204,7 +208,7 @@ checkSignal () | |||
204 | 208 | ||
205 | 209 | ||
206 | static void | 210 | static void |
207 | taskCancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 211 | taskCancel (void *cls) |
208 | { | 212 | { |
209 | int *ok = cls; | 213 | int *ok = cls; |
210 | 214 | ||
diff --git a/src/util/test_scheduler_delay.c b/src/util/test_scheduler_delay.c index c3821a173..c55f28e9b 100644 --- a/src/util/test_scheduler_delay.c +++ b/src/util/test_scheduler_delay.c | |||
@@ -41,11 +41,9 @@ static unsigned long long cumDelta; | |||
41 | * Signature of the main function of a task. | 41 | * Signature of the main function of a task. |
42 | * | 42 | * |
43 | * @param cls closure | 43 | * @param cls closure |
44 | * @param tc context | ||
45 | */ | 44 | */ |
46 | static void | 45 | static void |
47 | test_task (void *cls, | 46 | test_task (void *cls) |
48 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
49 | { | 47 | { |
50 | struct GNUNET_TIME_Absolute now; | 48 | struct GNUNET_TIME_Absolute now; |
51 | 49 | ||
diff --git a/src/util/test_server.c b/src/util/test_server.c index fdf298128..189c13e18 100644 --- a/src/util/test_server.c +++ b/src/util/test_server.c | |||
@@ -74,11 +74,9 @@ static int ok; | |||
74 | * Final task invoked to clean up. | 74 | * Final task invoked to clean up. |
75 | * | 75 | * |
76 | * @param cls NULL | 76 | * @param cls NULL |
77 | * @param tc scheduler context | ||
78 | */ | 77 | */ |
79 | static void | 78 | static void |
80 | finish_up (void *cls, | 79 | finish_up (void *cls) |
81 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
82 | { | 80 | { |
83 | GNUNET_assert (7 == ok); | 81 | GNUNET_assert (7 == ok); |
84 | ok = 0; | 82 | ok = 0; |
@@ -262,11 +260,9 @@ static struct GNUNET_SERVER_MessageHandler handlers[] = { | |||
262 | * server. | 260 | * server. |
263 | * | 261 | * |
264 | * @param cls NULL | 262 | * @param cls NULL |
265 | * @param tc scheduler context | ||
266 | */ | 263 | */ |
267 | static void | 264 | static void |
268 | task (void *cls, | 265 | task (void *cls) |
269 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
270 | { | 266 | { |
271 | struct sockaddr_in sa; | 267 | struct sockaddr_in sa; |
272 | struct sockaddr *sap[2]; | 268 | struct sockaddr *sap[2]; |
diff --git a/src/util/test_server_disconnect.c b/src/util/test_server_disconnect.c index 4a6970fc3..21abf92bb 100644 --- a/src/util/test_server_disconnect.c +++ b/src/util/test_server_disconnect.c | |||
@@ -41,7 +41,7 @@ static int ok; | |||
41 | 41 | ||
42 | 42 | ||
43 | static void | 43 | static void |
44 | finish_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 44 | finish_up (void *cls) |
45 | { | 45 | { |
46 | GNUNET_assert (ok == 5); | 46 | GNUNET_assert (ok == 5); |
47 | ok = 0; | 47 | ok = 0; |
@@ -52,9 +52,10 @@ finish_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
52 | 52 | ||
53 | 53 | ||
54 | static void | 54 | static void |
55 | notify_disconnect (void *cls, struct GNUNET_SERVER_Client *clientarg) | 55 | notify_disconnect (void *cls, |
56 | struct GNUNET_SERVER_Client *clientarg) | ||
56 | { | 57 | { |
57 | if (clientarg == NULL) | 58 | if (NULL == clientarg) |
58 | return; | 59 | return; |
59 | GNUNET_assert (ok == 4); | 60 | GNUNET_assert (ok == 4); |
60 | ok = 5; | 61 | ok = 5; |
@@ -63,7 +64,7 @@ notify_disconnect (void *cls, struct GNUNET_SERVER_Client *clientarg) | |||
63 | 64 | ||
64 | 65 | ||
65 | static void | 66 | static void |
66 | server_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 67 | server_disconnect (void *cls) |
67 | { | 68 | { |
68 | struct GNUNET_SERVER_Client *argclient = cls; | 69 | struct GNUNET_SERVER_Client *argclient = cls; |
69 | 70 | ||
@@ -110,7 +111,7 @@ transmit_initial_message (void *cls, size_t size, void *buf) | |||
110 | 111 | ||
111 | 112 | ||
112 | static void | 113 | static void |
113 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 114 | task (void *cls) |
114 | { | 115 | { |
115 | struct sockaddr_in sa; | 116 | struct sockaddr_in sa; |
116 | struct sockaddr *sap[2]; | 117 | struct sockaddr *sap[2]; |
diff --git a/src/util/test_server_with_client.c b/src/util/test_server_with_client.c index 07bc88783..8a8f65474 100644 --- a/src/util/test_server_with_client.c +++ b/src/util/test_server_with_client.c | |||
@@ -40,7 +40,7 @@ static struct GNUNET_CONFIGURATION_Handle *cfg; | |||
40 | static int ok; | 40 | static int ok; |
41 | 41 | ||
42 | static void | 42 | static void |
43 | send_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 43 | send_done (void *cls) |
44 | { | 44 | { |
45 | struct GNUNET_SERVER_Client *argclient = cls; | 45 | struct GNUNET_SERVER_Client *argclient = cls; |
46 | 46 | ||
@@ -94,7 +94,7 @@ recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | |||
94 | 94 | ||
95 | 95 | ||
96 | static void | 96 | static void |
97 | clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 97 | clean_up (void *cls) |
98 | { | 98 | { |
99 | GNUNET_SERVER_destroy (server); | 99 | GNUNET_SERVER_destroy (server); |
100 | server = NULL; | 100 | server = NULL; |
@@ -146,7 +146,7 @@ static struct GNUNET_SERVER_MessageHandler handlers[] = { | |||
146 | 146 | ||
147 | 147 | ||
148 | static void | 148 | static void |
149 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 149 | task (void *cls) |
150 | { | 150 | { |
151 | struct sockaddr_in sa; | 151 | struct sockaddr_in sa; |
152 | struct sockaddr *sap[2]; | 152 | struct sockaddr *sap[2]; |
diff --git a/src/util/test_server_with_client_unix.c b/src/util/test_server_with_client_unix.c index 1d6f5dbed..ec84b08f8 100644 --- a/src/util/test_server_with_client_unix.c +++ b/src/util/test_server_with_client_unix.c | |||
@@ -39,7 +39,7 @@ static int ok; | |||
39 | 39 | ||
40 | 40 | ||
41 | static void | 41 | static void |
42 | send_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 42 | send_done (void *cls) |
43 | { | 43 | { |
44 | struct GNUNET_SERVER_Client *argclient = cls; | 44 | struct GNUNET_SERVER_Client *argclient = cls; |
45 | 45 | ||
@@ -74,7 +74,7 @@ recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | |||
74 | 74 | ||
75 | 75 | ||
76 | static void | 76 | static void |
77 | clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 77 | clean_up (void *cls) |
78 | { | 78 | { |
79 | GNUNET_SERVER_destroy (server); | 79 | GNUNET_SERVER_destroy (server); |
80 | server = NULL; | 80 | server = NULL; |
@@ -126,7 +126,7 @@ static struct GNUNET_SERVER_MessageHandler handlers[] = { | |||
126 | 126 | ||
127 | 127 | ||
128 | static void | 128 | static void |
129 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 129 | task (void *cls) |
130 | { | 130 | { |
131 | struct sockaddr_un un; | 131 | struct sockaddr_un un; |
132 | const char *unixpath = "/tmp/testsock"; | 132 | const char *unixpath = "/tmp/testsock"; |
diff --git a/src/util/test_service.c b/src/util/test_service.c index 88f99f95a..efc765438 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -41,7 +41,7 @@ static struct GNUNET_CLIENT_Connection *client; | |||
41 | 41 | ||
42 | 42 | ||
43 | static void | 43 | static void |
44 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 44 | do_stop (void *cls) |
45 | { | 45 | { |
46 | if (NULL != client) | 46 | if (NULL != client) |
47 | { | 47 | { |
diff --git a/src/util/test_socks.c b/src/util/test_socks.c index bb7d0031a..7f1140720 100644 --- a/src/util/test_socks.c +++ b/src/util/test_socks.c | |||
@@ -126,7 +126,7 @@ make_msg (void *cls, size_t size, void *buf) | |||
126 | 126 | ||
127 | 127 | ||
128 | static void | 128 | static void |
129 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 129 | task (void *cls) |
130 | { | 130 | { |
131 | struct sockaddr_in sa; | 131 | struct sockaddr_in sa; |
132 | struct sockaddr *sap[2]; | 132 | struct sockaddr *sap[2]; |
diff --git a/src/util/test_speedup.c b/src/util/test_speedup.c index 3c4a9bfdc..5d46e3127 100644 --- a/src/util/test_speedup.c +++ b/src/util/test_speedup.c | |||
@@ -47,7 +47,7 @@ static unsigned int cycles; | |||
47 | * @param tc scheduler context, unused | 47 | * @param tc scheduler context, unused |
48 | */ | 48 | */ |
49 | static void | 49 | static void |
50 | run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 50 | run (void *cls) |
51 | { | 51 | { |
52 | cycles++; | 52 | cycles++; |
53 | fprintf (stderr, "..%u", cycles); | 53 | fprintf (stderr, "..%u", cycles); |
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index 8b202d7d4..58eda367f 100644 --- a/src/vpn/gnunet-service-vpn.c +++ b/src/vpn/gnunet-service-vpn.c | |||
@@ -2866,11 +2866,9 @@ cleanup_channel (void *cls, | |||
2866 | * Function scheduled as very last function, cleans up after us | 2866 | * Function scheduled as very last function, cleans up after us |
2867 | * | 2867 | * |
2868 | * @param cls unused | 2868 | * @param cls unused |
2869 | * @param tc unused | ||
2870 | */ | 2869 | */ |
2871 | static void | 2870 | static void |
2872 | cleanup (void *cls, | 2871 | cleanup (void *cls) |
2873 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2874 | { | 2872 | { |
2875 | unsigned int i; | 2873 | unsigned int i; |
2876 | 2874 | ||
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c index d6eb39bcb..d4acee49e 100644 --- a/src/vpn/gnunet-vpn.c +++ b/src/vpn/gnunet-vpn.c | |||
@@ -95,7 +95,7 @@ static struct GNUNET_TIME_Relative duration = { 5 * 60 * 1000} ; | |||
95 | * Shutdown. | 95 | * Shutdown. |
96 | */ | 96 | */ |
97 | static void | 97 | static void |
98 | do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 98 | do_disconnect (void *cls) |
99 | { | 99 | { |
100 | if (NULL != request) | 100 | if (NULL != request) |
101 | { | 101 | { |
diff --git a/src/vpn/vpn_api.c b/src/vpn/vpn_api.c index 208e56007..f3068f7c2 100644 --- a/src/vpn/vpn_api.c +++ b/src/vpn/vpn_api.c | |||
@@ -358,12 +358,10 @@ queue_request (struct GNUNET_VPN_RedirectionRequest *rr) | |||
358 | /** | 358 | /** |
359 | * Connect to the VPN service and start again to transmit our requests. | 359 | * Connect to the VPN service and start again to transmit our requests. |
360 | * | 360 | * |
361 | * @param cls the 'struct GNUNET_VPN_Handle *' | 361 | * @param cls the `struct GNUNET_VPN_Handle *` |
362 | * @param tc scheduler context | ||
363 | */ | 362 | */ |
364 | static void | 363 | static void |
365 | connect_task (void *cls, | 364 | connect_task (void *cls) |
366 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
367 | { | 365 | { |
368 | struct GNUNET_VPN_Handle *vh = cls; | 366 | struct GNUNET_VPN_Handle *vh = cls; |
369 | 367 | ||