summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-aggregator.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-11-30 17:17:37 +0100
committerChristian Grothoff <christian@grothoff.org>2017-11-30 17:17:37 +0100
commit5540747ca2e5f37f2df504d689b850d1078fcdc5 (patch)
tree0e8be904bdedfe74a7cf78e1c27f7edc614c6301 /src/exchange/taler-exchange-aggregator.c
parent78b77ee8d515c80ac85ca7af59e3e82c2baaeb68 (diff)
downloadexchange-5540747ca2e5f37f2df504d689b850d1078fcdc5.tar.gz
exchange-5540747ca2e5f37f2df504d689b850d1078fcdc5.tar.bz2
exchange-5540747ca2e5f37f2df504d689b850d1078fcdc5.zip
patch to address #5183: always round time before giving it to DB, tolerate DB answering without rounded time
Diffstat (limited to 'src/exchange/taler-exchange-aggregator.c')
-rw-r--r--src/exchange/taler-exchange-aggregator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 84aef1a8..788e817f 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -1102,6 +1102,7 @@ run_reserve_closures (void *cls)
enum GNUNET_DB_QueryStatus qs;
const struct GNUNET_SCHEDULER_TaskContext *tc;
struct ExpiredReserveContext erc;
+ struct GNUNET_TIME_Absolute now;
task = NULL;
reserves_idle = GNUNET_NO;
@@ -1130,9 +1131,11 @@ run_reserve_closures (void *cls)
}
erc.session = session;
erc.async_cont = GNUNET_NO;
+ now = GNUNET_TIME_absolute_get ();
+ (void) GNUNET_TIME_round_abs (&now);
qs = db_plugin->get_expired_reserves (db_plugin->cls,
session,
- GNUNET_TIME_absolute_get (),
+ now,
&expired_reserve_cb,
&erc);
switch (qs)