summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-10-22 00:14:20 +0200
committerChristian Grothoff <christian@grothoff.org>2022-10-22 00:14:20 +0200
commit6e56693071b29c1a06758f839dbba8ed63063d35 (patch)
tree53b383b319144e7122f03e06bff1dbba98b04a5b /src/exchange
parent28969f415eccb7791847e3945b8599140902db8b (diff)
downloadexchange-6e56693071b29c1a06758f839dbba8ed63063d35.tar.gz
exchange-6e56693071b29c1a06758f839dbba8ed63063d35.tar.bz2
exchange-6e56693071b29c1a06758f839dbba8ed63063d35.zip
-add missing asserts, fix logic issue
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-httpd_kyc-proof.c20
-rw-r--r--src/exchange/taler-exchange-httpd_reserves_purse.c5
2 files changed, 13 insertions, 12 deletions
diff --git a/src/exchange/taler-exchange-httpd_kyc-proof.c b/src/exchange/taler-exchange-httpd_kyc-proof.c
index a3de470db..5d89c4203 100644
--- a/src/exchange/taler-exchange-httpd_kyc-proof.c
+++ b/src/exchange/taler-exchange-httpd_kyc-proof.c
@@ -301,21 +301,21 @@ TEH_handler_kyc_proof (
TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_UNKNOWN,
args[1]);
}
- if (0 != strcmp (args[1],
- kpc->provider_section))
- {
- GNUNET_break_op (0);
- return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_BAD_REQUEST,
- TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "PROVIDER_SECTION");
- }
-
if (NULL != kpc->provider_section)
{
enum GNUNET_DB_QueryStatus qs;
struct GNUNET_TIME_Absolute expiration;
+ if (0 != strcmp (args[1],
+ kpc->provider_section))
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "PROVIDER_SECTION");
+ }
+
qs = TEH_plugin->lookup_kyc_process_by_account (
TEH_plugin->cls,
kpc->provider_section,
diff --git a/src/exchange/taler-exchange-httpd_reserves_purse.c b/src/exchange/taler-exchange-httpd_reserves_purse.c
index d6131057b..79625a395 100644
--- a/src/exchange/taler-exchange-httpd_reserves_purse.c
+++ b/src/exchange/taler-exchange-httpd_reserves_purse.c
@@ -613,8 +613,9 @@ TEH_handler_reserves_purse (
if (no_purse_fee)
{
rpc.flags = TALER_WAMF_MODE_CREATE_FROM_PURSE_QUOTA;
- TALER_amount_set_zero (TEH_currency,
- &rpc.purse_fee);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_set_zero (TEH_currency,
+ &rpc.purse_fee));
}
else
{