exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit e577fd43c62a25bafc542f72cfd5bfc6470db0e6
parent 5869968e570218cdf137f743e9dd2ad94b8923e1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 29 Jun 2026 21:55:34 +0200

bugfix: MHD_result vs. GenericReturnValue

Diffstat:
Msrc/exchange/taler-exchange-httpd_common_deposit.c | 31+++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_common_deposit.c b/src/exchange/taler-exchange-httpd_common_deposit.c @@ -153,10 +153,12 @@ TEH_common_purse_deposit_parse_coin ( { GNUNET_break_op (0); GNUNET_JSON_parse_free (spec); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE, - NULL); + return (MHD_YES == + TALER_MHD_reply_with_error (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE, + NULL)) + ? GNUNET_NO : GNUNET_SYSERR; } GNUNET_assert (0 <= TALER_amount_subtract (&coin->amount_minus_fee, @@ -227,10 +229,13 @@ TEH_common_deposit_check_purse_deposit ( if (coin->no_attest != coin->cpi.no_age_commitment) { GNUNET_break_op (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT, - "mismatch of attest and age_commitment"); + return (MHD_YES == + TALER_MHD_reply_with_error (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT, + "mismatch of attest and age_commitment") + ) + ? GNUNET_NO : GNUNET_SYSERR; } if (coin->cpi.no_age_commitment) @@ -243,10 +248,12 @@ TEH_common_deposit_check_purse_deposit ( &coin->attest)) { GNUNET_break_op (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE, - "invalid attest for minimum age"); + return (MHD_YES == + TALER_MHD_reply_with_error (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE, + "invalid attest for minimum age")) + ? GNUNET_NO : GNUNET_SYSERR; } return GNUNET_OK; }