gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: fix reference count


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix reference counting bug
Date: Fri, 03 Mar 2017 20:40:41 +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 ccd931a  fix reference counting bug
ccd931a is described below

commit ccd931aee6022853d34f8c8f933183c4ec6472cf
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 3 20:40:39 2017 +0100

    fix reference counting bug
---
 src/backend/taler-merchant-httpd_history.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_history.c 
b/src/backend/taler-merchant-httpd_history.c
index 1d59dc3..a0051ce 100644
--- a/src/backend/taler-merchant-httpd_history.c
+++ b/src/backend/taler-merchant-httpd_history.c
@@ -53,7 +53,6 @@ unsigned int current = 0;
  * @param refund refund deadline
  * @param total_amount total amount we receive for the contract after fees
  */
-
 static void
 pd_cb (void *cls,
        const char *order_id,
@@ -71,27 +70,29 @@ pd_cb (void *cls,
                                     "timestamp", &timestamp,
                                     "merchant", "instance", &instance));
 
-  if (current >= start && current < start + delta)
+  if ( (current >= start) &&
+       (current < start + delta) )
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Adding history element. Current: %d, start: %d, delta: %d\n",
                 current,
                 start,
                 delta);
-    GNUNET_break (NULL != (entry = json_pack ("{s:s, s:o, s:s, s:s}",
+    GNUNET_break (NULL != (entry = json_pack ("{s:s, s:O, s:s, s:s}",
                                               "order_id", order_id,
                                               "amount", amount,
                                               "timestamp", json_string_value 
(timestamp),
                                               "instance", json_string_value 
(instance))));
 
-    GNUNET_break (0 == json_array_append_new (response, entry));
-
+    GNUNET_break (0 == json_array_append_new (response,
+                                              entry));
   }
 
   // FIXME to zero after returned.
   current++;
 }
 
+
 /**
  * Manage a /history request. Query the db and returns transactions
  * younger than the date given as parameter

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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