commit bfa630e9b00670217e44be6d3a452ca02e24c83c
parent 0b79eef2b38c4c677bdbec81f66a6d6d539aa87e
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 13 Aug 2026 17:25:44 +0200
fix #10990 and also instance-deletion handilng in taler-merchant-kyccheck
Diffstat:
1 file changed, 48 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c
@@ -619,6 +619,13 @@ clear_tos (const struct Inquiry *i)
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Instance `%s' vanished, nothing to clear\n",
+ i->a->instance_id);
+ return;
+ }
qs = TALER_MERCHANTDB_delete_tos_accepted_early (
pg,
i->a->instance_id,
@@ -874,6 +881,13 @@ check_early_tos_acceptance (struct Inquiry *i,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Instance `%s' vanished, skipping ToS check\n",
+ i->a->instance_id);
+ return;
+ }
qs = TALER_MERCHANTDB_get_tos_accepted_early (pg,
i->a->instance_id,
i->e->keys->exchange_url,
@@ -1083,6 +1097,14 @@ exchange_check_cb (
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Instance `%s' vanished, discarding KYC status\n",
+ i->a->instance_id);
+ finish_inquiry (i);
+ return;
+ }
qs = TALER_MERCHANTDB_insert_kyc_status (
pg,
i->a->instance_id,
@@ -1279,6 +1301,13 @@ start_inquiry (struct Exchange *e,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Instance `%s' vanished, not starting inquiry\n",
+ a->instance_id);
+ return;
+ }
qs = TALER_MERCHANTDB_get_kyc_status (pg,
a->merchant_account_uri,
a->instance_id,
@@ -1413,6 +1442,13 @@ flag_ineligible (const char *instance_id,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Instance `%s' vanished, not flagging account\n",
+ instance_id);
+ return;
+ }
qs = TALER_MERCHANTDB_insert_kyc_status (
pg,
instance_id,
@@ -1694,11 +1730,20 @@ find_keys (const char *exchange_url)
NULL != a;
a = a->next)
{
- if ( (a->account_gen == database_gen) &&
- (is_eligible (e->keys,
- a)) )
+ if (a->account_gen != database_gen)
+ continue;
+ if (is_eligible (e->keys,
+ a))
+ {
start_inquiry (e,
a);
+ }
+ else
+ {
+ flag_ineligible (a->instance_id,
+ e->keys->exchange_url,
+ &a->h_wire);
+ }
}
}