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: add timestamp if mi


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: add timestamp if missing
Date: Sun, 12 Feb 2017 18:04:33 +0100

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

dold pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new bf7fe73  add timestamp if missing
bf7fe73 is described below

commit bf7fe7355d52461c9480979682e9c108f20a0822
Author: Florian Dold <address@hidden>
AuthorDate: Sun Feb 12 18:04:30 2017 +0100

    add timestamp if missing
---
 src/backend/taler-merchant-httpd_proposal.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_proposal.c 
b/src/backend/taler-merchant-httpd_proposal.c
index ea05a20..86648db 100644
--- a/src/backend/taler-merchant-httpd_proposal.c
+++ b/src/backend/taler-merchant-httpd_proposal.c
@@ -160,8 +160,7 @@ proposal_put (struct MHD_Connection *connection, json_t 
*order)
 
   /* Add order_id if it doesn't exist. */
 
-  order_id = json_string_value (json_object_get (order, "order_id"));
-  if (NULL == order_id)
+  if (NULL == json_string_value (json_object_get (order, "order_id")))
   {
     char buf[256];
     time_t timer;
@@ -178,6 +177,11 @@ proposal_put (struct MHD_Connection *connection, json_t 
*order)
     json_object_set (order, "order_id", json_string (buf));
   }
 
+  if (NULL == json_string_value (json_object_get (order, "timestamp")))
+  {
+    json_object_set (order, "timestamp", GNUNET_JSON_from_time_abs 
(GNUNET_TIME_absolute_get ()));
+  }
+
   /* extract fields we need to sign separately */
   res = TMH_PARSE_json_data (connection, order, spec);
   if (GNUNET_NO == res)

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



reply via email to

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