gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -fix minor threading issue


From: gnunet
Subject: [taler-exchange] branch master updated: -fix minor threading issue
Date: Wed, 22 Nov 2023 23:23:48 +0100

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 b87ad626 -fix minor threading issue
b87ad626 is described below

commit b87ad62692d9e0235554fecc52862cfca128dfe8
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Nov 22 22:23:45 2023 +0100

    -fix minor threading issue
---
 src/bank-lib/fakebank_tbr_get_history.c | 4 +++-
 src/bank-lib/fakebank_twg_history.c     | 8 ++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/bank-lib/fakebank_tbr_get_history.c 
b/src/bank-lib/fakebank_tbr_get_history.c
index 4653c505..7e7f9dda 100644
--- a/src/bank-lib/fakebank_tbr_get_history.c
+++ b/src/bank-lib/fakebank_tbr_get_history.c
@@ -61,6 +61,7 @@ TALER_FAKEBANK_tbr_get_history_incoming (
   const struct Transaction *pos;
   enum GNUNET_GenericReturnValue ret;
   bool in_shutdown;
+  const char *acc_payto_uri;
 
   if (NULL == cc)
   {
@@ -269,6 +270,7 @@ TALER_FAKEBANK_tbr_get_history_incoming (
     return MHD_YES;
   }
   in_shutdown = h->in_shutdown;
+  acc_payto_uri = hc->acc->payto_uri;
   GNUNET_assert (0 ==
                  pthread_mutex_unlock (&h->big_lock));
 finish:
@@ -291,7 +293,7 @@ finish:
       MHD_HTTP_OK,
       GNUNET_JSON_pack_string (
         "credit_account",
-        hc->acc->payto_uri),
+        acc_payto_uri),
       GNUNET_JSON_pack_array_steal (
         "incoming_transactions",
         h));
diff --git a/src/bank-lib/fakebank_twg_history.c 
b/src/bank-lib/fakebank_twg_history.c
index 6bed3cdf..c75b5c88 100644
--- a/src/bank-lib/fakebank_twg_history.c
+++ b/src/bank-lib/fakebank_twg_history.c
@@ -307,6 +307,8 @@ TALER_FAKEBANK_twg_get_credit_history_ (
   struct HistoryContext *hc;
   const struct Transaction *pos;
   enum GNUNET_GenericReturnValue ret;
+  bool in_shutdown;
+  const char *acc_payto_uri;
 
   if (NULL == cc)
   {
@@ -493,12 +495,14 @@ TALER_FAKEBANK_twg_get_credit_history_ (
                    pthread_mutex_unlock (&h->big_lock));
     return MHD_YES;
   }
+  in_shutdown = h->in_shutdown;
+  acc_payto_uri = hc->acc->payto_uri;
   GNUNET_assert (0 ==
                  pthread_mutex_unlock (&h->big_lock));
 finish:
   if (0 == json_array_size (hc->history))
   {
-    GNUNET_break (h->in_shutdown ||
+    GNUNET_break (in_shutdown ||
                   (! GNUNET_TIME_absolute_is_future (hc->timeout)));
     return TALER_MHD_reply_static (connection,
                                    MHD_HTTP_NO_CONTENT,
@@ -515,7 +519,7 @@ finish:
       MHD_HTTP_OK,
       GNUNET_JSON_pack_string (
         "credit_account",
-        hc->acc->payto_uri),
+        acc_payto_uri),
       GNUNET_JSON_pack_array_steal (
         "incoming_transactions",
         h));

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