[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: don't confuse GNUnet and MHD err
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: don't confuse GNUnet and MHD error codes |
Date: |
Mon, 25 Apr 2022 23:18:19 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new ceb62f87 don't confuse GNUnet and MHD error codes
ceb62f87 is described below
commit ceb62f87b444d6c57fc34c5c2c4ed4295e499648
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Apr 25 23:18:16 2022 +0200
don't confuse GNUnet and MHD error codes
---
contrib/merchant-backoffice | 2 +-
.../taler-merchant-httpd_post-orders-ID-pay.c | 49 ++++++++++++++--------
2 files changed, 33 insertions(+), 18 deletions(-)
diff --git a/contrib/merchant-backoffice b/contrib/merchant-backoffice
index be3a203c..182cdfff 160000
--- a/contrib/merchant-backoffice
+++ b/contrib/merchant-backoffice
@@ -1 +1 @@
-Subproject commit be3a203c7c888ef3035efeeb996cfd9664335934
+Subproject commit 182cdfffa1d4b6f2bb3543d30cfa7509e73bda03
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index 375f0930..37a37008 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -2084,8 +2084,8 @@ parse_pay (struct MHD_Connection *connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
"duplicate coin in list"))
- ? GNUNET_NO
- : GNUNET_SYSERR;
+ ? GNUNET_NO
+ : GNUNET_SYSERR;
}
}
@@ -2099,10 +2099,12 @@ parse_pay (struct MHD_Connection *connection,
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
- return TALER_MHD_reply_with_error (connection,
+ return (MHD_YES == TALER_MHD_reply_with_error (connection,
MHD_HTTP_CONFLICT,
TALER_EC_GENERIC_CURRENCY_MISMATCH,
- TMH_currency);
+ TMH_currency))
+ ? GNUNET_NO
+ : GNUNET_SYSERR;
}
{
@@ -2114,11 +2116,15 @@ parse_pay (struct MHD_Connection *connection,
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
- return TALER_MHD_reply_with_error (
- connection,
- MHD_HTTP_BAD_REQUEST,
- TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "inconsistency: 'mininum_age_sig' vs. 'age_commitment'");
+ return (MHD_YES ==
+ TALER_MHD_reply_with_error (
+ connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "inconsistency: 'mininum_age_sig' vs. 'age_commitment'")
+ )
+ ? GNUNET_NO
+ : GNUNET_SYSERR;
}
/* Parse the AgeCommitment, i. e. the public keys */
@@ -2134,10 +2140,14 @@ parse_pay (struct MHD_Connection *connection,
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_BAD_REQUEST,
-
TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "'age_commitment' too large");
+ return (MHD_YES ==
+ TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "'age_commitment' too large"
+ ))
+ ? GNUNET_NO
+ : GNUNET_SYSERR;
}
dc->age_commitment = GNUNET_new (struct TALER_AgeCommitment);
@@ -2164,10 +2174,14 @@ parse_pay (struct MHD_Connection *connection,
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_BAD_REQUEST,
-
TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "age_commitment");
+ return (MHD_YES ==
+ TALER_MHD_reply_with_error (
+ connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "age_commitment"))
+ ? GNUNET_NO
+ : GNUNET_SYSERR;
}
}
}
@@ -2443,6 +2457,7 @@ TMH_post_orders_ID_pay (const struct TMH_RequestHandler
*rh,
= GNUNET_SCHEDULER_add_delayed (get_pay_timeout (pc->coins_cnt),
&handle_pay_timeout,
pc);
+ GNUNET_assert (NULL != pc->wm);
execute_pay_transaction (pc);
return MHD_YES;
}
--
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: don't confuse GNUnet and MHD error codes,
gnunet <=