exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit eb45f57e80211b3bd3f4467d7ddb7249cb149dea
parent 475483bd768c37d886f9a78ac53b69dee779aece
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 11 Jan 2025 00:14:44 +0100

improve logging'

Diffstat:
Msrc/bank-lib/bank_api_parse.c | 32+++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/bank-lib/bank_api_parse.c b/src/bank-lib/bank_api_parse.c @@ -77,10 +77,11 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_OK; case TALER_BANK_AUTH_BASIC: if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - section, - "USERNAME", - &auth->details.basic.username)) + GNUNET_CONFIGURATION_get_value_string ( + cfg, + section, + "USERNAME", + &auth->details.basic.username)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, section, @@ -90,10 +91,11 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_SYSERR; } if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - section, - "PASSWORD", - &auth->details.basic.password)) + GNUNET_CONFIGURATION_get_value_string ( + cfg, + section, + "PASSWORD", + &auth->details.basic.password)) { GNUNET_free (auth->details.basic.username); auth->details.basic.username = NULL; @@ -109,10 +111,11 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_OK; case TALER_BANK_AUTH_BEARER: if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - section, - "TOKEN", - &auth->details.bearer.token)) + GNUNET_CONFIGURATION_get_value_string ( + cfg, + section, + "TOKEN", + &auth->details.bearer.token)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, section, @@ -127,6 +130,9 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, } } } + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unknown authentication method `%s'\n", + method); GNUNET_free (method); return GNUNET_SYSERR; } @@ -159,7 +165,7 @@ TALER_BANK_auth_free (struct TALER_BANK_AuthenticationData *auth) } break; } - + GNUNET_free (auth->wire_gateway_url); auth->wire_gateway_url = NULL; }