merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 523cb87773b79bb03865643007288944ac93abae
parent c926288c9c36394efda1007c7d130cad86832c13
Author: Florian Dold <florian@dold.me>
Date:   Fri, 17 Oct 2025 12:18:41 +0200

-fix refactoring regression

Diffstat:
Msrc/backend/taler-merchant-httpd_post-orders-ID-pay.c | 25++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c @@ -3503,18 +3503,17 @@ count_output_tokens (const struct PayContext *pc, { switch (output->type) { - case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_INVALID: - GNUNET_assert (0); - break; - case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_TOKEN: - return output->details.token.count; - case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT: + case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_INVALID: + GNUNET_assert (0); + break; + case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_TOKEN: + return output->details.token.count; + case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT: #ifdef HAVE_DONAU_DONAU_SERVICE_H - return pc->parse_wallet_data.num_bkps; + return pc->parse_wallet_data.num_bkps; #else - return 0; + return 0; #endif - break; } /* Not reached. */ GNUNET_assert (0); @@ -3685,9 +3684,9 @@ phase_validate_tokens (struct PayContext *pc) { const struct TALER_MERCHANT_ContractOutput *output = &selected->outputs[i]; - - output_off += count_output_tokens (pc, - output); + cnt = count_output_tokens (pc, + output); + output_off += cnt; for (unsigned int j = 0; j<cnt; j++) pc->output_tokens[output_off + j].output_index = i; } @@ -3881,7 +3880,7 @@ append_output_token_sig (void *cls, pc->check_contract.contract_terms->version); choice = &pc->check_contract.contract_terms->details.v1 - .choices[pc->parse_wallet_data.choice_index]; + .choices[pc->parse_wallet_data.choice_index]; output = &choice->outputs[pc->output_index_gen]; cnt = count_output_tokens (pc, output);