[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: Fix #6375
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: Fix #6375 |
Date: |
Wed, 15 Jul 2020 21:41:13 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 9e92cc60 Fix #6375
9e92cc60 is described below
commit 9e92cc608932abc6caf53dce7cd96984f793f4e3
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jul 15 21:41:09 2020 +0200
Fix #6375
---
src/auditor/report-lib.c | 14 ++++++++------
src/auditor/taler-helper-auditor-wire.c | 4 ----
src/exchange-tools/taler-exchange-keyup.c | 21 ++++-----------------
src/exchange/taler-exchange-aggregator.c | 2 +-
src/exchange/taler-exchange-closer.c | 2 +-
src/util/config.c | 14 ++++++++++++--
6 files changed, 26 insertions(+), 31 deletions(-)
diff --git a/src/auditor/report-lib.c b/src/auditor/report-lib.c
index 0956bcae..4aa8b45b 100644
--- a/src/auditor/report-lib.c
+++ b/src/auditor/report-lib.c
@@ -701,14 +701,16 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle
*c)
return GNUNET_SYSERR;
}
{
- if (GNUNET_OK !=
- TALER_config_get_amount (TALER_ARL_cfg,
- "taler",
- "CURRENCY_ROUND_UNIT",
- &TALER_ARL_currency_round_unit))
+ if ( (GNUNET_OK !=
+ TALER_config_get_amount (TALER_ARL_cfg,
+ "taler",
+ "CURRENCY_ROUND_UNIT",
+ &TALER_ARL_currency_round_unit)) ||
+ ( (0 != TALER_ARL_currency_round_unit.fraction) &&
+ (0 != TALER_ARL_currency_round_unit.value) ) )
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Invalid or missing amount in `TALER' under
`CURRENCY_ROUND_UNIT'\n");
+ "Need non-zero value in section `TALER' under
`CURRENCY_ROUND_UNIT'\n");
return GNUNET_SYSERR;
}
}
diff --git a/src/auditor/taler-helper-auditor-wire.c
b/src/auditor/taler-helper-auditor-wire.c
index 7eb3a047..5e5d1674 100644
--- a/src/auditor/taler-helper-auditor-wire.c
+++ b/src/auditor/taler-helper-auditor-wire.c
@@ -2076,10 +2076,6 @@ run (void *cls,
"TINY_AMOUNT",
&tiny_amount))
{
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
- "auditor",
- "TINY_AMOUNT",
- "invalid amount");
global_ret = 1;
return;
}
diff --git a/src/exchange-tools/taler-exchange-keyup.c
b/src/exchange-tools/taler-exchange-keyup.c
index 0ea661d4..d72c2d35 100644
--- a/src/exchange-tools/taler-exchange-keyup.c
+++ b/src/exchange-tools/taler-exchange-keyup.c
@@ -679,9 +679,6 @@ get_denomination_type_params (const char *ct,
"VALUE",
¶ms->value))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- ct,
- "VALUE");
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
@@ -690,9 +687,6 @@ get_denomination_type_params (const char *ct,
"FEE_WITHDRAW",
¶ms->fee_withdraw))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- ct,
- "FEE_WITHDRAW");
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
@@ -701,9 +695,6 @@ get_denomination_type_params (const char *ct,
"FEE_DEPOSIT",
¶ms->fee_deposit))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- ct,
- "FEE_DEPOSIT");
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
@@ -712,9 +703,6 @@ get_denomination_type_params (const char *ct,
"FEE_REFRESH",
¶ms->fee_refresh))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- ct,
- "FEE_REFRESH");
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
@@ -723,9 +711,6 @@ get_denomination_type_params (const char *ct,
"fee_refund",
¶ms->fee_refund))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- ct,
- "FEE_REFUND");
return GNUNET_SYSERR;
}
@@ -1016,7 +1001,8 @@ create_wire_fee_for_method (void *cls,
af->wire_fee.currency)) )
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Invalid or missing amount for option `%s' in section
`%s'\n",
+ "Need amount with currency `%s' for option `%s' in section
`%s'\n",
+ currency,
opt,
section);
*ret = GNUNET_SYSERR;
@@ -1038,7 +1024,8 @@ create_wire_fee_for_method (void *cls,
af->closing_fee.currency)) )
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Invalid or missing amount for option `%s' in section
`%s'\n",
+ "Need amount with currency `%s' for option `%s' in section
`%s'\n",
+ currency,
opt,
section);
*ret = GNUNET_SYSERR;
diff --git a/src/exchange/taler-exchange-aggregator.c
b/src/exchange/taler-exchange-aggregator.c
index 270a1330..08892800 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -269,7 +269,7 @@ parse_wirewatch_config (void)
(0 != currency_round_unit.value) ) )
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Invalid value specified in section `TALER' under
`CURRENCY_ROUND_UNIT'\n");
+ "Need non-zero value in section `TALER' under
`CURRENCY_ROUND_UNIT'\n");
return GNUNET_SYSERR;
}
diff --git a/src/exchange/taler-exchange-closer.c
b/src/exchange/taler-exchange-closer.c
index 54248943..63d7d4ee 100644
--- a/src/exchange/taler-exchange-closer.c
+++ b/src/exchange/taler-exchange-closer.c
@@ -161,7 +161,7 @@ parse_wirewatch_config (void)
(0 != currency_round_unit.value) ) )
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Invalid value specified in section `TALER' under
`CURRENCY_ROUND_UNIT'\n");
+ "Need non-zero amount in section `TALER' under
`CURRENCY_ROUND_UNIT'\n");
return GNUNET_SYSERR;
}
diff --git a/src/util/config.c b/src/util/config.c
index 160d541f..e533a4ec 100644
--- a/src/util/config.c
+++ b/src/util/config.c
@@ -45,11 +45,21 @@ TALER_config_get_amount (const struct
GNUNET_CONFIGURATION_Handle *cfg,
section,
option,
&str))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ section,
+ option);
return GNUNET_NO;
- if (GNUNET_OK != TALER_string_to_amount (str,
- denom))
+ }
+ if (GNUNET_OK !=
+ TALER_string_to_amount (str,
+ denom))
{
GNUNET_free (str);
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ section,
+ option,
+ "valid amount");
return GNUNET_SYSERR;
}
GNUNET_free (str);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: Fix #6375,
gnunet <=