[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 04/04: use order_id as summary if contract
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 04/04: use order_id as summary if contract doesn't have it |
Date: |
Sat, 26 Aug 2017 00:15:40 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository merchant.
commit ee116731c6ac4b5db85d9dcb57495c74e22c9fd4
Author: Florian Dold <address@hidden>
AuthorDate: Sat Aug 26 00:15:31 2017 +0200
use order_id as summary if contract doesn't have it
---
src/backend/taler-merchant-httpd_history.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_history.c
b/src/backend/taler-merchant-httpd_history.c
index 9d6459e..eeec11b 100644
--- a/src/backend/taler-merchant-httpd_history.c
+++ b/src/backend/taler-merchant-httpd_history.c
@@ -45,19 +45,23 @@ pd_cb (void *cls,
json_t *amount;
json_t *timestamp;
json_t *instance;
- json_t *summary;
+ json_t *summary=NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"/history's row_id: %llu\n",
(unsigned long long) row_id);
GNUNET_assert (-1 != json_unpack ((json_t *) contract_terms,
- "{s:o, s:o, s:{s:o}, s:o}",
+ "{s:o, s:o, s:{s:o}, s?:o}",
"amount", &amount,
"timestamp", ×tamp,
"merchant", "instance", &instance,
"summary", &summary));
+ if (NULL == summary) {
+ summary = json_string (order_id);
+ }
+
GNUNET_break (NULL != (entry = json_pack ("{s:I, s:s, s:O, s:O, s:O, s:O}",
"row_id", row_id,
"order_id", order_id,
--
To stop receiving notification emails like this one, please contact
address@hidden