[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix #6516
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix #6516 |
Date: |
Thu, 03 Sep 2020 15:23:37 +0200 |
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 0154203 fix #6516
0154203 is described below
commit 015420396dcad3d015668e055725f22e7f968f54
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Sep 3 15:23:35 2020 +0200
fix #6516
---
src/backend/taler-merchant-httpd.c | 17 +++++++++++++----
src/backend/taler-merchant-httpd_exchanges.c | 4 ++--
src/backend/taler-merchant-httpd_exchanges.h | 4 ++--
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c
b/src/backend/taler-merchant-httpd.c
index 4a726ec..7104b95 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -1535,6 +1535,8 @@ run (void *cls,
{
int fh;
enum TALER_MHD_GlobalOptions go;
+ int elen;
+ int alen;
(void) cls;
(void) args;
@@ -1581,18 +1583,25 @@ run (void *cls,
TMH_force_audit = GNUNET_YES;
TMH_templating_init ();
TMH_statics_init ();
- if (GNUNET_SYSERR ==
- TMH_EXCHANGES_init (config))
+ elen = TMH_EXCHANGES_init (config);
+ if (GNUNET_SYSERR == elen)
{
GNUNET_SCHEDULER_shutdown ();
return;
}
- if (GNUNET_SYSERR ==
- TMH_AUDITORS_init (config))
+ alen = TMH_AUDITORS_init (config);
+ if (GNUNET_SYSERR == alen)
{
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (0 == elen + alen)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Fatal: no trusted exchanges and no trusted auditors
configured. Exiting.\n");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
if (NULL ==
(TMH_by_id_map = GNUNET_CONTAINER_multihashmap_create (1,
GNUNET_NO)))
diff --git a/src/backend/taler-merchant-httpd_exchanges.c
b/src/backend/taler-merchant-httpd_exchanges.c
index 721c10e..3ad7f05 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -1205,7 +1205,7 @@ accept_exchanges (void *cls,
* Parses "trusted" exchanges listed in the configuration.
*
* @param cfg the configuration
- * @return #GNUNET_OK on success; #GNUNET_SYSERR upon error in
+ * @return number of trusted exchanges on success; #GNUNET_SYSERR upon error in
* parsing.
*/
int
@@ -1244,7 +1244,7 @@ TMH_EXCHANGES_init (const struct
GNUNET_CONFIGURATION_Handle *cfg)
json_array_append_new (TMH_trusted_exchanges,
j_exchange));
}
- return GNUNET_OK;
+ return json_array_size (TMH_trusted_exchanges);
}
diff --git a/src/backend/taler-merchant-httpd_exchanges.h
b/src/backend/taler-merchant-httpd_exchanges.h
index 4fcb812..e833410 100644
--- a/src/backend/taler-merchant-httpd_exchanges.h
+++ b/src/backend/taler-merchant-httpd_exchanges.h
@@ -40,8 +40,8 @@ extern json_t *TMH_trusted_exchanges;
* Parses "trusted" exchanges listed in the configuration.
*
* @param cfg the configuration
- * @return #GNUNET_OK on success; #GNUNET_SYSERR upon error in
- * parsing or initialization.
+ * @return number of trusted exchanges on success; #GNUNET_SYSERR upon error in
+ * parsing.
*/
int
TMH_EXCHANGES_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: fix #6516,
gnunet <=