summaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-24 09:00:35 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-24 09:00:35 +0200
commit42decef957861689c41d16a0dcfa8af3d9052816 (patch)
treeed55c4e5a2e2a4b8d2880fe10c8f82173cf0a11e /src/auditor
parent325b60989faadb54213af578bb9b1b705d022726 (diff)
downloadexchange-42decef957861689c41d16a0dcfa8af3d9052816.tar.gz
exchange-42decef957861689c41d16a0dcfa8af3d9052816.tar.bz2
exchange-42decef957861689c41d16a0dcfa8af3d9052816.zip
fix #6939 in exchange
Diffstat (limited to 'src/auditor')
-rw-r--r--src/auditor/taler-auditor-httpd.c6
-rw-r--r--src/auditor/taler-auditor-httpd.h4
-rw-r--r--src/auditor/taler-auditor-httpd_deposit-confirmation.c40
3 files changed, 34 insertions, 16 deletions
diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c
index d77b2418..36d0547f 100644
--- a/src/auditor/taler-auditor-httpd.c
+++ b/src/auditor/taler-auditor-httpd.c
@@ -108,7 +108,7 @@ static mode_t unixpath_mode;
/**
* Our currency.
*/
-static char *currency;
+char *TAH_currency;
/**
* Pipe used for signaling reloading of our key state.
@@ -325,7 +325,7 @@ handle_version (struct TAH_RequestHandler *rh,
{
ver = json_pack ("{s:s, s:s, s:o}",
"version", AUDITOR_PROTOCOL_VERSION,
- "currency", currency,
+ "currency", TAH_currency,
"auditor_public_key", GNUNET_JSON_from_data_auto (
&auditor_pub));
}
@@ -461,7 +461,7 @@ auditor_serve_process_config (void)
}
if (GNUNET_OK !=
TALER_config_get_currency (cfg,
- &currency))
+ &TAH_currency))
{
return GNUNET_SYSERR;
}
diff --git a/src/auditor/taler-auditor-httpd.h b/src/auditor/taler-auditor-httpd.h
index 25e37427..79e56ff5 100644
--- a/src/auditor/taler-auditor-httpd.h
+++ b/src/auditor/taler-auditor-httpd.h
@@ -38,6 +38,10 @@ extern struct TALER_AUDITORDB_Plugin *TAH_plugin;
*/
extern struct TALER_EXCHANGEDB_Plugin *TAH_eplugin;
+/**
+ * Our currency.
+ */
+extern char *TAH_currency;
/**
* @brief Struct describing an URL and the handler for it.
diff --git a/src/auditor/taler-auditor-httpd_deposit-confirmation.c b/src/auditor/taler-auditor-httpd_deposit-confirmation.c
index 5c1ee9f0..31d7a719 100644
--- a/src/auditor/taler-auditor-httpd_deposit-confirmation.c
+++ b/src/auditor/taler-auditor-httpd_deposit-confirmation.c
@@ -259,21 +259,35 @@ TAH_DEPOSIT_CONFIRMATION_handler (struct TAH_RequestHandler *rh,
struct TALER_AUDITORDB_DepositConfirmation dc;
struct TALER_AUDITORDB_ExchangeSigningKey es;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_fixed_auto ("h_contract_terms", &dc.h_contract_terms),
- GNUNET_JSON_spec_fixed_auto ("h_wire", &dc.h_wire),
+ GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
+ &dc.h_contract_terms),
+ GNUNET_JSON_spec_fixed_auto ("h_wire",
+ &dc.h_wire),
TALER_JSON_spec_absolute_time ("exchange_timestamp",
&dc.exchange_timestamp),
- TALER_JSON_spec_absolute_time ("refund_deadline", &dc.refund_deadline),
- TALER_JSON_spec_amount ("amount_without_fee", &dc.amount_without_fee),
- GNUNET_JSON_spec_fixed_auto ("coin_pub", &dc.coin_pub),
- GNUNET_JSON_spec_fixed_auto ("merchant_pub", &dc.merchant),
- GNUNET_JSON_spec_fixed_auto ("exchange_sig", &dc.exchange_sig),
- GNUNET_JSON_spec_fixed_auto ("exchange_pub", &dc.exchange_pub),
- GNUNET_JSON_spec_fixed_auto ("master_pub", &es.master_public_key),
- TALER_JSON_spec_absolute_time ("ep_start", &es.ep_start),
- TALER_JSON_spec_absolute_time ("ep_expire", &es.ep_expire),
- TALER_JSON_spec_absolute_time ("ep_end", &es.ep_end),
- GNUNET_JSON_spec_fixed_auto ("master_sig", &es.master_sig),
+ TALER_JSON_spec_absolute_time ("refund_deadline",
+ &dc.refund_deadline),
+ TALER_JSON_spec_amount ("amount_without_fee",
+ TAH_currency,
+ &dc.amount_without_fee),
+ GNUNET_JSON_spec_fixed_auto ("coin_pub",
+ &dc.coin_pub),
+ GNUNET_JSON_spec_fixed_auto ("merchant_pub",
+ &dc.merchant),
+ GNUNET_JSON_spec_fixed_auto ("exchange_sig",
+ &dc.exchange_sig),
+ GNUNET_JSON_spec_fixed_auto ("exchange_pub",
+ &dc.exchange_pub),
+ GNUNET_JSON_spec_fixed_auto ("master_pub",
+ &es.master_public_key),
+ TALER_JSON_spec_absolute_time ("ep_start",
+ &es.ep_start),
+ TALER_JSON_spec_absolute_time ("ep_expire",
+ &es.ep_expire),
+ TALER_JSON_spec_absolute_time ("ep_end",
+ &es.ep_end),
+ GNUNET_JSON_spec_fixed_auto ("master_sig",
+ &es.master_sig),
GNUNET_JSON_spec_end ()
};