gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: do not hang in taler-auditor-off


From: gnunet
Subject: [taler-exchange] branch master updated: do not hang in taler-auditor-offline if sign output is empty
Date: Mon, 12 Apr 2021 20:31:17 +0200

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 245e7574 do not hang in taler-auditor-offline if sign output is empty
245e7574 is described below

commit 245e757438c9632affa3c042258c59b096183d10
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Apr 12 20:29:02 2021 +0200

    do not hang in taler-auditor-offline if sign output is empty
---
 src/exchange-tools/taler-auditor-offline.c  | 11 +++++++----
 src/exchange-tools/taler-exchange-offline.c |  1 -
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/exchange-tools/taler-auditor-offline.c 
b/src/exchange-tools/taler-auditor-offline.c
index eeec2601..f4bd93d5 100644
--- a/src/exchange-tools/taler-auditor-offline.c
+++ b/src/exchange-tools/taler-auditor-offline.c
@@ -289,8 +289,7 @@ output_operation (const char *op_name,
 {
   json_t *action;
 
-  if (NULL == out)
-    out = json_array ();
+  GNUNET_assert (NULL != out);
   action = json_pack ("{ s:s, s:o }",
                       "operation",
                       op_name,
@@ -526,6 +525,8 @@ trigger_upload (const char *exchange_url)
       return;
     }
   }
+  /* test here, in case no upload was triggered (i.e. empty input) */
+  test_shutdown ();
 }
 
 
@@ -1161,8 +1162,6 @@ do_sign (char *const *args)
     json_decref (keys);
     return;
   }
-
-
   if (GNUNET_OK !=
       GNUNET_JSON_parse (keys,
                          spec,
@@ -1189,6 +1188,8 @@ do_sign (char *const *args)
     json_decref (keys);
     return;
   }
+  if (NULL == out)
+    out = json_array ();
   if (GNUNET_OK !=
       sign_denomkeys (denomkeys))
   {
@@ -1220,6 +1221,8 @@ do_setup (char *const *args)
   }
   if (NULL != *args)
   {
+    if (NULL == out)
+      out = json_array ();
     output_operation (OP_SETUP,
                       json_pack ("{s:o}",
                                  "auditor_pub",
diff --git a/src/exchange-tools/taler-exchange-offline.c 
b/src/exchange-tools/taler-exchange-offline.c
index 7deac305..ee173f11 100644
--- a/src/exchange-tools/taler-exchange-offline.c
+++ b/src/exchange-tools/taler-exchange-offline.c
@@ -1953,7 +1953,6 @@ do_add_auditor (char *const *args)
     return;
   now = GNUNET_TIME_absolute_get ();
   (void) GNUNET_TIME_round_abs (&now);
-
   TALER_exchange_offline_auditor_add_sign (&auditor_pub,
                                            args[1],
                                            now,

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