summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_exchanges.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-12-09 19:57:34 +0100
committerChristian Grothoff <christian@grothoff.org>2017-12-09 19:57:34 +0100
commitb5222ad829c41ea9be890113e94ba6a96fcaedbc (patch)
tree95d2876ca6bcf8a2afd5cb20a504bc21d8a33362 /src/backend/taler-merchant-httpd_exchanges.c
parentcea6fc540c1038877b6ea8b14a4014d192aae515 (diff)
downloadmerchant-b5222ad829c41ea9be890113e94ba6a96fcaedbc.tar.gz
merchant-b5222ad829c41ea9be890113e94ba6a96fcaedbc.tar.bz2
merchant-b5222ad829c41ea9be890113e94ba6a96fcaedbc.zip
fix issues related to unrounded times
Diffstat (limited to 'src/backend/taler-merchant-httpd_exchanges.c')
-rw-r--r--src/backend/taler-merchant-httpd_exchanges.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c
index 98331815..44846891 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -789,6 +789,7 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
{
struct Exchange *exchange;
struct TMH_EXCHANGES_FindOperation *fo;
+ struct GNUNET_TIME_Absolute now;
if (NULL == merchant_curl_ctx)
{
@@ -840,11 +841,12 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
GNUNET_CONTAINER_DLL_insert (exchange->fo_head,
exchange->fo_tail,
fo);
-
+ now = GNUNET_TIME_absolute_get ();
+ (void) GNUNET_TIME_round_abs (&now);
if ( (GNUNET_YES != exchange->pending) &&
( (NULL == fo->wire_method) ||
(NULL != get_wire_fees (exchange,
- GNUNET_TIME_absolute_get (),
+ now,
fo->wire_method)) ) )
{
/* We are not currently waiting for a reply, immediately