diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-05-22 16:49:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-05-22 16:49:58 +0200 |
commit | 1765554e84fcf0cbf498ae6b997c576dd91a6cec (patch) | |
tree | 166f93a7a8caf90ddb83877797341ee110f93bb8 | |
parent | c315462d434e56457ac3dcaed558f6d9775adc06 (diff) | |
download | exchange-1765554e84fcf0cbf498ae6b997c576dd91a6cec.tar.xz |
allow only specifying a wire method
m--------- | contrib/gana | 0 | ||||
m--------- | contrib/wallet-core | 0 | ||||
-rw-r--r-- | src/exchangedb/exchangedb_accounts.c | 31 |
3 files changed, 20 insertions, 11 deletions
diff --git a/contrib/gana b/contrib/gana -Subproject cbe19e87d6da5f16e71573c85a717e986a43da6 +Subproject 5886be02a8a27a1ded5e4fd2c14acfa5614f266 diff --git a/contrib/wallet-core b/contrib/wallet-core -Subproject b272a075b4590f330eb4a82c257e79ea7f0c7c1 +Subproject c412a2fff5ac72f3a15ffcf0c59b226a9c7ad93 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; |