summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_auditors.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-02 14:48:30 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-15 12:21:14 +0200
commit7c4621df0dac5f5738faacc33bd6f822b0fe86f1 (patch)
tree76371eff064ffcdab94de2c9326a5122a5cbc3a5 /src/backend/taler-merchant-httpd_auditors.c
parent0bf748cc19f37587c6c6fd82f26d66beb0758eba (diff)
downloadmerchant-7c4621df0dac5f5738faacc33bd6f822b0fe86f1.tar.gz
merchant-7c4621df0dac5f5738faacc33bd6f822b0fe86f1.tar.bz2
merchant-7c4621df0dac5f5738faacc33bd6f822b0fe86f1.zip
Towards enabling multiple wire accounts per merchant.
This also adjusts the merchant logic to the latest exchange wire API and updates the configurations to match the latest changes to the exchange's configuration structure (including the shift to payto://-URLs).
Diffstat (limited to 'src/backend/taler-merchant-httpd_auditors.c')
-rw-r--r--src/backend/taler-merchant-httpd_auditors.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_auditors.c b/src/backend/taler-merchant-httpd_auditors.c
index 8b620e06..735d0df2 100644
--- a/src/backend/taler-merchant-httpd_auditors.c
+++ b/src/backend/taler-merchant-httpd_auditors.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2014, 2015, 2016 GNUnet e.V. and INRIA
+ (C) 2014, 2015, 2016, 2018 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -136,15 +136,35 @@ parse_auditors (void *cls,
{
const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
char *pks;
+ char *currency;
struct Auditor auditor;
if (0 != strncasecmp (section,
- "merchant-auditor-",
- strlen ("merchant-auditor-")))
+ "auditor-",
+ strlen ("auditor-")))
return;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
section,
+ "CURRENCY",
+ &currency))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ section,
+ "CURRENCY");
+ return;
+ }
+ if (0 != strcasecmp (currency,
+ TMH_currency))
+ {
+ /* trusted exchange, but for a different currency; ignore */
+ GNUNET_free (currency);
+ return;
+ }
+ GNUNET_free (currency);
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ section,
"NAME",
&auditor.name))
{