diff options
Diffstat (limited to 'src/ats/test_ats_api_bandwidth_consumption.c')
-rw-r--r-- | src/ats/test_ats_api_bandwidth_consumption.c | 20 |
1 files changed, 10 insertions, 10 deletions
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 | ||
34 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 34 | static struct GNUNET_SCHEDULER_Task * die_task; |
35 | 35 | ||
36 | static GNUNET_SCHEDULER_TaskIdentifier consume_task; | 36 | static struct GNUNET_SCHEDULER_Task * consume_task; |
37 | 37 | ||
38 | static struct GNUNET_ATS_SchedulingHandle *ats; | 38 | static struct GNUNET_ATS_SchedulingHandle *ats; |
39 | 39 | ||
@@ -77,11 +77,11 @@ struct PeerContext | |||
77 | static void | 77 | static void |
78 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 78 | end_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) | |||
98 | static void | 98 | static void |
99 | end () | 99 | end () |
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, | |||
142 | static void | 142 | static void |
143 | consume_bandwidth (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 143 | consume_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, |