gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -fix 200 vs. 204 in fakebank


From: gnunet
Subject: [taler-exchange] branch master updated: -fix 200 vs. 204 in fakebank
Date: Mon, 19 Dec 2022 14:37:34 +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 5ff708d3 -fix 200 vs. 204 in fakebank
5ff708d3 is described below

commit 5ff708d3a97cab7bc1958e38a52316388f50dd58
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Dec 19 14:37:20 2022 +0100

    -fix 200 vs. 204 in fakebank
---
 src/bank-lib/fakebank.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 81029041..73237811 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -2397,6 +2397,15 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
   }
   GNUNET_assert (0 ==
                  pthread_mutex_unlock (&h->big_lock));
+  if (0 == json_array_size (history))
+  {
+    json_decref (history);
+    return TALER_MHD_reply_static (connection,
+                                   MHD_HTTP_NO_CONTENT,
+                                   NULL,
+                                   NULL,
+                                   0);
+  }
   GNUNET_free (debit_payto);
   return TALER_MHD_REPLY_JSON_PACK (connection,
                                     MHD_HTTP_OK,
@@ -2608,6 +2617,15 @@ handle_credit_history (struct TALER_FAKEBANK_Handle *h,
   }
   GNUNET_assert (0 ==
                  pthread_mutex_unlock (&h->big_lock));
+  if (0 == json_array_size (history))
+  {
+    json_decref (history);
+    return TALER_MHD_reply_static (connection,
+                                   MHD_HTTP_NO_CONTENT,
+                                   NULL,
+                                   NULL,
+                                   0);
+  }
   return TALER_MHD_REPLY_JSON_PACK (connection,
                                     MHD_HTTP_OK,
                                     GNUNET_JSON_pack_array_steal (

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