[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 210/277: fix #5957
From: |
gnunet |
Subject: |
[taler-merchant] 210/277: fix #5957 |
Date: |
Sun, 05 Jul 2020 20:52:03 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit e39aa8b4e8df86273a3f5f823a4cba3c844c51cb
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Jun 13 18:45:50 2020 +0200
fix #5957
---
.../taler-merchant-httpd_private-get-transfers.c | 2 +-
.../taler-merchant-httpd_private-post-orders.c | 28 +++++++++++++++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-get-transfers.c
b/src/backend/taler-merchant-httpd_private-get-transfers.c
index c2f1210..f98b785 100644
--- a/src/backend/taler-merchant-httpd_private-get-transfers.c
+++ b/src/backend/taler-merchant-httpd_private-get-transfers.c
@@ -93,7 +93,7 @@ TMH_private_get_transfers (const struct TMH_RequestHandler
*rh,
const char *payto_uri;
struct GNUNET_TIME_Absolute before = GNUNET_TIME_UNIT_FOREVER_ABS;
struct GNUNET_TIME_Absolute after = GNUNET_TIME_UNIT_ZERO_ABS;
- int64_t limit = -20; /* FIXME: default? Nothing documented!!? */
+ int64_t limit = -20;
uint64_t offset;
enum TALER_EXCHANGE_YesNoAll verified;
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c
b/src/backend/taler-merchant-httpd_private-post-orders.c
index 7c6a0c3..e7b04e3 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -542,14 +542,32 @@ patch_order (struct MHD_Connection *connection,
if (NULL == json_object_get (order,
"refund_deadline"))
{
- struct GNUNET_TIME_Absolute zero = { 0 };
+ const char *refdel_s;
+ struct GNUNET_TIME_Absolute rd = { 0 };
- // FIXME: #5957: add way to compute non-zero refund deadline
- // from 'refund delay' specified "somewhere".
+ refdel_s = MHD_lookup_connection_value (connection,
+ MHD_GET_ARGUMENT_KIND,
+ "refund_delay");
+ if (NULL == refdel_s)
+ {
+ struct GNUNET_TIME_Relative r;
+
+ if (GNUNET_OK !=
+ GNUNET_STRINGS_fancy_time_to_relative (refdel_s,
+ &r))
+ {
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_PARAMETER_MALFORMED,
+ "refund_delay");
+
+ }
+ rd = GNUNET_TIME_relative_to_absolute (r);
+ }
GNUNET_assert (0 ==
json_object_set_new (order,
"refund_deadline",
- GNUNET_JSON_from_time_abs (zero)));
+ GNUNET_JSON_from_time_abs (rd)));
}
if (NULL == json_object_get (order,
@@ -909,8 +927,6 @@ merge_inventory (struct MHD_Connection *connection,
inventory_products,
uuids_length,
uuids);
-
-
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] 235/277: Merge branch 'protocolV1' of git+ssh://git.taler.net/merchant into protocolV1, (continued)
- [taler-merchant] 235/277: Merge branch 'protocolV1' of git+ssh://git.taler.net/merchant into protocolV1, gnunet, 2020/07/05
- [taler-merchant] 240/277: Merge branch 'protocolV1' of ssh://git.taler.net/merchant into protocolV1, gnunet, 2020/07/05
- [taler-merchant] 238/277: return active-status of reserves from backenddb (fixes FIXMEs), gnunet, 2020/07/05
- [taler-merchant] 236/277: deeper checks for GET /private/instances/, gnunet, 2020/07/05
- [taler-merchant] 243/277: implement signature verification on pay response, gnunet, 2020/07/05
- [taler-merchant] 209/277: DCE, gnunet, 2020/07/05
- [taler-merchant] 199/277: insert missing functions (unimplemented), gnunet, 2020/07/05
- [taler-merchant] 202/277: work on missing functions, gnunet, 2020/07/05
- [taler-merchant] 206/277: more backenddb tests, gnunet, 2020/07/05
- [taler-merchant] 207/277: test DELETE /private/reserves/, gnunet, 2020/07/05
- [taler-merchant] 210/277: fix #5957,
gnunet <=
- [taler-merchant] 220/277: test for GET /private/reserves, gnunet, 2020/07/05
- [taler-merchant] 222/277: fix/test for POST tips//pickup, gnunet, 2020/07/05
- [taler-merchant] 225/277: stricter tests for query reserve(s) methods, gnunet, 2020/07/05
- [taler-merchant] 228/277: start with reserve processing logic, gnunet, 2020/07/05
- [taler-merchant] 227/277: implement library method for DELETE /orders/ and tests, gnunet, 2020/07/05
- [taler-merchant] 231/277: address 413 fixme, gnunet, 2020/07/05
- [taler-merchant] 237/277: fix type conversion warning and test failure for backenddb, gnunet, 2020/07/05
- [taler-merchant] 239/277: more checks for GET /private/products/, gnunet, 2020/07/05
- [taler-merchant] 242/277: also parse and return timestamp and row_id, gnunet, 2020/07/05
- [taler-merchant] 250/277: got refunds working and tested, gnunet, 2020/07/05