gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: fix #7870


From: gnunet
Subject: [taler-exchange] branch master updated: fix #7870
Date: Fri, 23 Jun 2023 11:41:55 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new d25dc8b0 fix #7870
d25dc8b0 is described below

commit d25dc8b0adb8fa606e8f97185984a623c52819cd
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Jun 23 11:41:52 2023 +0200

    fix #7870
---
 src/exchange/taler-exchange-httpd_common_kyc.c       | 4 ++++
 src/exchange/taler-exchange-httpd_kyc-check.c        | 3 ++-
 src/exchange/taler-exchange-httpd_kyc-proof.c        | 3 +++
 src/exchangedb/exchange_do_batch_reserves_update.sql | 4 +++-
 src/exchangedb/exchange_do_insert_kyc_attributes.sql | 6 ++++--
 src/exchangedb/pg_insert_aml_decision.c              | 1 +
 src/exchangedb/pg_insert_kyc_attributes.c            | 8 ++++++++
 src/exchangedb/pg_reserves_in_insert.c               | 2 ++
 8 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_common_kyc.c 
b/src/exchange/taler-exchange-httpd_common_kyc.c
index ef917a55..b6585ed5 100644
--- a/src/exchange/taler-exchange-httpd_common_kyc.c
+++ b/src/exchange/taler-exchange-httpd_common_kyc.c
@@ -147,6 +147,10 @@ kyc_aml_finished (void *cls,
     ea,
     0 != code);
   GNUNET_free (ea);
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Stored encrypted KYC process #%llu attributes: %d\n",
+              (unsigned long long) kat->process_row,
+              qs);
   if (GNUNET_DB_STATUS_HARD_ERROR == qs)
   {
     GNUNET_break (0);
diff --git a/src/exchange/taler-exchange-httpd_kyc-check.c 
b/src/exchange/taler-exchange-httpd_kyc-check.c
index 0372573b..4b78c071 100644
--- a/src/exchange/taler-exchange-httpd_kyc-check.c
+++ b/src/exchange/taler-exchange-httpd_kyc-check.c
@@ -601,11 +601,12 @@ TEH_handler_kyc_check (
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Suspending HTTP request on timeout (%s) now...\n",
-                GNUNET_TIME_relative2s (GNUNET_TIME_absolute_get_duration (
+                GNUNET_TIME_relative2s (GNUNET_TIME_absolute_get_remaining (
                                           kyp->timeout),
                                         true));
     GNUNET_assert (NULL != kyp->eh);
     kyp->suspended = true;
+    kyp->section_name = NULL;
     GNUNET_CONTAINER_DLL_insert (kyp_head,
                                  kyp_tail,
                                  kyp);
diff --git a/src/exchange/taler-exchange-httpd_kyc-proof.c 
b/src/exchange/taler-exchange-httpd_kyc-proof.c
index b3175bd2..a3eb5cb5 100644
--- a/src/exchange/taler-exchange-httpd_kyc-proof.c
+++ b/src/exchange/taler-exchange-httpd_kyc-proof.c
@@ -221,6 +221,9 @@ proof_cb (
                             &old_scope);
   if (TALER_KYCLOGIC_STATUS_SUCCESS == status)
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "KYC process #%llu succeeded with KYC provider\n",
+                (unsigned long long) kpc->process_row);
     kpc->kat = TEH_kyc_finished (&rc->async_scope_id,
                                  kpc->process_row,
                                  &kpc->h_payto,
diff --git a/src/exchangedb/exchange_do_batch_reserves_update.sql 
b/src/exchangedb/exchange_do_batch_reserves_update.sql
index 82b6b84c..915d9556 100644
--- a/src/exchangedb/exchange_do_batch_reserves_update.sql
+++ b/src/exchangedb/exchange_do_batch_reserves_update.sql
@@ -65,7 +65,9 @@ BEGIN
              ,expiration_date=GREATEST(expiration_date,in_expiration_date)
              ,gc_date=GREATEST(gc_date,in_expiration_date)
                WHERE reserve_pub=in_reserve_pub;
-    PERFORM pg_notify(in_notify, NULL);
+    EXECUTE FORMAT (
+      'NOTIFY %s'
+       in_notify);
   ELSE
     out_duplicate = TRUE;
   END IF;
diff --git a/src/exchangedb/exchange_do_insert_kyc_attributes.sql 
b/src/exchangedb/exchange_do_insert_kyc_attributes.sql
index f1959a66..5bb199bb 100644
--- a/src/exchangedb/exchange_do_insert_kyc_attributes.sql
+++ b/src/exchangedb/exchange_do_insert_kyc_attributes.sql
@@ -75,8 +75,10 @@ THEN
     UPDATE SET status=EXCLUDED.status | 1;
 END IF;
 
--- Wake up everyone who might care...
-PERFORM pg_notify (in_kyc_completed_notify_s, NULL);
+EXECUTE FORMAT (
+ 'NOTIFY %s'
+ ,in_kyc_completed_notify_s);
+
 
 INSERT INTO kyc_alerts
  (h_payto
diff --git a/src/exchangedb/pg_insert_aml_decision.c 
b/src/exchangedb/pg_insert_aml_decision.c
index 62645c2a..fcf67ee4 100644
--- a/src/exchangedb/pg_insert_aml_decision.c
+++ b/src/exchangedb/pg_insert_aml_decision.c
@@ -89,6 +89,7 @@ TEH_PG_insert_aml_decision (
                                                  params,
                                                  rs);
   GNUNET_free (notify_s);
+  GNUNET_PQ_event_do_poll (pg->conn);
   if (NULL != kyc_s)
     free (kyc_s);
   return qs;
diff --git a/src/exchangedb/pg_insert_kyc_attributes.c 
b/src/exchangedb/pg_insert_kyc_attributes.c
index 361f491e..e3c246e5 100644
--- a/src/exchangedb/pg_insert_kyc_attributes.c
+++ b/src/exchangedb/pg_insert_kyc_attributes.c
@@ -25,6 +25,9 @@
 #include "pg_insert_kyc_attributes.h"
 #include "pg_helper.h"
 
+void
+event_do_poll (struct GNUNET_PQ_Context *db);
+
 
 enum GNUNET_DB_QueryStatus
 TEH_PG_insert_kyc_attributes (
@@ -81,6 +84,9 @@ TEH_PG_insert_kyc_attributes (
   };
   enum GNUNET_DB_QueryStatus qs;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Inserting KYC attributes, wake up on %s\n",
+              kyc_completed_notify_s);
   PREPARE (pg,
            "insert_kyc_attributes",
            "SELECT "
@@ -92,6 +98,8 @@ TEH_PG_insert_kyc_attributes (
                                                  params,
                                                  rs);
   GNUNET_free (kyc_completed_notify_s);
+  GNUNET_PQ_event_do_poll (pg->conn);
+
   if (qs < 0)
     return qs;
   if (! ok)
diff --git a/src/exchangedb/pg_reserves_in_insert.c 
b/src/exchangedb/pg_reserves_in_insert.c
index 72fde749..7f59826c 100644
--- a/src/exchangedb/pg_reserves_in_insert.c
+++ b/src/exchangedb/pg_reserves_in_insert.c
@@ -611,6 +611,7 @@ TEH_PG_reserves_in_insert (
                  reserves_length,
                  batch_size,
                  results);
+  GNUNET_PQ_event_do_poll (pg->conn);
   for (unsigned int i = 0; i<reserves_length; i++)
     GNUNET_free (rrs[i].notify_s);
   return qs;
@@ -889,6 +890,7 @@ TEH_PG_reserves_in_insertN (
     }
   }
 finished:
+  GNUNET_PQ_event_do_poll (pg->conn);
   for (unsigned int i = 0; i<reserves_length; i++)
     GNUNET_free (rrs[i].notify_s);
   return qs;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]