diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-12-09 19:57:34 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-12-09 19:57:34 +0100 |
commit | b5222ad829c41ea9be890113e94ba6a96fcaedbc (patch) | |
tree | 95d2876ca6bcf8a2afd5cb20a504bc21d8a33362 /src/backend/taler-merchant-httpd_exchanges.c | |
parent | cea6fc540c1038877b6ea8b14a4014d192aae515 (diff) | |
download | merchant-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.c | 6 |
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 |