merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit a63f5159b60e952490600cc71420bbe66dad4cff
parent 507eebd2706d4395d541a7f5b997454233fb64c8
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 25 Jun 2017 12:16:07 +0200

do use return value of iterate_instances()

Diffstat:
Mdoc/version.texi | 4++--
Msrc/backend/taler-merchant-httpd.c | 25++++++++++++++-----------
2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/doc/version.texi b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 31 May 2017 -@set UPDATED-MONTH May 2017 +@set UPDATED 2 June 2017 +@set 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 @@ -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 ==