aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tests/perf_ats_logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats-tests/perf_ats_logging.c')
-rw-r--r--src/ats-tests/perf_ats_logging.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/ats-tests/perf_ats_logging.c b/src/ats-tests/perf_ats_logging.c
index 1e4b15432..d4c4f2cd9 100644
--- a/src/ats-tests/perf_ats_logging.c
+++ b/src/ats-tests/perf_ats_logging.c
@@ -639,15 +639,8 @@ collect_log_now (void)
639static void 639static void
640collect_log_task (void *cls) 640collect_log_task (void *cls)
641{ 641{
642 const struct GNUNET_SCHEDULER_TaskContext *tc;
643
644 log_task = NULL; 642 log_task = NULL;
645 643 collect_log_now ();
646 collect_log_now();
647 tc = GNUNET_SCHEDULER_get_task_context ();
648 if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN)
649 return;
650
651 log_task = GNUNET_SCHEDULER_add_delayed (frequency, 644 log_task = GNUNET_SCHEDULER_add_delayed (frequency,
652 &collect_log_task, NULL); 645 &collect_log_task, NULL);
653} 646}
@@ -659,12 +652,14 @@ perf_logging_stop ()
659 int c_m; 652 int c_m;
660 struct PeerLoggingTimestep *cur; 653 struct PeerLoggingTimestep *cur;
661 654
662 if (GNUNET_YES!= running) 655 if (GNUNET_YES != running)
663 return; 656 return;
664 657
665 if (NULL != log_task) 658 if (NULL != log_task)
659 {
666 GNUNET_SCHEDULER_cancel (log_task); 660 GNUNET_SCHEDULER_cancel (log_task);
667 log_task = NULL; 661 log_task = NULL;
662 }
668 collect_log_task (NULL); 663 collect_log_task (NULL);
669 664
670 GNUNET_log(GNUNET_ERROR_TYPE_INFO, 665 GNUNET_log(GNUNET_ERROR_TYPE_INFO,