diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-11-30 17:17:37 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-11-30 17:17:37 +0100 |
commit | 5540747ca2e5f37f2df504d689b850d1078fcdc5 (patch) | |
tree | 0e8be904bdedfe74a7cf78e1c27f7edc614c6301 /src/exchange/taler-exchange-aggregator.c | |
parent | 78b77ee8d515c80ac85ca7af59e3e82c2baaeb68 (diff) | |
download | exchange-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 84aef1a89..788e817fd 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) |