exchange

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

commit cb60a5695d330de0feea2fb4800ca853a8ffe0ed
parent 7cab961e2d51286684dc8d12a134194f1baa9b44
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 24 Sep 2023 12:51:16 +0200

-fix regression

Diffstat:
Msrc/exchange/taler-exchange-httpd_batch-deposit.c | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_batch-deposit.c b/src/exchange/taler-exchange-httpd_batch-deposit.c @@ -643,10 +643,11 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc, GNUNET_NZL (bd->num_cdis)]; struct TALER_Amount deposit_fees[GNUNET_NZL (bd->num_cdis)]; enum GNUNET_GenericReturnValue res; + unsigned int i; bd->cdis = cdis; dc.deposit_fees = deposit_fees; - for (unsigned int i = 0; i<bd->num_cdis; i++) + for (i = 0; i<bd->num_cdis; i++) { struct TALER_Amount amount_without_fee; @@ -668,13 +669,13 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc, &dc.policy_details.accumulated_total, &dc.policy_details.accumulated_total, &amount_without_fee)); - if (GNUNET_OK != res) - { - for (unsigned int j = 0; j<i; j++) - TALER_denom_sig_free (&cdis[j].coin.denom_sig); - GNUNET_JSON_parse_free (spec); - return (GNUNET_NO == res) ? MHD_YES : MHD_NO; - } + } + if (GNUNET_OK != res) + { + for (unsigned int j = 0; j<i; j++) + TALER_denom_sig_free (&cdis[j].coin.denom_sig); + GNUNET_JSON_parse_free (spec); + return (GNUNET_NO == res) ? MHD_YES : MHD_NO; } dc.exchange_timestamp = GNUNET_TIME_timestamp_get ();