aboutsummaryrefslogtreecommitdiff
path: root/src/ats
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats')
-rw-r--r--src/ats/ats_api_performance.c8
-rw-r--r--src/ats/ats_api_scheduling.c16
-rw-r--r--src/ats/gnunet-ats-solver-eval.c48
-rw-r--r--src/ats/gnunet-ats-solver-eval.h12
-rw-r--r--src/ats/gnunet-service-ats_normalization.c12
-rw-r--r--src/ats/plugin_ats_ril.c8
-rw-r--r--src/ats/test_ats_api_bandwidth_consumption.c20
-rw-r--r--src/ats/test_ats_api_performance_list_all_addresses.c8
-rw-r--r--src/ats/test_ats_api_performance_list_all_addresses_active.c8
-rw-r--r--src/ats/test_ats_api_performance_list_peer_addresses.c8
-rw-r--r--src/ats/test_ats_api_performance_monitor.c8
-rw-r--r--src/ats/test_ats_api_performance_monitor_initial_callback.c8
-rw-r--r--src/ats/test_ats_api_scheduling_add_address.c8
-rw-r--r--src/ats/test_ats_api_scheduling_add_address_duplicate.c16
-rw-r--r--src/ats/test_ats_api_scheduling_add_address_inbound.c8
-rw-r--r--src/ats/test_ats_api_scheduling_add_session.c8
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_address.c8
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_address_twice.c8
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_session.c8
-rw-r--r--src/ats/test_ats_api_scheduling_init.c8
-rw-r--r--src/ats/test_ats_simplistic_pref_aging.c8
-rw-r--r--src/ats/test_ats_solver_add_address.c8
-rw-r--r--src/ats/test_ats_solver_add_address_and_request.c8
-rw-r--r--src/ats/test_ats_solver_alternative_after_delete_address.c12
-rw-r--r--src/ats/test_ats_solver_convergence.c6
-rw-r--r--src/ats/test_ats_solver_preferences.c8
-rw-r--r--src/ats/test_ats_solver_request_and_add_address.c8
-rw-r--r--src/ats/test_ats_solver_request_and_delete_address.c8
28 files changed, 151 insertions, 151 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c
index b1c48bdde..6d5992033 100644
--- a/src/ats/ats_api_performance.c
+++ b/src/ats/ats_api_performance.c
@@ -221,7 +221,7 @@ struct GNUNET_ATS_PerformanceHandle
221 /** 221 /**
222 * Task to trigger reconnect. 222 * Task to trigger reconnect.
223 */ 223 */
224 GNUNET_SCHEDULER_TaskIdentifier task; 224 struct GNUNET_SCHEDULER_Task * task;
225 225
226 /** 226 /**
227 * Monitor request multiplexing 227 * Monitor request multiplexing
@@ -255,7 +255,7 @@ reconnect_task (void *cls,
255{ 255{
256 struct GNUNET_ATS_PerformanceHandle *ph = cls; 256 struct GNUNET_ATS_PerformanceHandle *ph = cls;
257 257
258 ph->task = GNUNET_SCHEDULER_NO_TASK; 258 ph->task = NULL;
259 reconnect (ph); 259 reconnect (ph);
260} 260}
261 261
@@ -740,10 +740,10 @@ GNUNET_ATS_performance_done (struct GNUNET_ATS_PerformanceHandle *ph)
740 GNUNET_free (rc); 740 GNUNET_free (rc);
741 } 741 }
742 742
743 if (GNUNET_SCHEDULER_NO_TASK != ph->task) 743 if (NULL != ph->task)
744 { 744 {
745 GNUNET_SCHEDULER_cancel (ph->task); 745 GNUNET_SCHEDULER_cancel (ph->task);
746 ph->task = GNUNET_SCHEDULER_NO_TASK; 746 ph->task = NULL;
747 } 747 }
748 if (NULL != ph->client) 748 if (NULL != ph->client)
749 { 749 {
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c
index b5bbf073d..6bb595391 100644
--- a/src/ats/ats_api_scheduling.c
+++ b/src/ats/ats_api_scheduling.c
@@ -177,12 +177,12 @@ struct GNUNET_ATS_SchedulingHandle
177 /** 177 /**
178 * Task to trigger reconnect. 178 * Task to trigger reconnect.
179 */ 179 */
180 GNUNET_SCHEDULER_TaskIdentifier task; 180 struct GNUNET_SCHEDULER_Task * task;
181 181
182 /** 182 /**
183 * Task retrieving interfaces from the system 183 * Task retrieving interfaces from the system
184 */ 184 */
185 GNUNET_SCHEDULER_TaskIdentifier interface_task; 185 struct GNUNET_SCHEDULER_Task * interface_task;
186 186
187 187
188 /** 188 /**
@@ -217,7 +217,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
217{ 217{
218 struct GNUNET_ATS_SchedulingHandle *sh = cls; 218 struct GNUNET_ATS_SchedulingHandle *sh = cls;
219 219
220 sh->task = GNUNET_SCHEDULER_NO_TASK; 220 sh->task = NULL;
221 reconnect (sh); 221 reconnect (sh);
222} 222}
223 223
@@ -825,7 +825,7 @@ static void
825get_addresses (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 825get_addresses (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
826{ 826{
827 struct GNUNET_ATS_SchedulingHandle * sh = cls; 827 struct GNUNET_ATS_SchedulingHandle * sh = cls;
828 sh->interface_task = GNUNET_SCHEDULER_NO_TASK; 828 sh->interface_task = NULL;
829 delete_networks (sh); 829 delete_networks (sh);
830 GNUNET_OS_network_interfaces_list(interface_proc, sh); 830 GNUNET_OS_network_interfaces_list(interface_proc, sh);
831 sh->interface_task = GNUNET_SCHEDULER_add_delayed (INTERFACE_PROCESSING_INTERVALL, 831 sh->interface_task = GNUNET_SCHEDULER_add_delayed (INTERFACE_PROCESSING_INTERVALL,
@@ -1005,10 +1005,10 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh)
1005 GNUNET_CLIENT_disconnect (sh->client); 1005 GNUNET_CLIENT_disconnect (sh->client);
1006 sh->client = NULL; 1006 sh->client = NULL;
1007 } 1007 }
1008 if (GNUNET_SCHEDULER_NO_TASK != sh->task) 1008 if (NULL != sh->task)
1009 { 1009 {
1010 GNUNET_SCHEDULER_cancel (sh->task); 1010 GNUNET_SCHEDULER_cancel (sh->task);
1011 sh->task = GNUNET_SCHEDULER_NO_TASK; 1011 sh->task = NULL;
1012 } 1012 }
1013 1013
1014 next = sh->sug_head; 1014 next = sh->sug_head;
@@ -1020,10 +1020,10 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh)
1020 } 1020 }
1021 1021
1022 delete_networks (sh); 1022 delete_networks (sh);
1023 if (sh->interface_task != GNUNET_SCHEDULER_NO_TASK) 1023 if (sh->interface_task != NULL)
1024 { 1024 {
1025 GNUNET_SCHEDULER_cancel(sh->interface_task); 1025 GNUNET_SCHEDULER_cancel(sh->interface_task);
1026 sh->interface_task = GNUNET_SCHEDULER_NO_TASK; 1026 sh->interface_task = NULL;
1027 } 1027 }
1028 GNUNET_array_grow (sh->session_array, sh->session_array_size, 0); 1028 GNUNET_array_grow (sh->session_array, sh->session_array_size, 0);
1029 GNUNET_free (sh); 1029 GNUNET_free (sh);
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c
index 86930d392..0fa83d741 100644
--- a/src/ats/gnunet-ats-solver-eval.c
+++ b/src/ats/gnunet-ats-solver-eval.c
@@ -244,7 +244,7 @@ static void
244logging_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 244logging_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
245{ 245{
246 struct LoggingHandle *l = cls; 246 struct LoggingHandle *l = cls;
247 l->logging_task = GNUNET_SCHEDULER_NO_TASK; 247 l->logging_task = NULL;
248 248
249 GNUNET_ATS_solver_logging_now (l); 249 GNUNET_ATS_solver_logging_now (l);
250 250
@@ -268,12 +268,12 @@ GNUNET_ATS_solver_logging_start (struct GNUNET_TIME_Relative freq)
268void 268void
269GNUNET_ATS_solver_logging_stop (struct LoggingHandle *l) 269GNUNET_ATS_solver_logging_stop (struct LoggingHandle *l)
270{ 270{
271 if (GNUNET_SCHEDULER_NO_TASK != l->logging_task) 271 if (NULL != l->logging_task)
272 GNUNET_SCHEDULER_cancel (l->logging_task); 272 GNUNET_SCHEDULER_cancel (l->logging_task);
273 273
274 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stop logging\n"); 274 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stop logging\n");
275 275
276 l->logging_task = GNUNET_SCHEDULER_NO_TASK; 276 l->logging_task = NULL;
277} 277}
278 278
279static struct LoggingFileHandle * 279static struct LoggingFileHandle *
@@ -513,9 +513,9 @@ GNUNET_ATS_solver_logging_free (struct LoggingHandle *l)
513 struct LoggingAddress *log_a_cur; 513 struct LoggingAddress *log_a_cur;
514 struct LoggingAddress *log_a_next; 514 struct LoggingAddress *log_a_next;
515 515
516 if (GNUNET_SCHEDULER_NO_TASK != l->logging_task) 516 if (NULL != l->logging_task)
517 GNUNET_SCHEDULER_cancel (l->logging_task); 517 GNUNET_SCHEDULER_cancel (l->logging_task);
518 l->logging_task = GNUNET_SCHEDULER_NO_TASK; 518 l->logging_task = NULL;
519 519
520 lts_next = l->head; 520 lts_next = l->head;
521 while (NULL != (lts_cur = lts_next)) 521 while (NULL != (lts_cur = lts_next))
@@ -621,7 +621,7 @@ set_prop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
621 double prop_value; 621 double prop_value;
622 struct GNUNET_ATS_Information atsi; 622 struct GNUNET_ATS_Information atsi;
623 623
624 pg->set_task = GNUNET_SCHEDULER_NO_TASK; 624 pg->set_task = NULL;
625 625
626 if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains_value (sh->addresses, 626 if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains_value (sh->addresses,
627 &pg->test_peer->peer_id, pg->test_address->ats_addr)) 627 &pg->test_peer->peer_id, pg->test_address->ats_addr))
@@ -702,10 +702,10 @@ GNUNET_ATS_solver_generate_property_stop (struct PropertyGenerator *pg)
702{ 702{
703 GNUNET_CONTAINER_DLL_remove (prop_gen_head, prop_gen_tail, pg); 703 GNUNET_CONTAINER_DLL_remove (prop_gen_head, prop_gen_tail, pg);
704 704
705 if (GNUNET_SCHEDULER_NO_TASK != pg->set_task) 705 if (NULL != pg->set_task)
706 { 706 {
707 GNUNET_SCHEDULER_cancel (pg->set_task); 707 GNUNET_SCHEDULER_cancel (pg->set_task);
708 pg->set_task = GNUNET_SCHEDULER_NO_TASK; 708 pg->set_task = NULL;
709 } 709 }
710 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 710 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
711 "Removing old up preference generator peer [%u] address [%u] `%s'\n", 711 "Removing old up preference generator peer [%u] address [%u] `%s'\n",
@@ -897,7 +897,7 @@ set_feedback_task (void *cls,
897 struct GNUNET_TIME_Relative dur; 897 struct GNUNET_TIME_Relative dur;
898 double p_new; 898 double p_new;
899 899
900 pg->feedback_task = GNUNET_SCHEDULER_NO_TASK; 900 pg->feedback_task = NULL;
901 901
902 if (NULL == (p = find_peer_by_id (pg->peer))) 902 if (NULL == (p = find_peer_by_id (pg->peer)))
903 { 903 {
@@ -966,7 +966,7 @@ set_pref_task (void *cls,
966 struct PreferenceGenerator *pg = cls; 966 struct PreferenceGenerator *pg = cls;
967 struct TestPeer *p; 967 struct TestPeer *p;
968 double pref_value; 968 double pref_value;
969 pg->set_task = GNUNET_SCHEDULER_NO_TASK; 969 pg->set_task = NULL;
970 970
971 if (NULL == (p = find_peer_by_id (pg->peer))) 971 if (NULL == (p = find_peer_by_id (pg->peer)))
972 { 972 {
@@ -1030,16 +1030,16 @@ GNUNET_ATS_solver_generate_preferences_stop (struct PreferenceGenerator *pg)
1030{ 1030{
1031 GNUNET_CONTAINER_DLL_remove (pref_gen_head, pref_gen_tail, pg); 1031 GNUNET_CONTAINER_DLL_remove (pref_gen_head, pref_gen_tail, pg);
1032 1032
1033 if (GNUNET_SCHEDULER_NO_TASK != pg->feedback_task) 1033 if (NULL != pg->feedback_task)
1034 { 1034 {
1035 GNUNET_SCHEDULER_cancel (pg->feedback_task); 1035 GNUNET_SCHEDULER_cancel (pg->feedback_task);
1036 pg->feedback_task = GNUNET_SCHEDULER_NO_TASK; 1036 pg->feedback_task = NULL;
1037 } 1037 }
1038 1038
1039 if (GNUNET_SCHEDULER_NO_TASK != pg->set_task) 1039 if (NULL != pg->set_task)
1040 { 1040 {
1041 GNUNET_SCHEDULER_cancel (pg->set_task); 1041 GNUNET_SCHEDULER_cancel (pg->set_task);
1042 pg->set_task = GNUNET_SCHEDULER_NO_TASK; 1042 pg->set_task = NULL;
1043 } 1043 }
1044 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1044 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1045 "Removing old up preference generator peer [%u] `%s'\n", 1045 "Removing old up preference generator peer [%u] `%s'\n",
@@ -2146,13 +2146,13 @@ static void
2146timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) 2146timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc)
2147{ 2147{
2148 struct Experiment *e = cls; 2148 struct Experiment *e = cls;
2149 e->experiment_timeout_task = GNUNET_SCHEDULER_NO_TASK; 2149 e->experiment_timeout_task = NULL;
2150 fprintf (stderr, "Experiment timeout!\n"); 2150 fprintf (stderr, "Experiment timeout!\n");
2151 2151
2152 if (GNUNET_SCHEDULER_NO_TASK != e->episode_timeout_task) 2152 if (NULL != e->episode_timeout_task)
2153 { 2153 {
2154 GNUNET_SCHEDULER_cancel (e->episode_timeout_task); 2154 GNUNET_SCHEDULER_cancel (e->episode_timeout_task);
2155 e->episode_timeout_task = GNUNET_SCHEDULER_NO_TASK; 2155 e->episode_timeout_task = NULL;
2156 } 2156 }
2157 2157
2158 e->e_done_cb (e, GNUNET_TIME_absolute_get_duration(e->start_time), 2158 e->e_done_cb (e, GNUNET_TIME_absolute_get_duration(e->start_time),
@@ -2524,7 +2524,7 @@ static void
2524timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) 2524timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc)
2525{ 2525{
2526 struct Experiment *e = cls; 2526 struct Experiment *e = cls;
2527 e->episode_timeout_task = GNUNET_SCHEDULER_NO_TASK; 2527 e->episode_timeout_task = NULL;
2528 if (NULL != e->ep_done_cb) 2528 if (NULL != e->ep_done_cb)
2529 e->ep_done_cb (e->cur); 2529 e->ep_done_cb (e->cur);
2530 2530
@@ -2534,10 +2534,10 @@ timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc)
2534 { 2534 {
2535 /* done */ 2535 /* done */
2536 fprintf (stderr, "Last episode done!\n"); 2536 fprintf (stderr, "Last episode done!\n");
2537 if (GNUNET_SCHEDULER_NO_TASK != e->experiment_timeout_task) 2537 if (NULL != e->experiment_timeout_task)
2538 { 2538 {
2539 GNUNET_SCHEDULER_cancel (e->experiment_timeout_task); 2539 GNUNET_SCHEDULER_cancel (e->experiment_timeout_task);
2540 e->experiment_timeout_task = GNUNET_SCHEDULER_NO_TASK; 2540 e->experiment_timeout_task = NULL;
2541 } 2541 }
2542 e->e_done_cb (e, GNUNET_TIME_absolute_get_duration(e->start_time), GNUNET_OK); 2542 e->e_done_cb (e, GNUNET_TIME_absolute_get_duration(e->start_time), GNUNET_OK);
2543 return; 2543 return;
@@ -2589,15 +2589,15 @@ GNUNET_ATS_solvers_experimentation_run (struct Experiment *e,
2589void 2589void
2590GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e) 2590GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e)
2591{ 2591{
2592 if (GNUNET_SCHEDULER_NO_TASK != e->experiment_timeout_task) 2592 if (NULL != e->experiment_timeout_task)
2593 { 2593 {
2594 GNUNET_SCHEDULER_cancel (e->experiment_timeout_task); 2594 GNUNET_SCHEDULER_cancel (e->experiment_timeout_task);
2595 e->experiment_timeout_task = GNUNET_SCHEDULER_NO_TASK; 2595 e->experiment_timeout_task = NULL;
2596 } 2596 }
2597 if (GNUNET_SCHEDULER_NO_TASK != e->episode_timeout_task) 2597 if (NULL != e->episode_timeout_task)
2598 { 2598 {
2599 GNUNET_SCHEDULER_cancel (e->episode_timeout_task); 2599 GNUNET_SCHEDULER_cancel (e->episode_timeout_task);
2600 e->episode_timeout_task = GNUNET_SCHEDULER_NO_TASK; 2600 e->episode_timeout_task = NULL;
2601 } 2601 }
2602 if (NULL != e->cfg) 2602 if (NULL != e->cfg)
2603 { 2603 {
diff --git a/src/ats/gnunet-ats-solver-eval.h b/src/ats/gnunet-ats-solver-eval.h
index 9893dc9f1..808f524da 100644
--- a/src/ats/gnunet-ats-solver-eval.h
+++ b/src/ats/gnunet-ats-solver-eval.h
@@ -231,7 +231,7 @@ struct Episode
231 231
232struct LoggingHandle 232struct LoggingHandle
233{ 233{
234 GNUNET_SCHEDULER_TaskIdentifier logging_task; 234 struct GNUNET_SCHEDULER_Task * logging_task;
235 struct GNUNET_TIME_Relative log_freq; 235 struct GNUNET_TIME_Relative log_freq;
236 236
237 /* DLL list for logging time steps */ 237 /* DLL list for logging time steps */
@@ -256,8 +256,8 @@ struct Experiment
256 256
257 struct GNUNET_CONFIGURATION_Handle *cfg; 257 struct GNUNET_CONFIGURATION_Handle *cfg;
258 258
259 GNUNET_SCHEDULER_TaskIdentifier experiment_timeout_task; 259 struct GNUNET_SCHEDULER_Task * experiment_timeout_task;
260 GNUNET_SCHEDULER_TaskIdentifier episode_timeout_task; 260 struct GNUNET_SCHEDULER_Task * episode_timeout_task;
261 struct Episode *cur; 261 struct Episode *cur;
262 262
263 GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb; 263 GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb;
@@ -282,8 +282,8 @@ struct PreferenceGenerator
282 struct GNUNET_TIME_Relative frequency; 282 struct GNUNET_TIME_Relative frequency;
283 struct GNUNET_TIME_Relative feedback_frequency; 283 struct GNUNET_TIME_Relative feedback_frequency;
284 284
285 GNUNET_SCHEDULER_TaskIdentifier set_task; 285 struct GNUNET_SCHEDULER_Task * set_task;
286 GNUNET_SCHEDULER_TaskIdentifier feedback_task; 286 struct GNUNET_SCHEDULER_Task * feedback_task;
287 struct GNUNET_TIME_Absolute next_ping_transmission; 287 struct GNUNET_TIME_Absolute next_ping_transmission;
288 struct GNUNET_TIME_Absolute time_start; 288 struct GNUNET_TIME_Absolute time_start;
289 289
@@ -326,7 +326,7 @@ struct PropertyGenerator
326 struct GNUNET_TIME_Relative duration_period; 326 struct GNUNET_TIME_Relative duration_period;
327 struct GNUNET_TIME_Relative frequency; 327 struct GNUNET_TIME_Relative frequency;
328 328
329 GNUNET_SCHEDULER_TaskIdentifier set_task; 329 struct GNUNET_SCHEDULER_Task * set_task;
330 struct GNUNET_TIME_Absolute next_ping_transmission; 330 struct GNUNET_TIME_Absolute next_ping_transmission;
331 struct GNUNET_TIME_Absolute time_start; 331 struct GNUNET_TIME_Absolute time_start;
332}; 332};
diff --git a/src/ats/gnunet-service-ats_normalization.c b/src/ats/gnunet-service-ats_normalization.c
index 17edf282d..5e03edcdf 100644
--- a/src/ats/gnunet-service-ats_normalization.c
+++ b/src/ats/gnunet-service-ats_normalization.c
@@ -194,7 +194,7 @@ static struct PreferenceClient *pc_tail;
194 */ 194 */
195static struct PeerRelative defvalues; 195static struct PeerRelative defvalues;
196 196
197static GNUNET_SCHEDULER_TaskIdentifier aging_task; 197static struct GNUNET_SCHEDULER_Task * aging_task;
198 198
199/** 199/**
200 * Application Preference Normalization 200 * Application Preference Normalization
@@ -385,7 +385,7 @@ preference_aging (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
385 int values_to_update; 385 int values_to_update;
386 double backup; 386 double backup;
387 387
388 aging_task = GNUNET_SCHEDULER_NO_TASK; 388 aging_task = NULL;
389 values_to_update = 0; 389 values_to_update = 0;
390 cur_client = NULL; 390 cur_client = NULL;
391 391
@@ -542,7 +542,7 @@ GAS_normalization_normalize_preference (void *client,
542 run_preference_update (c_cur, p_cur, kind, score_abs); 542 run_preference_update (c_cur, p_cur, kind, score_abs);
543 543
544 /* Start aging task */ 544 /* Start aging task */
545 if (GNUNET_SCHEDULER_NO_TASK == aging_task) 545 if (NULL == aging_task)
546 aging_task = GNUNET_SCHEDULER_add_delayed (PREF_AGING_INTERVAL, 546 aging_task = GNUNET_SCHEDULER_add_delayed (PREF_AGING_INTERVAL,
547 &preference_aging, NULL ); 547 &preference_aging, NULL );
548 548
@@ -959,7 +959,7 @@ GAS_normalization_start (GAS_Normalization_preference_changed_cb pref_ch_cb,
959 959
960 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++) 960 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++)
961 defvalues.f_rel[i] = DEFAULT_REL_PREFERENCE; 961 defvalues.f_rel[i] = DEFAULT_REL_PREFERENCE;
962 aging_task = GNUNET_SCHEDULER_NO_TASK; 962 aging_task = NULL;
963 return; 963 return;
964} 964}
965 965
@@ -992,10 +992,10 @@ GAS_normalization_stop ()
992 struct PreferenceClient *pc; 992 struct PreferenceClient *pc;
993 struct PreferenceClient *next_pc; 993 struct PreferenceClient *next_pc;
994 994
995 if (GNUNET_SCHEDULER_NO_TASK != aging_task) 995 if (NULL != aging_task)
996 { 996 {
997 GNUNET_SCHEDULER_cancel (aging_task); 997 GNUNET_SCHEDULER_cancel (aging_task);
998 aging_task = GNUNET_SCHEDULER_NO_TASK; 998 aging_task = NULL;
999 } 999 }
1000 1000
1001 next_pc = pc_head; 1001 next_pc = pc_head;
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c
index 4feb0fd9a..c87876ea1 100644
--- a/src/ats/plugin_ats_ril.c
+++ b/src/ats/plugin_ats_ril.c
@@ -412,7 +412,7 @@ struct GAS_RIL_Handle
412 /** 412 /**
413 * Task identifier of the next time-step to be executed 413 * Task identifier of the next time-step to be executed
414 */ 414 */
415 GNUNET_SCHEDULER_TaskIdentifier step_next_task_id; 415 struct GNUNET_SCHEDULER_Task * step_next_task_id;
416 416
417 /** 417 /**
418 * Variable discount factor, dependent on time between steps 418 * Variable discount factor, dependent on time between steps
@@ -1546,7 +1546,7 @@ ril_step_scheduler_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *t
1546{ 1546{
1547 struct GAS_RIL_Handle *solver = cls; 1547 struct GAS_RIL_Handle *solver = cls;
1548 1548
1549 solver->step_next_task_id = GNUNET_SCHEDULER_NO_TASK; 1549 solver->step_next_task_id = NULL;
1550 ril_step (solver); 1550 ril_step (solver);
1551} 1551}
1552 1552
@@ -1875,7 +1875,7 @@ ril_step_schedule_next (struct GAS_RIL_Handle *solver)
1875 time_next = GNUNET_TIME_UNIT_ZERO; 1875 time_next = GNUNET_TIME_UNIT_ZERO;
1876 } 1876 }
1877 1877
1878 if ((GNUNET_SCHEDULER_NO_TASK == solver->step_next_task_id) && (GNUNET_NO == solver->done)) 1878 if ((NULL == solver->step_next_task_id) && (GNUNET_NO == solver->done))
1879 { 1879 {
1880 solver->step_next_task_id = GNUNET_SCHEDULER_add_delayed (time_next, &ril_step_scheduler_task, 1880 solver->step_next_task_id = GNUNET_SCHEDULER_add_delayed (time_next, &ril_step_scheduler_task,
1881 solver); 1881 solver);
@@ -2939,7 +2939,7 @@ libgnunet_plugin_ats_ril_done (void *cls)
2939 cur_agent = next_agent; 2939 cur_agent = next_agent;
2940 } 2940 }
2941 2941
2942 if (GNUNET_SCHEDULER_NO_TASK != s->step_next_task_id) 2942 if (NULL != s->step_next_task_id)
2943 { 2943 {
2944 GNUNET_SCHEDULER_cancel (s->step_next_task_id); 2944 GNUNET_SCHEDULER_cancel (s->step_next_task_id);
2945 } 2945 }
diff --git a/src/ats/test_ats_api_bandwidth_consumption.c b/src/ats/test_ats_api_bandwidth_consumption.c
index b05a7cf22..9ab0de7a9 100644
--- a/src/ats/test_ats_api_bandwidth_consumption.c
+++ b/src/ats/test_ats_api_bandwidth_consumption.c
@@ -31,9 +31,9 @@
31 31
32#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 32#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
33 33
34static GNUNET_SCHEDULER_TaskIdentifier die_task; 34static struct GNUNET_SCHEDULER_Task * die_task;
35 35
36static GNUNET_SCHEDULER_TaskIdentifier consume_task; 36static struct GNUNET_SCHEDULER_Task * consume_task;
37 37
38static struct GNUNET_ATS_SchedulingHandle *ats; 38static struct GNUNET_ATS_SchedulingHandle *ats;
39 39
@@ -77,11 +77,11 @@ struct PeerContext
77static void 77static void
78end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 78end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
79{ 79{
80 die_task = GNUNET_SCHEDULER_NO_TASK; 80 die_task = NULL;
81 if (consume_task != GNUNET_SCHEDULER_NO_TASK) 81 if (consume_task != NULL)
82 { 82 {
83 GNUNET_SCHEDULER_cancel (consume_task); 83 GNUNET_SCHEDULER_cancel (consume_task);
84 consume_task = GNUNET_SCHEDULER_NO_TASK; 84 consume_task = NULL;
85 } 85 }
86 if (sh != NULL) 86 if (sh != NULL)
87 GNUNET_ATS_reserve_bandwidth_cancel (sh); 87 GNUNET_ATS_reserve_bandwidth_cancel (sh);
@@ -98,15 +98,15 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
98static void 98static void
99end () 99end ()
100{ 100{
101 if (die_task != GNUNET_SCHEDULER_NO_TASK) 101 if (die_task != NULL)
102 { 102 {
103 GNUNET_SCHEDULER_cancel (die_task); 103 GNUNET_SCHEDULER_cancel (die_task);
104 die_task = GNUNET_SCHEDULER_NO_TASK; 104 die_task = NULL;
105 } 105 }
106 if (consume_task != GNUNET_SCHEDULER_NO_TASK) 106 if (consume_task != NULL)
107 { 107 {
108 GNUNET_SCHEDULER_cancel (consume_task); 108 GNUNET_SCHEDULER_cancel (consume_task);
109 consume_task = GNUNET_SCHEDULER_NO_TASK; 109 consume_task = NULL;
110 } 110 }
111 GNUNET_ATS_scheduling_done (ats); 111 GNUNET_ATS_scheduling_done (ats);
112 GNUNET_ATS_performance_done (atp); 112 GNUNET_ATS_performance_done (atp);
@@ -142,7 +142,7 @@ reservation_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
142static void 142static void
143consume_bandwidth (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 143consume_bandwidth (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
144{ 144{
145 consume_task = GNUNET_SCHEDULER_NO_TASK; 145 consume_task = NULL;
146 int32_t to_reserve = 500; 146 int32_t to_reserve = 500;
147 147
148 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 148 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/ats/test_ats_api_performance_list_all_addresses.c b/src/ats/test_ats_api_performance_list_all_addresses.c
index e846d0d43..253598d49 100644
--- a/src/ats/test_ats_api_performance_list_all_addresses.c
+++ b/src/ats/test_ats_api_performance_list_all_addresses.c
@@ -30,7 +30,7 @@
30 30
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
32 32
33static GNUNET_SCHEDULER_TaskIdentifier die_task; 33static struct GNUNET_SCHEDULER_Task * die_task;
34 34
35/** 35/**
36 * Statistics handle 36 * Statistics handle
@@ -165,7 +165,7 @@ address_suggest_cb (void *cls,
165static void 165static void
166end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 166end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
167{ 167{
168 die_task = GNUNET_SCHEDULER_NO_TASK; 168 die_task = NULL;
169 end ( NULL, NULL); 169 end ( NULL, NULL);
170 ret = GNUNET_SYSERR; 170 ret = GNUNET_SYSERR;
171} 171}
@@ -174,10 +174,10 @@ static void
174end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 174end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
175{ 175{
176 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 176 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
177 if (die_task != GNUNET_SCHEDULER_NO_TASK ) 177 if (die_task != NULL )
178 { 178 {
179 GNUNET_SCHEDULER_cancel (die_task); 179 GNUNET_SCHEDULER_cancel (die_task);
180 die_task = GNUNET_SCHEDULER_NO_TASK; 180 die_task = NULL;
181 } 181 }
182 182
183 if (NULL != sched_ats) 183 if (NULL != sched_ats)
diff --git a/src/ats/test_ats_api_performance_list_all_addresses_active.c b/src/ats/test_ats_api_performance_list_all_addresses_active.c
index 5cc4d4c65..8385203c5 100644
--- a/src/ats/test_ats_api_performance_list_all_addresses_active.c
+++ b/src/ats/test_ats_api_performance_list_all_addresses_active.c
@@ -30,7 +30,7 @@
30 30
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
32 32
33static GNUNET_SCHEDULER_TaskIdentifier die_task; 33static struct GNUNET_SCHEDULER_Task * die_task;
34 34
35/** 35/**
36 * Statistics handle 36 * Statistics handle
@@ -172,7 +172,7 @@ address_suggest_cb (void *cls,
172static void 172static void
173end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 173end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
174{ 174{
175 die_task = GNUNET_SCHEDULER_NO_TASK; 175 die_task = NULL;
176 end ( NULL, NULL); 176 end ( NULL, NULL);
177 ret = GNUNET_SYSERR; 177 ret = GNUNET_SYSERR;
178} 178}
@@ -181,10 +181,10 @@ static void
181end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 181end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
182{ 182{
183 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 183 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
184 if (die_task != GNUNET_SCHEDULER_NO_TASK ) 184 if (die_task != NULL )
185 { 185 {
186 GNUNET_SCHEDULER_cancel (die_task); 186 GNUNET_SCHEDULER_cancel (die_task);
187 die_task = GNUNET_SCHEDULER_NO_TASK; 187 die_task = NULL;
188 } 188 }
189 189
190 if (NULL != sched_ats) 190 if (NULL != sched_ats)
diff --git a/src/ats/test_ats_api_performance_list_peer_addresses.c b/src/ats/test_ats_api_performance_list_peer_addresses.c
index f19727b2d..3eb5b8e50 100644
--- a/src/ats/test_ats_api_performance_list_peer_addresses.c
+++ b/src/ats/test_ats_api_performance_list_peer_addresses.c
@@ -30,7 +30,7 @@
30 30
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
32 32
33static GNUNET_SCHEDULER_TaskIdentifier die_task; 33static struct GNUNET_SCHEDULER_Task * die_task;
34 34
35/** 35/**
36 * Statistics handle 36 * Statistics handle
@@ -176,10 +176,10 @@ end (void *cls,
176{ 176{
177 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 177 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
178 "Shutting down\n"); 178 "Shutting down\n");
179 if (die_task != GNUNET_SCHEDULER_NO_TASK ) 179 if (die_task != NULL )
180 { 180 {
181 GNUNET_SCHEDULER_cancel (die_task); 181 GNUNET_SCHEDULER_cancel (die_task);
182 die_task = GNUNET_SCHEDULER_NO_TASK; 182 die_task = NULL;
183 } 183 }
184 if (NULL != sched_ats) 184 if (NULL != sched_ats)
185 { 185 {
@@ -216,7 +216,7 @@ static void
216end_badly (void *cls, 216end_badly (void *cls,
217 const struct GNUNET_SCHEDULER_TaskContext *tc) 217 const struct GNUNET_SCHEDULER_TaskContext *tc)
218{ 218{
219 die_task = GNUNET_SCHEDULER_NO_TASK; 219 die_task = NULL;
220 end (NULL, NULL); 220 end (NULL, NULL);
221 ret = GNUNET_SYSERR; 221 ret = GNUNET_SYSERR;
222} 222}
diff --git a/src/ats/test_ats_api_performance_monitor.c b/src/ats/test_ats_api_performance_monitor.c
index 4b6b08b74..0c17ded87 100644
--- a/src/ats/test_ats_api_performance_monitor.c
+++ b/src/ats/test_ats_api_performance_monitor.c
@@ -31,7 +31,7 @@
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
32#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) 32#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
33 33
34static GNUNET_SCHEDULER_TaskIdentifier die_task; 34static struct GNUNET_SCHEDULER_Task * die_task;
35 35
36/** 36/**
37 * Statistics handle 37 * Statistics handle
@@ -167,7 +167,7 @@ address_suggest_cb (void *cls,
167static void 167static void
168end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 168end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
169{ 169{
170 die_task = GNUNET_SCHEDULER_NO_TASK; 170 die_task = NULL;
171 end ( NULL, NULL); 171 end ( NULL, NULL);
172 ret = GNUNET_SYSERR; 172 ret = GNUNET_SYSERR;
173} 173}
@@ -176,10 +176,10 @@ static void
176end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 176end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
177{ 177{
178 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 178 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
179 if (die_task != GNUNET_SCHEDULER_NO_TASK ) 179 if (die_task != NULL )
180 { 180 {
181 GNUNET_SCHEDULER_cancel (die_task); 181 GNUNET_SCHEDULER_cancel (die_task);
182 die_task = GNUNET_SCHEDULER_NO_TASK; 182 die_task = NULL;
183 } 183 }
184 184
185 if (NULL != sched_ats) 185 if (NULL != sched_ats)
diff --git a/src/ats/test_ats_api_performance_monitor_initial_callback.c b/src/ats/test_ats_api_performance_monitor_initial_callback.c
index 377686673..42d2951f7 100644
--- a/src/ats/test_ats_api_performance_monitor_initial_callback.c
+++ b/src/ats/test_ats_api_performance_monitor_initial_callback.c
@@ -31,7 +31,7 @@
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
32#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) 32#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
33 33
34static GNUNET_SCHEDULER_TaskIdentifier die_task; 34static struct GNUNET_SCHEDULER_Task * die_task;
35 35
36/** 36/**
37 * Statistics handle 37 * Statistics handle
@@ -174,7 +174,7 @@ address_suggest_cb (void *cls,
174static void 174static void
175end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 175end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
176{ 176{
177 die_task = GNUNET_SCHEDULER_NO_TASK; 177 die_task = NULL;
178 end ( NULL, NULL); 178 end ( NULL, NULL);
179 ret = GNUNET_SYSERR; 179 ret = GNUNET_SYSERR;
180} 180}
@@ -183,10 +183,10 @@ static void
183end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 183end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
184{ 184{
185 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 185 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
186 if (die_task != GNUNET_SCHEDULER_NO_TASK ) 186 if (die_task != NULL )
187 { 187 {
188 GNUNET_SCHEDULER_cancel (die_task); 188 GNUNET_SCHEDULER_cancel (die_task);
189 die_task = GNUNET_SCHEDULER_NO_TASK; 189 die_task = NULL;
190 } 190 }
191 191
192 if (NULL != sched_ats) 192 if (NULL != sched_ats)
diff --git a/src/ats/test_ats_api_scheduling_add_address.c b/src/ats/test_ats_api_scheduling_add_address.c
index 332e46d19..92bd049f4 100644
--- a/src/ats/test_ats_api_scheduling_add_address.c
+++ b/src/ats/test_ats_api_scheduling_add_address.c
@@ -32,7 +32,7 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37/** 37/**
38 * Statistics handle 38 * Statistics handle
@@ -103,10 +103,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
103{ 103{
104 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 104 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
105 105
106 if (die_task != GNUNET_SCHEDULER_NO_TASK) 106 if (die_task != NULL)
107 { 107 {
108 GNUNET_SCHEDULER_cancel (die_task); 108 GNUNET_SCHEDULER_cancel (die_task);
109 die_task = GNUNET_SCHEDULER_NO_TASK; 109 die_task = NULL;
110 } 110 }
111 111
112 if (NULL != sched_ats) 112 if (NULL != sched_ats)
@@ -130,7 +130,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
130static void 130static void
131end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 131end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
132{ 132{
133 die_task = GNUNET_SCHEDULER_NO_TASK; 133 die_task = NULL;
134 end ( NULL, NULL); 134 end ( NULL, NULL);
135 ret = GNUNET_SYSERR; 135 ret = GNUNET_SYSERR;
136} 136}
diff --git a/src/ats/test_ats_api_scheduling_add_address_duplicate.c b/src/ats/test_ats_api_scheduling_add_address_duplicate.c
index f2c2b4fd6..6130c0f7e 100644
--- a/src/ats/test_ats_api_scheduling_add_address_duplicate.c
+++ b/src/ats/test_ats_api_scheduling_add_address_duplicate.c
@@ -32,9 +32,9 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37static GNUNET_SCHEDULER_TaskIdentifier wait_task; 37static struct GNUNET_SCHEDULER_Task * wait_task;
38 38
39/** 39/**
40 * Statistics handle 40 * Statistics handle
@@ -95,13 +95,13 @@ stat_cb(void *cls, const char *subsystem,
95 subsystem,name, value); 95 subsystem,name, value);
96 if (1 < value) 96 if (1 < value)
97 { 97 {
98 if (GNUNET_SCHEDULER_NO_TASK != wait_task) 98 if (NULL != wait_task)
99 GNUNET_SCHEDULER_cancel (wait_task); 99 GNUNET_SCHEDULER_cancel (wait_task);
100 GNUNET_SCHEDULER_add_now (&end_badly, NULL); 100 GNUNET_SCHEDULER_add_now (&end_badly, NULL);
101 } 101 }
102 if (1 == value) 102 if (1 == value)
103 { 103 {
104 if (GNUNET_SCHEDULER_NO_TASK == wait_task) 104 if (NULL == wait_task)
105 wait_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &end, NULL); 105 wait_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &end, NULL);
106 } 106 }
107 return GNUNET_OK; 107 return GNUNET_OK;
@@ -112,12 +112,12 @@ static void
112end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 112end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
113{ 113{
114 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 114 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
115 wait_task = GNUNET_SCHEDULER_NO_TASK; 115 wait_task = NULL;
116 116
117 if (die_task != GNUNET_SCHEDULER_NO_TASK) 117 if (die_task != NULL)
118 { 118 {
119 GNUNET_SCHEDULER_cancel (die_task); 119 GNUNET_SCHEDULER_cancel (die_task);
120 die_task = GNUNET_SCHEDULER_NO_TASK; 120 die_task = NULL;
121 } 121 }
122 122
123 if (NULL != sched_ats) 123 if (NULL != sched_ats)
@@ -141,7 +141,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
141static void 141static void
142end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 142end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
143{ 143{
144 die_task = GNUNET_SCHEDULER_NO_TASK; 144 die_task = NULL;
145 end ( NULL, NULL); 145 end ( NULL, NULL);
146 ret = GNUNET_SYSERR; 146 ret = GNUNET_SYSERR;
147} 147}
diff --git a/src/ats/test_ats_api_scheduling_add_address_inbound.c b/src/ats/test_ats_api_scheduling_add_address_inbound.c
index fb4ddd2da..2c3ab9c02 100644
--- a/src/ats/test_ats_api_scheduling_add_address_inbound.c
+++ b/src/ats/test_ats_api_scheduling_add_address_inbound.c
@@ -32,7 +32,7 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37/** 37/**
38 * Statistics handle 38 * Statistics handle
@@ -109,10 +109,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
109{ 109{
110 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 110 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
111 111
112 if (die_task != GNUNET_SCHEDULER_NO_TASK) 112 if (die_task != NULL)
113 { 113 {
114 GNUNET_SCHEDULER_cancel (die_task); 114 GNUNET_SCHEDULER_cancel (die_task);
115 die_task = GNUNET_SCHEDULER_NO_TASK; 115 die_task = NULL;
116 } 116 }
117 117
118 if (NULL != sched_ats) 118 if (NULL != sched_ats)
@@ -136,7 +136,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
136static void 136static void
137end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 137end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
138{ 138{
139 die_task = GNUNET_SCHEDULER_NO_TASK; 139 die_task = NULL;
140 end ( NULL, NULL); 140 end ( NULL, NULL);
141 ret = GNUNET_SYSERR; 141 ret = GNUNET_SYSERR;
142} 142}
diff --git a/src/ats/test_ats_api_scheduling_add_session.c b/src/ats/test_ats_api_scheduling_add_session.c
index 9d7fd99d1..243ecd22e 100644
--- a/src/ats/test_ats_api_scheduling_add_session.c
+++ b/src/ats/test_ats_api_scheduling_add_session.c
@@ -32,7 +32,7 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37/** 37/**
38 * Statistics handle 38 * Statistics handle
@@ -116,10 +116,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
116{ 116{
117 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 117 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
118 118
119 if (die_task != GNUNET_SCHEDULER_NO_TASK) 119 if (die_task != NULL)
120 { 120 {
121 GNUNET_SCHEDULER_cancel (die_task); 121 GNUNET_SCHEDULER_cancel (die_task);
122 die_task = GNUNET_SCHEDULER_NO_TASK; 122 die_task = NULL;
123 } 123 }
124 124
125 if (NULL != sched_ats) 125 if (NULL != sched_ats)
@@ -143,7 +143,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
143static void 143static void
144end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 144end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
145{ 145{
146 die_task = GNUNET_SCHEDULER_NO_TASK; 146 die_task = NULL;
147 end ( NULL, NULL); 147 end ( NULL, NULL);
148 ret = GNUNET_SYSERR; 148 ret = GNUNET_SYSERR;
149} 149}
diff --git a/src/ats/test_ats_api_scheduling_destroy_address.c b/src/ats/test_ats_api_scheduling_destroy_address.c
index bc1b7bd83..5cc2094c2 100644
--- a/src/ats/test_ats_api_scheduling_destroy_address.c
+++ b/src/ats/test_ats_api_scheduling_destroy_address.c
@@ -33,7 +33,7 @@
33/** 33/**
34 * Timeout task 34 * Timeout task
35 */ 35 */
36static GNUNET_SCHEDULER_TaskIdentifier die_task; 36static struct GNUNET_SCHEDULER_Task * die_task;
37 37
38/** 38/**
39 * Statistics handle 39 * Statistics handle
@@ -114,10 +114,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
114{ 114{
115 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 115 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
116 116
117 if (die_task != GNUNET_SCHEDULER_NO_TASK) 117 if (die_task != NULL)
118 { 118 {
119 GNUNET_SCHEDULER_cancel (die_task); 119 GNUNET_SCHEDULER_cancel (die_task);
120 die_task = GNUNET_SCHEDULER_NO_TASK; 120 die_task = NULL;
121 } 121 }
122 122
123 if (NULL != sched_ats) 123 if (NULL != sched_ats)
@@ -141,7 +141,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
141static void 141static void
142end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 142end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
143{ 143{
144 die_task = GNUNET_SCHEDULER_NO_TASK; 144 die_task = NULL;
145 end ( NULL, NULL); 145 end ( NULL, NULL);
146 ret = GNUNET_SYSERR; 146 ret = GNUNET_SYSERR;
147} 147}
diff --git a/src/ats/test_ats_api_scheduling_destroy_address_twice.c b/src/ats/test_ats_api_scheduling_destroy_address_twice.c
index 9b34effd1..1991199ab 100644
--- a/src/ats/test_ats_api_scheduling_destroy_address_twice.c
+++ b/src/ats/test_ats_api_scheduling_destroy_address_twice.c
@@ -33,7 +33,7 @@
33/** 33/**
34 * Timeout task 34 * Timeout task
35 */ 35 */
36static GNUNET_SCHEDULER_TaskIdentifier die_task; 36static struct GNUNET_SCHEDULER_Task * die_task;
37 37
38/** 38/**
39 * Statistics handle 39 * Statistics handle
@@ -116,10 +116,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
116{ 116{
117 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 117 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
118 118
119 if (die_task != GNUNET_SCHEDULER_NO_TASK) 119 if (die_task != NULL)
120 { 120 {
121 GNUNET_SCHEDULER_cancel (die_task); 121 GNUNET_SCHEDULER_cancel (die_task);
122 die_task = GNUNET_SCHEDULER_NO_TASK; 122 die_task = NULL;
123 } 123 }
124 124
125 if (NULL != sched_ats) 125 if (NULL != sched_ats)
@@ -143,7 +143,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
143static void 143static void
144end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 144end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
145{ 145{
146 die_task = GNUNET_SCHEDULER_NO_TASK; 146 die_task = NULL;
147 end ( NULL, NULL); 147 end ( NULL, NULL);
148 ret = GNUNET_SYSERR; 148 ret = GNUNET_SYSERR;
149} 149}
diff --git a/src/ats/test_ats_api_scheduling_destroy_session.c b/src/ats/test_ats_api_scheduling_destroy_session.c
index ae236ea32..0c6cf156d 100644
--- a/src/ats/test_ats_api_scheduling_destroy_session.c
+++ b/src/ats/test_ats_api_scheduling_destroy_session.c
@@ -36,7 +36,7 @@
36/** 36/**
37 * Timeout task 37 * Timeout task
38 */ 38 */
39static GNUNET_SCHEDULER_TaskIdentifier die_task; 39static struct GNUNET_SCHEDULER_Task * die_task;
40 40
41/** 41/**
42 * Statistics handle 42 * Statistics handle
@@ -120,10 +120,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
120{ 120{
121 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 121 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
122 122
123 if (die_task != GNUNET_SCHEDULER_NO_TASK) 123 if (die_task != NULL)
124 { 124 {
125 GNUNET_SCHEDULER_cancel (die_task); 125 GNUNET_SCHEDULER_cancel (die_task);
126 die_task = GNUNET_SCHEDULER_NO_TASK; 126 die_task = NULL;
127 } 127 }
128 128
129 if (NULL != sched_ats) 129 if (NULL != sched_ats)
@@ -147,7 +147,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
147static void 147static void
148end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 148end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
149{ 149{
150 die_task = GNUNET_SCHEDULER_NO_TASK; 150 die_task = NULL;
151 end ( NULL, NULL); 151 end ( NULL, NULL);
152 ret = GNUNET_SYSERR; 152 ret = GNUNET_SYSERR;
153} 153}
diff --git a/src/ats/test_ats_api_scheduling_init.c b/src/ats/test_ats_api_scheduling_init.c
index a7914d5c6..d6e823a56 100644
--- a/src/ats/test_ats_api_scheduling_init.c
+++ b/src/ats/test_ats_api_scheduling_init.c
@@ -32,7 +32,7 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37/** 37/**
38 * Initial statistics get request handle 38 * Initial statistics get request handle
@@ -86,10 +86,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
86{ 86{
87 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 87 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
88 88
89 if (die_task != GNUNET_SCHEDULER_NO_TASK) 89 if (die_task != NULL)
90 { 90 {
91 GNUNET_SCHEDULER_cancel (die_task); 91 GNUNET_SCHEDULER_cancel (die_task);
92 die_task = GNUNET_SCHEDULER_NO_TASK; 92 die_task = NULL;
93 } 93 }
94 94
95 if (NULL != sched_ats) 95 if (NULL != sched_ats)
@@ -110,7 +110,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
110static void 110static void
111end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 111end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
112{ 112{
113 die_task = GNUNET_SCHEDULER_NO_TASK; 113 die_task = NULL;
114 end ( NULL, NULL); 114 end ( NULL, NULL);
115 ret = GNUNET_SYSERR; 115 ret = GNUNET_SYSERR;
116} 116}
diff --git a/src/ats/test_ats_simplistic_pref_aging.c b/src/ats/test_ats_simplistic_pref_aging.c
index c8485856c..855e22fbf 100644
--- a/src/ats/test_ats_simplistic_pref_aging.c
+++ b/src/ats/test_ats_simplistic_pref_aging.c
@@ -40,7 +40,7 @@
40 40
41#define DEBUG_ATS_INFO GNUNET_NO 41#define DEBUG_ATS_INFO GNUNET_NO
42 42
43static GNUNET_SCHEDULER_TaskIdentifier die_task; 43static struct GNUNET_SCHEDULER_Task * die_task;
44 44
45/** 45/**
46 * Scheduling handle 46 * Scheduling handle
@@ -102,7 +102,7 @@ unsigned long long wan_quota_in;
102static void 102static void
103end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 103end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
104{ 104{
105 die_task = GNUNET_SCHEDULER_NO_TASK; 105 die_task = NULL;
106 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error! Shutting down\n"); 106 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error! Shutting down\n");
107 if (sched_ats != NULL) 107 if (sched_ats != NULL)
108 { 108 {
@@ -123,10 +123,10 @@ static void
123end () 123end ()
124{ 124{
125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n");
126 if (die_task != GNUNET_SCHEDULER_NO_TASK) 126 if (die_task != NULL)
127 { 127 {
128 GNUNET_SCHEDULER_cancel (die_task); 128 GNUNET_SCHEDULER_cancel (die_task);
129 die_task = GNUNET_SCHEDULER_NO_TASK; 129 die_task = NULL;
130 } 130 }
131 131
132 GNUNET_ATS_suggest_address_cancel (sched_ats, &p[0].id); 132 GNUNET_ATS_suggest_address_cancel (sched_ats, &p[0].id);
diff --git a/src/ats/test_ats_solver_add_address.c b/src/ats/test_ats_solver_add_address.c
index 0c62d5197..37c37cc84 100644
--- a/src/ats/test_ats_solver_add_address.c
+++ b/src/ats/test_ats_solver_add_address.c
@@ -32,7 +32,7 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37/** 37/**
38 * Statistics handle 38 * Statistics handle
@@ -89,10 +89,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
89{ 89{
90 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); 90 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
91 91
92 if (die_task != GNUNET_SCHEDULER_NO_TASK) 92 if (die_task != NULL)
93 { 93 {
94 GNUNET_SCHEDULER_cancel (die_task); 94 GNUNET_SCHEDULER_cancel (die_task);
95 die_task = GNUNET_SCHEDULER_NO_TASK; 95 die_task = NULL;
96 } 96 }
97 97
98 if (NULL != sched_ats) 98 if (NULL != sched_ats)
@@ -117,7 +117,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
117static void 117static void
118end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 118end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
119{ 119{
120 die_task = GNUNET_SCHEDULER_NO_TASK; 120 die_task = NULL;
121 end ( NULL, NULL); 121 end ( NULL, NULL);
122 ret = GNUNET_SYSERR; 122 ret = GNUNET_SYSERR;
123} 123}
diff --git a/src/ats/test_ats_solver_add_address_and_request.c b/src/ats/test_ats_solver_add_address_and_request.c
index 55a7469e7..1f07f46af 100644
--- a/src/ats/test_ats_solver_add_address_and_request.c
+++ b/src/ats/test_ats_solver_add_address_and_request.c
@@ -38,7 +38,7 @@
38/** 38/**
39 * Timeout task 39 * Timeout task
40 */ 40 */
41static GNUNET_SCHEDULER_TaskIdentifier die_task; 41static struct GNUNET_SCHEDULER_Task * die_task;
42 42
43/** 43/**
44 * Statistics handle 44 * Statistics handle
@@ -94,10 +94,10 @@ static void
94end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 94end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
95{ 95{
96 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); 96 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
97 if (die_task != GNUNET_SCHEDULER_NO_TASK) 97 if (die_task != NULL)
98 { 98 {
99 GNUNET_SCHEDULER_cancel (die_task); 99 GNUNET_SCHEDULER_cancel (die_task);
100 die_task = GNUNET_SCHEDULER_NO_TASK; 100 die_task = NULL;
101 } 101 }
102 102
103 if (NULL != sched_ats) 103 if (NULL != sched_ats)
@@ -122,7 +122,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
122static void 122static void
123end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 123end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
124{ 124{
125 die_task = GNUNET_SCHEDULER_NO_TASK; 125 die_task = NULL;
126 end ( NULL, NULL); 126 end ( NULL, NULL);
127 ret = GNUNET_SYSERR; 127 ret = GNUNET_SYSERR;
128} 128}
diff --git a/src/ats/test_ats_solver_alternative_after_delete_address.c b/src/ats/test_ats_solver_alternative_after_delete_address.c
index 27f34217e..1f713801f 100644
--- a/src/ats/test_ats_solver_alternative_after_delete_address.c
+++ b/src/ats/test_ats_solver_alternative_after_delete_address.c
@@ -32,7 +32,7 @@
32/** 32/**
33 * Timeout task 33 * Timeout task
34 */ 34 */
35static GNUNET_SCHEDULER_TaskIdentifier die_task; 35static struct GNUNET_SCHEDULER_Task * die_task;
36 36
37/** 37/**
38 * Statistics handle 38 * Statistics handle
@@ -114,10 +114,10 @@ stat_cb(void *cls, const char *subsystem, const char *name, uint64_t value,
114static void 114static void
115end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 115end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
116{ 116{
117 if (die_task != GNUNET_SCHEDULER_NO_TASK) 117 if (die_task != NULL)
118 { 118 {
119 GNUNET_SCHEDULER_cancel (die_task); 119 GNUNET_SCHEDULER_cancel (die_task);
120 die_task = GNUNET_SCHEDULER_NO_TASK; 120 die_task = NULL;
121 } 121 }
122 122
123 if (NULL != sched_ats) 123 if (NULL != sched_ats)
@@ -144,7 +144,7 @@ static void
144end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 144end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
145{ 145{
146 146
147 die_task = GNUNET_SCHEDULER_NO_TASK; 147 die_task = NULL;
148 end ( NULL, NULL); 148 end ( NULL, NULL);
149 ret = GNUNET_SYSERR; 149 ret = GNUNET_SYSERR;
150} 150}
@@ -152,10 +152,10 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
152static void 152static void
153end_badly_now () 153end_badly_now ()
154{ 154{
155 if (GNUNET_SCHEDULER_NO_TASK != die_task) 155 if (NULL != die_task)
156 { 156 {
157 GNUNET_SCHEDULER_cancel (die_task); 157 GNUNET_SCHEDULER_cancel (die_task);
158 die_task = GNUNET_SCHEDULER_NO_TASK; 158 die_task = NULL;
159 } 159 }
160 GNUNET_SCHEDULER_add_now (&end_badly, NULL); 160 GNUNET_SCHEDULER_add_now (&end_badly, NULL);
161} 161}
diff --git a/src/ats/test_ats_solver_convergence.c b/src/ats/test_ats_solver_convergence.c
index b99cab809..aa8704ccf 100644
--- a/src/ats/test_ats_solver_convergence.c
+++ b/src/ats/test_ats_solver_convergence.c
@@ -33,7 +33,7 @@
33/** 33/**
34 * Timeout task 34 * Timeout task
35 */ 35 */
36static GNUNET_SCHEDULER_TaskIdentifier end_task; 36static struct GNUNET_SCHEDULER_Task * end_task;
37 37
38/** 38/**
39 * Statistics handle 39 * Statistics handle
@@ -113,10 +113,10 @@ static void
113end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 113end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
114{ 114{
115 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); 115 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
116 if (end_task == GNUNET_SCHEDULER_NO_TASK) 116 if (end_task == NULL)
117 { 117 {
118 GNUNET_SCHEDULER_cancel (end_task); 118 GNUNET_SCHEDULER_cancel (end_task);
119 end_task = GNUNET_SCHEDULER_NO_TASK; 119 end_task = NULL;
120 } 120 }
121 121
122 if (NULL != sched_ats) 122 if (NULL != sched_ats)
diff --git a/src/ats/test_ats_solver_preferences.c b/src/ats/test_ats_solver_preferences.c
index 4de3d9a5b..946cb5476 100644
--- a/src/ats/test_ats_solver_preferences.c
+++ b/src/ats/test_ats_solver_preferences.c
@@ -38,7 +38,7 @@
38/** 38/**
39 * Timeout task 39 * Timeout task
40 */ 40 */
41static GNUNET_SCHEDULER_TaskIdentifier die_task; 41static struct GNUNET_SCHEDULER_Task * die_task;
42 42
43/** 43/**
44 * Statistics handle 44 * Statistics handle
@@ -99,10 +99,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
99{ 99{
100 GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Done!\n"); 100 GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Done!\n");
101 101
102 if (die_task != GNUNET_SCHEDULER_NO_TASK ) 102 if (die_task != NULL )
103 { 103 {
104 GNUNET_SCHEDULER_cancel (die_task); 104 GNUNET_SCHEDULER_cancel (die_task);
105 die_task = GNUNET_SCHEDULER_NO_TASK; 105 die_task = NULL;
106 } 106 }
107 107
108 if (NULL != sched_ats) 108 if (NULL != sched_ats)
@@ -132,7 +132,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
132static void 132static void
133end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 133end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
134{ 134{
135 die_task = GNUNET_SCHEDULER_NO_TASK; 135 die_task = NULL;
136 end (NULL, NULL ); 136 end (NULL, NULL );
137 ret = GNUNET_SYSERR; 137 ret = GNUNET_SYSERR;
138} 138}
diff --git a/src/ats/test_ats_solver_request_and_add_address.c b/src/ats/test_ats_solver_request_and_add_address.c
index 1eced520d..3c7b8a522 100644
--- a/src/ats/test_ats_solver_request_and_add_address.c
+++ b/src/ats/test_ats_solver_request_and_add_address.c
@@ -38,7 +38,7 @@
38/** 38/**
39 * Timeout task 39 * Timeout task
40 */ 40 */
41static GNUNET_SCHEDULER_TaskIdentifier die_task; 41static struct GNUNET_SCHEDULER_Task * die_task;
42 42
43/** 43/**
44 * Statistics handle 44 * Statistics handle
@@ -94,10 +94,10 @@ static void
94end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 94end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
95{ 95{
96 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); 96 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
97 if (die_task != GNUNET_SCHEDULER_NO_TASK) 97 if (die_task != NULL)
98 { 98 {
99 GNUNET_SCHEDULER_cancel (die_task); 99 GNUNET_SCHEDULER_cancel (die_task);
100 die_task = GNUNET_SCHEDULER_NO_TASK; 100 die_task = NULL;
101 } 101 }
102 102
103 if (NULL != sched_ats) 103 if (NULL != sched_ats)
@@ -122,7 +122,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
122static void 122static void
123end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 123end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
124{ 124{
125 die_task = GNUNET_SCHEDULER_NO_TASK; 125 die_task = NULL;
126 end ( NULL, NULL); 126 end ( NULL, NULL);
127 ret = GNUNET_SYSERR; 127 ret = GNUNET_SYSERR;
128} 128}
diff --git a/src/ats/test_ats_solver_request_and_delete_address.c b/src/ats/test_ats_solver_request_and_delete_address.c
index 05a045e3b..1e4644b2c 100644
--- a/src/ats/test_ats_solver_request_and_delete_address.c
+++ b/src/ats/test_ats_solver_request_and_delete_address.c
@@ -38,7 +38,7 @@
38/** 38/**
39 * Timeout task 39 * Timeout task
40 */ 40 */
41static GNUNET_SCHEDULER_TaskIdentifier die_task; 41static struct GNUNET_SCHEDULER_Task * die_task;
42 42
43/** 43/**
44 * Statistics handle 44 * Statistics handle
@@ -96,10 +96,10 @@ static void
96end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 96end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
97{ 97{
98 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); 98 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
99 if (die_task != GNUNET_SCHEDULER_NO_TASK) 99 if (die_task != NULL)
100 { 100 {
101 GNUNET_SCHEDULER_cancel (die_task); 101 GNUNET_SCHEDULER_cancel (die_task);
102 die_task = GNUNET_SCHEDULER_NO_TASK; 102 die_task = NULL;
103 } 103 }
104 104
105 if (NULL != sched_ats) 105 if (NULL != sched_ats)
@@ -124,7 +124,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
124static void 124static void
125end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 125end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
126{ 126{
127 die_task = GNUNET_SCHEDULER_NO_TASK; 127 die_task = NULL;
128 128
129 end ( NULL, NULL); 129 end ( NULL, NULL);
130 ret = GNUNET_SYSERR; 130 ret = GNUNET_SYSERR;