[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: Fix index/delta com
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: Fix index/delta comparison. |
Date: |
Tue, 28 Feb 2017 18:16:10 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new a113934 Fix index/delta comparison.
a113934 is described below
commit a11393401265ba6a907b0d458507c1c6e83a4017
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Feb 28 18:16:14 2017 +0100
Fix index/delta comparison.
---
src/backend/taler-merchant-httpd_history.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_history.c
b/src/backend/taler-merchant-httpd_history.c
index 9361c23..2ed9c8c 100644
--- a/src/backend/taler-merchant-httpd_history.c
+++ b/src/backend/taler-merchant-httpd_history.c
@@ -68,7 +68,7 @@ pd_cb (void *cls,
GNUNET_assert (NULL != (amount = json_copy (json_object_get (proposal_data,
"amount"))));
GNUNET_assert (NULL != (timestamp = json_object_get (proposal_data,
"timestamp")));
- if (current >= start && current <= start + delta)
+ if (current >= start && current < start + delta)
{
GNUNET_break (NULL != (entry = json_pack ("{s:s, s:o, s:s}",
"order_id", order_id,
@@ -120,15 +120,17 @@ MH_handler_history (struct TMH_RequestHandler *rh,
if (1 != sscanf (str, "%llu", &seconds))
return TMH_RESPONSE_reply_arg_invalid (connection,
TALER_EC_PARAMETER_MALFORMED,
- "date");
- date.abs_value_us = seconds * 1000LL * 1000LL;
- if (date.abs_value_us / 1000LL / 1000LL != seconds)
- return TMH_RESPONSE_reply_bad_request (connection,
-
TALER_EC_HISTORY_TIMESTAMP_OVERFLOW,
- "Timestamp overflowed");
-
+ "date");
}
+ date.abs_value_us = seconds * 1000LL * 1000LL;
+ if (date.abs_value_us / 1000LL / 1000LL != seconds)
+ return TMH_RESPONSE_reply_bad_request (connection,
+ TALER_EC_HISTORY_TIMESTAMP_OVERFLOW,
+ "Timestamp overflowed");
+
+
+
mi = TMH_lookup_instance ("default");
str = MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: Fix index/delta comparison.,
gnunet <=