aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tests/ats-testing-log.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-log.c
parent4ed987ed9bd12e201d9146972274933b4479bb0e (diff)
downloadgnunet-247ecc51c01c54313844cb495c1fa829806bc170.tar.gz
gnunet-247ecc51c01c54313844cb495c1fa829806bc170.zip
fix and improved logging
Diffstat (limited to 'src/ats-tests/ats-testing-log.c')
-rw-r--r--src/ats-tests/ats-testing-log.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c
index 29408d1f8..a5c1d0bc0 100644
--- a/src/ats-tests/ats-testing-log.c
+++ b/src/ats-tests/ats-testing-log.c
@@ -668,10 +668,7 @@ collect_log_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
668void 668void
669GNUNET_ATS_TEST_logging_stop (struct LoggingHandle *l) 669GNUNET_ATS_TEST_logging_stop (struct LoggingHandle *l)
670{ 670{
671 int c_m;
672 struct GNUNET_SCHEDULER_TaskContext tc; 671 struct GNUNET_SCHEDULER_TaskContext tc;
673 struct PeerLoggingTimestep *cur;
674
675 if (GNUNET_YES!= l->running) 672 if (GNUNET_YES!= l->running)
676 return; 673 return;
677 674
@@ -680,10 +677,25 @@ GNUNET_ATS_TEST_logging_stop (struct LoggingHandle *l)
680 l->log_task = GNUNET_SCHEDULER_NO_TASK; 677 l->log_task = GNUNET_SCHEDULER_NO_TASK;
681 tc.reason = GNUNET_SCHEDULER_REASON_SHUTDOWN; 678 tc.reason = GNUNET_SCHEDULER_REASON_SHUTDOWN;
682 collect_log_task (l, &tc); 679 collect_log_task (l, &tc);
680 l->running = GNUNET_NO;
683 681
684 GNUNET_log(GNUNET_ERROR_TYPE_INFO, 682 GNUNET_log(GNUNET_ERROR_TYPE_INFO,
685 _("Stop logging\n")); 683 _("Stop logging\n"));
684}
685
686/**
687 * Clean up logging data
688 *
689 * @param l the logging handle
690 */
691void
692GNUNET_ATS_TEST_logging_clean_up (struct LoggingHandle *l)
693{
694 int c_m;
695 struct PeerLoggingTimestep *cur;
686 696
697 if (GNUNET_YES == l->running)
698 GNUNET_ATS_TEST_logging_stop (l);
687 699
688 for (c_m = 0; c_m < l->num_peers; c_m++) 700 for (c_m = 0; c_m < l->num_peers; c_m++)
689 { 701 {