[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 01/03: do use return value of iterate_inst
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 01/03: do use return value of iterate_instances() |
Date: |
Sun, 25 Jun 2017 12:36:08 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit a63f5159b60e952490600cc71420bbe66dad4cff
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jun 25 12:16:07 2017 +0200
do use return value of iterate_instances()
---
doc/version.texi | 4 ++--
src/backend/taler-merchant-httpd.c | 25 ++++++++++++++-----------
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/doc/version.texi b/doc/version.texi
index acbfcb4..2a18a25 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
address@hidden UPDATED 31 May 2017
address@hidden UPDATED-MONTH May 2017
address@hidden UPDATED 2 June 2017
address@hidden UPDATED-MONTH June 2017
@set EDITION 0.3.0
@set VERSION 0.3.0
diff --git a/src/backend/taler-merchant-httpd.c
b/src/backend/taler-merchant-httpd.c
index 44831cc..482360c 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -663,7 +663,7 @@ get_instance (struct json_t *json)
* @return #GNUNET_OK if successful, #GNUNET_SYSERR upon errors
* (for example, if no "default" instance is defined)
*/
-static unsigned int
+static int
iterate_instances (const struct GNUNET_CONFIGURATION_Handle *config,
const char *allowed)
{
@@ -716,14 +716,11 @@ iterate_instances (const struct
GNUNET_CONFIGURATION_Handle *config,
return GNUNET_OK;
fail:
- do {
- GNUNET_PLUGIN_unload (lib_name,
- iic->plugin);
- GNUNET_free (lib_name);
- GNUNET_free (iic);
- GNUNET_SCHEDULER_shutdown ();
- return GNUNET_SYSERR;
- } while (0);
+ GNUNET_PLUGIN_unload (lib_name,
+ iic->plugin);
+ GNUNET_free (lib_name);
+ GNUNET_free (iic);
+ return GNUNET_SYSERR;
}
@@ -853,8 +850,14 @@ run (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
- iterate_instances (config,
- wireformat);
+ if (GNUNET_OK !=
+ iterate_instances (config,
+ wireformat))
+ {
+ GNUNET_free (wireformat);
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
GNUNET_free (wireformat);
if (NULL ==
--
To stop receiving notification emails like this one, please contact
address@hidden