diff options
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchangedb_accounts.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c index e668134e1..439d57674 100644 --- a/src/exchangedb/exchangedb_accounts.c +++ b/src/exchangedb/exchangedb_accounts.c @@ -190,27 +190,36 @@ add_account_cb (void *cls, ( (credit) && (lc->credit) ) ) ) return; /* not enabled for us, skip */ - if (GNUNET_OK != + if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (cfg, section, "PAYTO_URI", &payto_uri)) { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, - section, - "PAYTO_URI"); - return; + method = TALER_payto_get_method (payto_uri); + GNUNET_free (payto_uri); + if (NULL == method) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "payto URI in config ([%s]/PAYTO_URI) malformed\n", + section); + lc->res = GNUNET_SYSERR; + return; + } } - method = TALER_payto_get_method (payto_uri); - GNUNET_free (payto_uri); - if (NULL == method) + else if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + section, + "WIRE_METHOD", + &method)) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "payto URI in config ([%s]/PAYTO_URI) malformed\n", - section); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, + section, + "WIRE_METHOD"); lc->res = GNUNET_SYSERR; return; } + GNUNET_assert (NULL != method); wa = GNUNET_new (struct WireAccount); wa->section_name = GNUNET_strdup (section); wa->method = method; |