summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-21 20:00:40 +0200
committerChristian Grothoff <christian@grothoff.org>2016-04-21 20:00:40 +0200
commit21188ca703d05211e8d4d3ae9bd22500f53915ac (patch)
treea0dbae4cd9a23ef810fa38af66a6359bd8da3ebc /src
parent77e9e3a7f65db0940a0797d9b12ba883bbdae48e (diff)
parent1d43437991e52629a0dcc1ce97bb99b791ca6927 (diff)
downloadexchange-21188ca703d05211e8d4d3ae9bd22500f53915ac.tar.gz
exchange-21188ca703d05211e8d4d3ae9bd22500f53915ac.tar.bz2
exchange-21188ca703d05211e8d4d3ae9bd22500f53915ac.zip
Merge branch 'master' of ssh://taler.net:/var/git/exchange
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/bank-lib/bank_api_admin.c1
-rw-r--r--src/exchange-lib/test_exchange_api.conf4
-rw-r--r--src/exchange/exchange.conf2
-rw-r--r--src/exchange/taler-exchange-aggregator.c4
-rw-r--r--src/exchange/taler-exchange-httpd.c4
-rw-r--r--src/exchange/test_taler_exchange_httpd.conf6
-rw-r--r--src/include/taler_amount_lib.h2
-rw-r--r--src/taler.conf2
-rw-r--r--src/wire/plugin_wire_sepa.c4
-rw-r--r--src/wire/plugin_wire_template.c4
-rw-r--r--src/wire/plugin_wire_test.c6
-rw-r--r--src/wire/test_wire_plugin.conf2
13 files changed, 26 insertions, 19 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 6e0fb2049..ee66bb39b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,10 @@ if WALLET_ONLY
SUBDIRS = include util
else
+pkgcfgdir = $(prefix)/share/taler/config.d/
+pkgcfg_DATA = \
+ taler.conf
+
SUBDIRS = include util json $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools
if HAVE_LIBCURL
SUBDIRS += exchange-lib
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c
index a334d4629..df3525185 100644
--- a/src/bank-lib/bank_api_admin.c
+++ b/src/bank-lib/bank_api_admin.c
@@ -20,7 +20,6 @@
* @author Christian Grothoff
*/
#include "platform.h"
-#include <curl/curl.h>
#include <jansson.h>
#include <microhttpd.h> /* just for HTTP status codes */
#include <gnunet/gnunet_util_lib.h>
diff --git a/src/exchange-lib/test_exchange_api.conf b/src/exchange-lib/test_exchange_api.conf
index e7d849bc3..5fcc36552 100644
--- a/src/exchange-lib/test_exchange_api.conf
+++ b/src/exchange-lib/test_exchange_api.conf
@@ -4,10 +4,12 @@
# Persistant data storage for the testcase
TALER_TEST_HOME = test_exchange_api_home/
-[exchange]
+[taler]
# Currency supported by the exchange (can only be one)
CURRENCY = EUR
+[exchange]
+
# Wire format supported by the exchange
# We use 'test' for testing of the actual
# coin operations, and 'sepa' to test SEPA-specific routines.
diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf
index eab476ccd..96322d6a2 100644
--- a/src/exchange/exchange.conf
+++ b/src/exchange/exchange.conf
@@ -1,8 +1,6 @@
# This file is in the public domain.
#
[exchange]
-# Currency supported by the exchange (can only be one)
-# CURRENCY = EUR
# Where do we store the private keys the exchange needs at
# runtime? (Denomination and signing keys are then stored
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index e4ba975a2..0cb47667f 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -249,12 +249,12 @@ exchange_serve_process_config ()
{
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
- "exchange",
+ "taler",
"currency",
&exchange_currency_string))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
+ "taler",
"currency");
return GNUNET_SYSERR;
}
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index c99535382..6efb1492e 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -387,12 +387,12 @@ exchange_serve_process_config ()
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
- "exchange",
+ "taler",
"currency",
&TMH_exchange_currency_string))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
+ "taler",
"currency");
return GNUNET_SYSERR;
}
diff --git a/src/exchange/test_taler_exchange_httpd.conf b/src/exchange/test_taler_exchange_httpd.conf
index 612d9f4d4..642bbf668 100644
--- a/src/exchange/test_taler_exchange_httpd.conf
+++ b/src/exchange/test_taler_exchange_httpd.conf
@@ -2,11 +2,13 @@
# Persistant data storage for the testcase
TALER_TEST_HOME = test_taler_exchange_httpd_home/
-
-[exchange]
+[taler]
# Currency supported by the exchange (can only be one)
CURRENCY = EUR
+
+[exchange]
+
# Wire format supported by the exchange
# We use 'test' for testing of the actual
# coin operations.
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index 2fd547196..8c613e020 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -29,7 +29,7 @@ extern "C"
#endif
#endif
-#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
/**
diff --git a/src/taler.conf b/src/taler.conf
new file mode 100644
index 000000000..d05b656c6
--- /dev/null
+++ b/src/taler.conf
@@ -0,0 +1,2 @@
+[taler]
+CURRENCY = KUDOS
diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c
index 6f01167d9..7a3d0d17b 100644
--- a/src/wire/plugin_wire_sepa.c
+++ b/src/wire/plugin_wire_sepa.c
@@ -737,12 +737,12 @@ libtaler_plugin_wire_sepa_init (void *cls)
{
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
- "exchange",
+ "taler",
"CURRENCY",
&sc->currency))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
+ "taler",
"CURRENCY");
GNUNET_free (sc);
return NULL;
diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c
index 46908c297..826d93185 100644
--- a/src/wire/plugin_wire_template.c
+++ b/src/wire/plugin_wire_template.c
@@ -242,12 +242,12 @@ libtaler_plugin_wire_template_init (void *cls)
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
- "exchange",
+ "taler",
"CURRENCY",
&tc->currency))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
+ "taler",
"CURRENCY");
GNUNET_free (tc->bank_uri);
GNUNET_free (tc);
diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c
index c11adbaed..55d698172 100644
--- a/src/wire/plugin_wire_test.c
+++ b/src/wire/plugin_wire_test.c
@@ -224,7 +224,7 @@ test_amount_round (void *cls,
if (NULL == tc->currency)
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
+ "taler",
"CURRENCY");
return GNUNET_SYSERR; /* not configured with currency */
}
@@ -820,12 +820,12 @@ libtaler_plugin_wire_test_init (void *cls)
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
- "exchange",
+ "taler",
"CURRENCY",
&tc->currency))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
+ "taler",
"CURRENCY");
GNUNET_free (tc->bank_uri);
GNUNET_free (tc);
diff --git a/src/wire/test_wire_plugin.conf b/src/wire/test_wire_plugin.conf
index ece816954..b9aebdba7 100644
--- a/src/wire/test_wire_plugin.conf
+++ b/src/wire/test_wire_plugin.conf
@@ -17,5 +17,5 @@ SEPA_RESPONSE_FILE = test_wire_plugin_sepa.json
# is avaialble).
BANK_URI = http://localhost/
-[exchange]
+[taler]
CURRENCY = "EUR"