Fix #6375
This commit is contained in:
parent
8f0a4b6095
commit
9e92cc6089
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user