diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-17 22:04:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-17 22:04:31 +0000 |
commit | 8911ee23d9799b1d6f5881695884220ee99e713d (patch) | |
tree | 001a334300b2c8fe1ee51f85f81d644af7443988 /src/core | |
parent | d969abc1fce8c27ff7bcddcd31d440b636c04e9d (diff) | |
download | gnunet-8911ee23d9799b1d6f5881695884220ee99e713d.tar.gz gnunet-8911ee23d9799b1d6f5881695884220ee99e713d.zip |
-trying to fix double-cancel
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/test_core_quota_compliance.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 71b842522..91ba1d621 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -129,7 +129,10 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
129 | p1.nth = NULL; | 129 | p1.nth = NULL; |
130 | } | 130 | } |
131 | if (connect_task != GNUNET_SCHEDULER_NO_TASK) | 131 | if (connect_task != GNUNET_SCHEDULER_NO_TASK) |
132 | { | ||
132 | GNUNET_SCHEDULER_cancel (connect_task); | 133 | GNUNET_SCHEDULER_cancel (connect_task); |
134 | connect_task = GNUNET_SCHEDULER_NO_TASK; | ||
135 | } | ||
133 | ch = p1.ch; | 136 | ch = p1.ch; |
134 | p1.ch = NULL; | 137 | p1.ch = NULL; |
135 | GNUNET_CORE_disconnect (ch); | 138 | GNUNET_CORE_disconnect (ch); |
@@ -161,7 +164,10 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
161 | if (measure_task != GNUNET_SCHEDULER_NO_TASK) | 164 | if (measure_task != GNUNET_SCHEDULER_NO_TASK) |
162 | GNUNET_SCHEDULER_cancel (measure_task); | 165 | GNUNET_SCHEDULER_cancel (measure_task); |
163 | if (connect_task != GNUNET_SCHEDULER_NO_TASK) | 166 | if (connect_task != GNUNET_SCHEDULER_NO_TASK) |
167 | { | ||
164 | GNUNET_SCHEDULER_cancel (connect_task); | 168 | GNUNET_SCHEDULER_cancel (connect_task); |
169 | connect_task = GNUNET_SCHEDULER_NO_TASK; | ||
170 | } | ||
165 | 171 | ||
166 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); | 172 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); |
167 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); | 173 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); |