summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_pay.c18
-rw-r--r--src/lib/merchant_api_proposal.c4
-rw-r--r--src/lib/test_merchant_api.c6
3 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c
index cf25337e..45fa769c 100644
--- a/src/lib/merchant_api_pay.c
+++ b/src/lib/merchant_api_pay.c
@@ -274,7 +274,7 @@ check_coin_history (const struct TALER_MERCHANT_PaidCoin *pc,
/**
- * We got a 403 response back from the exchange (or the merchant).
+ * We got a 409 response back from the exchange (or the merchant).
* Now we need to check the provided cryptographic proof that the
* coin was actually already spent!
*
@@ -284,8 +284,8 @@ check_coin_history (const struct TALER_MERCHANT_PaidCoin *pc,
* @return #GNUNET_OK if proof checks out
*/
static int
-check_forbidden (struct TALER_MERCHANT_Pay *ph,
- const json_t *json)
+check_conflict (struct TALER_MERCHANT_Pay *ph,
+ const json_t *json)
{
json_t *history;
struct TALER_CoinSpendPublicKeyP coin_pub;
@@ -361,15 +361,15 @@ handle_pay_finished (void *cls,
* or the merchant is buggy (or API version conflict);
* just pass JSON reply to the application */
break;
- case MHD_HTTP_FORBIDDEN:
- if (GNUNET_OK != check_forbidden (ph,
- json))
+ case MHD_HTTP_CONFLICT:
+ if (GNUNET_OK != check_conflict (ph,
+ json))
{
GNUNET_break_op (0);
response_code = 0;
}
break;
- case MHD_HTTP_UNAUTHORIZED:
+ case MHD_HTTP_FORBIDDEN:
/* Nothing really to verify, merchant says one of the
* signatures is invalid; as we checked them, this
* should never happen, we should pass the JSON reply
@@ -426,9 +426,9 @@ handle_pay_finished (void *cls,
merchant is buggy (or API version conflict); just
pass JSON reply to the application */
break;
- case MHD_HTTP_FORBIDDEN:
+ case MHD_HTTP_CONFLICT:
break;
- case MHD_HTTP_UNAUTHORIZED:
+ case MHD_HTTP_FORBIDDEN:
/* Nothing really to verify, merchant says one of
the signatures is invalid; as we checked them,
this should never happen, we should pass the JSON
diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c
index 72a603a3..e63986e1 100644
--- a/src/lib/merchant_api_proposal.c
+++ b/src/lib/merchant_api_proposal.c
@@ -167,9 +167,9 @@ handle_proposal_finished (void *cls,
the merchant is buggy (or API version conflict);
just pass JSON reply to the application */
break;
- case MHD_HTTP_FORBIDDEN:
+ case MHD_HTTP_CONFLICT:
break;
- case MHD_HTTP_UNAUTHORIZED:
+ case MHD_HTTP_FORBIDDEN:
/* Nothing really to verify, merchant says one
of the signatures is invalid; as we checked them,
this should never happen, we should pass the JSON
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 359f20d0..69ed400b 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -370,7 +370,7 @@ run (void *cls,
TALER_TESTING_cmd_pay ("deposit-double-2",
merchant_url,
- MHD_HTTP_FORBIDDEN,
+ MHD_HTTP_CONFLICT,
"create-proposal-2",
"withdraw-coin-1",
"EUR:5",
@@ -889,7 +889,7 @@ run (void *cls,
TALER_TESTING_cmd_pay ("pay-fail-partial-double-10",
merchant_url,
- MHD_HTTP_FORBIDDEN,
+ MHD_HTTP_CONFLICT,
"create-proposal-10",
"withdraw-coin-10a;withdraw-coin-1",
"EUR:5",
@@ -976,7 +976,7 @@ run (void *cls,
"EUR:0.01"),
TALER_TESTING_cmd_pay ("pay-fail-partial-double-11-bad",
merchant_url,
- MHD_HTTP_FORBIDDEN,
+ MHD_HTTP_CONFLICT,
"create-proposal-11",
"withdraw-coin-1",
"EUR:5",