summaryrefslogtreecommitdiff
path: root/src/exchangedb/exchangedb_accounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/exchangedb_accounts.c')
-rw-r--r--src/exchangedb/exchangedb_accounts.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c
index e41074822..3f0e47afb 100644
--- a/src/exchangedb/exchangedb_accounts.c
+++ b/src/exchangedb/exchangedb_accounts.c
@@ -190,28 +190,35 @@ 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");
- lc->res = GNUNET_SYSERR;
- 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);
- lc->res = GNUNET_SYSERR;
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
+ section,
+ "WIRE_METHOD");
return;
}
+ GNUNET_assert (NULL != method);
wa = GNUNET_new (struct WireAccount);
wa->section_name = GNUNET_strdup (section);
wa->method = method;