merchant

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

commit 029c46a6b09af728df641289bb8ea75bb77e9a84
parent 27967902dc00e2a2952f15d0b29ad0c5446e42a9
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 10 Feb 2025 19:50:03 +0100

fix inverted interpretation of NULL as auth_ok in get_kyc_status

Diffstat:
Msrc/backend/taler-merchant-kyccheck.c | 1+
Msrc/backenddb/pg_get_kyc_status.c | 4+++-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c @@ -579,6 +579,7 @@ exchange_check_cb ( EXCHANGE_TIMEOUT); i->last_kyc_check = GNUNET_TIME_timestamp_get (); i->due = GNUNET_TIME_relative_to_absolute (i->backoff); + i->auth_ok = false; break; } diff --git a/src/backenddb/pg_get_kyc_status.c b/src/backenddb/pg_get_kyc_status.c @@ -50,11 +50,12 @@ TMH_PG_get_kyc_status ( }; uint32_t h32 = 0; uint32_t e32 = 0; + bool token_is_null = true; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_allow_null ( GNUNET_PQ_result_spec_auto_from_type ("access_token", access_token), - auth_ok), + &token_is_null), GNUNET_PQ_result_spec_uint32 ("exchange_http_status", &h32), GNUNET_PQ_result_spec_uint32 ("exchange_ec_code", @@ -101,5 +102,6 @@ TMH_PG_get_kyc_status ( rs); *last_ec = (enum TALER_ErrorCode) (int) e32; *last_http_status = (unsigned int) h32; + *auth_ok = ! token_is_null; return qs; }