From 9909a04d5bdbe7718dadc022ab27af64e7286e29 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 3 Apr 2016 21:41:26 +0200 Subject: use new PQ_query_param_string function to fix 0-termination bug, also terminate idle aggregator in test mode --- src/exchange/taler-exchange-aggregator.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/exchange') diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index e293a23cd..2d5fd71d8 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -482,10 +482,18 @@ run_aggregation (void *cls, *global_ret = GNUNET_SYSERR; return; } - /* nothing to do, sleep for a minute and try again */ - task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, - &run_aggregation, - global_ret); + if (GNUNET_YES == test_mode) + { + /* in test mode, shutdown if we end up being idle */ + GNUNET_SCHEDULER_shutdown (); + } + else + { + /* nothing to do, sleep for a minute and try again */ + task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, + &run_aggregation, + global_ret); + } return; } /* Now try to find other deposits to aggregate */ -- cgit v1.2.3