aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tests/ats-testing-experiment.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-30 09:32:01 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-30 09:32:01 +0000
commit247ecc51c01c54313844cb495c1fa829806bc170 (patch)
tree72d9f516765361cfae33825e2a2e7057d59b5c0a /src/ats-tests/ats-testing-experiment.c
parent4ed987ed9bd12e201d9146972274933b4479bb0e (diff)
downloadgnunet-247ecc51c01c54313844cb495c1fa829806bc170.tar.gz
gnunet-247ecc51c01c54313844cb495c1fa829806bc170.zip
fix and improved logging
Diffstat (limited to 'src/ats-tests/ats-testing-experiment.c')
-rw-r--r--src/ats-tests/ats-testing-experiment.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c
index 54c7675d7..d55adc2d7 100644
--- a/src/ats-tests/ats-testing-experiment.c
+++ b/src/ats-tests/ats-testing-experiment.c
@@ -259,6 +259,12 @@ timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc)
259 e->experiment_timeout_task = GNUNET_SCHEDULER_NO_TASK; 259 e->experiment_timeout_task = GNUNET_SCHEDULER_NO_TASK;
260 fprintf (stderr, "Experiment timeout!\n"); 260 fprintf (stderr, "Experiment timeout!\n");
261 261
262 if (GNUNET_SCHEDULER_NO_TASK != e->episode_timeout_task)
263 {
264 e->episode_timeout_task = GNUNET_SCHEDULER_NO_TASK;
265 GNUNET_SCHEDULER_cancel (e->episode_timeout_task);
266 }
267
262 e->e_done_cb (e, GNUNET_TIME_absolute_get_duration(e->start_time), 268 e->e_done_cb (e, GNUNET_TIME_absolute_get_duration(e->start_time),
263 GNUNET_SYSERR); 269 GNUNET_SYSERR);
264} 270}
@@ -319,7 +325,8 @@ timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc)
319{ 325{
320 struct Experiment *e = cls; 326 struct Experiment *e = cls;
321 e->episode_timeout_task = GNUNET_SCHEDULER_NO_TASK; 327 e->episode_timeout_task = GNUNET_SCHEDULER_NO_TASK;
322 e->ep_done_cb (e->cur); 328 if (NULL != e->ep_done_cb)
329 e->ep_done_cb (e->cur);
323 330
324 /* Scheduling next */ 331 /* Scheduling next */
325 e->cur = e->cur->next; 332 e->cur = e->cur->next;