gnunet-svn
[Top][All Lists]
Advanced

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

[merchant] branch master updated: fix inverted interpretation of NULL as


From: Admin
Subject: [merchant] branch master updated: fix inverted interpretation of NULL as auth_ok in get_kyc_status
Date: Mon, 10 Feb 2025 19:50:30 +0100

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 029c46a6 fix inverted interpretation of NULL as auth_ok in 
get_kyc_status
029c46a6 is described below

commit 029c46a6b09af728df641289bb8ea75bb77e9a84
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Feb 10 19:50:03 2025 +0100

    fix inverted interpretation of NULL as auth_ok in get_kyc_status
---
 src/backend/taler-merchant-kyccheck.c | 1 +
 src/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
index b945308f..bdbfbfba 100644
--- 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
index b0618d92..7b98dc94 100644
--- 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;
 }

-- 
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]