diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-02-18 13:29:41 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-02-18 13:29:41 +0100 |
commit | 932298b4a14381a82db11d5078ff52994dfad127 (patch) | |
tree | ef3254bf1b949b44f0b598d3592ff4a6eb7e6c6c /src | |
parent | 153f40d4f182684b5080de43a562847800951f82 (diff) |
ensure kyc-checks wake up on failure
Diffstat (limited to 'src')
-rw-r--r-- | src/exchangedb/pg_insert_kyc_failure.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/exchangedb/pg_insert_kyc_failure.c b/src/exchangedb/pg_insert_kyc_failure.c index 7fe0b4273..568c39ca8 100644 --- a/src/exchangedb/pg_insert_kyc_failure.c +++ b/src/exchangedb/pg_insert_kyc_failure.c @@ -24,6 +24,8 @@ #include "taler_pq_lib.h" #include "pg_insert_kyc_failure.h" #include "pg_helper.h" +#include "pg_event_notify.h" + enum GNUNET_DB_QueryStatus TEH_PG_insert_kyc_failure ( @@ -47,6 +49,7 @@ TEH_PG_insert_kyc_failure ( : GNUNET_PQ_query_param_null (), GNUNET_PQ_query_param_end }; + enum GNUNET_DB_QueryStatus qs; PREPARE (pg, "insert_kyc_failure", @@ -58,7 +61,22 @@ TEH_PG_insert_kyc_failure ( " WHERE h_payto=$2" " AND legitimization_process_serial_id=$1" " AND provider_section=$3;"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "insert_kyc_failure", - params); + qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, + "insert_kyc_failure", + params); + if (qs > 0) + { + /* FIXME: might want to do this eventually in the same transaction... */ + struct TALER_KycCompletedEventP rep = { + .header.size = htons (sizeof (rep)), + .header.type = htons (TALER_DBEVENT_EXCHANGE_KYC_COMPLETED), + .h_payto = *h_payto + }; + + TEH_PG_event_notify (pg, + &rep.header, + NULL, + 0); + } + return qs; } |