merchant

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

commit fa44a2157bceb89d126f4a02a860b1ea38cb493e
parent 20138dd971d553f4af6236da5d12b00286b1a317
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  2 Jun 2026 22:08:28 +0200

needs set_instance()

Diffstat:
Msrc/backend/taler-merchant-httpd_get-private-kyc.c | 28++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_get-private-kyc.c b/src/backend/taler-merchant-httpd_get-private-kyc.c @@ -33,6 +33,7 @@ #include <regex.h> #include "merchant-database/account_kyc_get_status.h" #include "merchant-database/event_listen.h" +#include "merchant-database/set_instance.h" #include "merchant-database/lookup_tos_accepted_early.h" /** @@ -882,16 +883,31 @@ ekr_expand_response (struct ExchangeKycRequest *ekr) { enum GNUNET_DB_QueryStatus qs; - qs = TALER_MERCHANTDB_lookup_tos_accepted_early (TMH_db, - kc->mi->settings.id, - ekr->exchange_url, - &tos_accepted_early); - if (qs < 0) + qs = TALER_MERCHANTDB_set_instance ( + TMH_db, + kc->mi->settings.id); + if (0 >= qs) { GNUNET_break (0); - /* fall through with tos_accepted_early == NULL */ tos_accepted_early = NULL; } + else + { + qs = TALER_MERCHANTDB_lookup_tos_accepted_early (TMH_db, + kc->mi->settings.id, + ekr->exchange_url, + &tos_accepted_early); + GNUNET_break (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == + TALER_MERCHANTDB_set_instance ( + TMH_db, + NULL)); + if (qs < 0) + { + GNUNET_break (0); + /* fall through with tos_accepted_early == NULL */ + tos_accepted_early = NULL; + } + } } GNUNET_assert ( 0 ==