commit fef322cdbeea71f0323cdeff6427d90c91d0bcb4
parent f4f6c3a8affa3b5e92a873d62014657065fe6110
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Wed, 22 Mar 2017 18:50:25 +0100
date parameter = now when /history doesn't get one.
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_history.c b/src/backend/taler-merchant-httpd_history.c
@@ -105,7 +105,8 @@ MH_handler_history (struct TMH_RequestHandler *rh,
MHD_GET_ARGUMENT_KIND,
"date");
- seconds = 0;
+ date = GNUNET_TIME_absolute_get ();
+
if (NULL != str)
{
if (1 != sscanf (str, "%llu", &seconds))
@@ -115,9 +116,9 @@ MH_handler_history (struct TMH_RequestHandler *rh,
TALER_EC_PARAMETER_MALFORMED,
"date");
}
- }
date.abs_value_us = seconds * 1000LL * 1000LL;
+
if (date.abs_value_us / 1000LL / 1000LL != seconds)
{
json_decref (response);
@@ -127,6 +128,8 @@ MH_handler_history (struct TMH_RequestHandler *rh,
}
+ }
+
mi = TMH_lookup_instance ("default");
str = MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND,