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: Including instance


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: Including instance within history elements.
Date: Wed, 01 Mar 2017 21:25:20 +0100

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

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new c394750  Including instance within history elements.
c394750 is described below

commit c39475097bcd8382cb04ad80115167c65a613d54
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 1 21:24:42 2017 +0100

    Including instance within history elements.
---
 src/backend/taler-merchant-httpd_history.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_history.c 
b/src/backend/taler-merchant-httpd_history.c
index 2ed9c8c..25e3b03 100644
--- a/src/backend/taler-merchant-httpd_history.c
+++ b/src/backend/taler-merchant-httpd_history.c
@@ -63,17 +63,27 @@ pd_cb (void *cls,
   json_t *entry;
   json_t *amount;
   json_t *timestamp;
+  json_t *instance;
 
 
-  GNUNET_assert (NULL != (amount = json_copy (json_object_get (proposal_data, 
"amount"))));
-  GNUNET_assert (NULL != (timestamp = json_object_get (proposal_data, 
"timestamp")));
+  GNUNET_assert (-1 != json_unpack (proposal_data,
+                                    "{s:o, s:o, s:{s:o}}",
+                                    "amount", &amount,
+                                    "timestamp", &timestamp,
+                                    "merchant", "instance", &instance));
 
   if (current >= start && current < start + delta)
   {
-    GNUNET_break (NULL != (entry = json_pack ("{s:s, s:o, s:s}",
+    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}",
                                               "order_id", order_id,
                                               "amount", amount,
-                                              "timestamp", json_string_value 
(timestamp))));
+                                              "timestamp", json_string_value 
(timestamp),
+                                              "instance", json_string_value 
(instance))));
 
     GNUNET_break (0 == json_array_append_new (response, entry));
   

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



reply via email to

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