[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: try to debug crash in merchant b
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: try to debug crash in merchant backend on GET for refund |
Date: |
Sun, 06 Sep 2020 00:19:38 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new fed87b9 try to debug crash in merchant backend on GET for refund
fed87b9 is described below
commit fed87b96dd9241e76f1a62a512f5a5fe3162aa8b
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Sep 6 00:19:36 2020 +0200
try to debug crash in merchant backend on GET for refund
---
src/backend/taler-merchant-httpd_get-orders-ID.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c
b/src/backend/taler-merchant-httpd_get-orders-ID.c
index f55e403..71265bb 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -231,7 +231,6 @@ make_taler_refund_uri (struct MHD_Connection *con,
"X-Forwarded-Prefix");
if (NULL != forwarded_host)
host = forwarded_host;
-
if (NULL == host)
{
GNUNET_break (0);
@@ -472,8 +471,11 @@ get_order_summary (struct GetOrderData *god)
language_pattern,
"summary"));
if (NULL == ret)
+ {
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"No order summary found!\n");
+ ret = "<bug: no summary>";
+ }
return ret;
}
@@ -533,7 +535,7 @@ send_pay_request (struct GetOrderData *god,
enum GNUNET_GenericReturnValue res;
json_t *context;
- context = json_pack ("{s:s, s:s, s:s, s:s?}",
+ context = json_pack ("{s:s, s:s, s:s, s:s}",
"taler_pay_uri",
taler_pay_uri,
"order_status_url",
@@ -1089,9 +1091,18 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
char *qr;
char *uri;
+ GNUNET_assert (NULL != god->contract_terms);
uri = make_taler_refund_uri (god->sc.con,
order_id,
hc->instance->settings.id);
+ if (NULL == uri)
+ {
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (god->sc.con,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_ALLOCATION_FAILURE,
+ "refund URI");
+ }
qr = TMH_create_qrcode (uri);
if (NULL == qr)
{
@@ -1105,7 +1116,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
{
json_t *context;
- context = json_pack ("{s:s?, s:s, s:s, s:s}"
+ context = json_pack ("{s:s, s:s, s:s, s:s}"
"order_summary",
get_order_summary (god),
"refund_amount",
@@ -1129,7 +1140,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
{
json_t *context;
- context = json_pack ("{s:O, s:s?, s:s}",
+ context = json_pack ("{s:O, s:s, s:s}",
"contract_terms",
god->contract_terms,
"order_summary",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: try to debug crash in merchant backend on GET for refund,
gnunet <=