diff options
Diffstat (limited to 'src/exchange/taler-exchange-aggregator.c')
-rw-r--r-- | src/exchange/taler-exchange-aggregator.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index e9474d89f..0718fdda5 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -603,28 +603,16 @@ exchange_serve_process_config () } { - char *rounding_str; - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "taler", - "CURRENCY_ROUND_UNIT", - &rounding_str)) - { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "No [taler]/CURRENCY_ROUND_UNIT specified, defaulting to '0.01'.\n"); - GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (exchange_currency_string, - ¤cy_round_unit)); - currency_round_unit.fraction = TALER_AMOUNT_FRAC_BASE / 100; - } - else if (GNUNET_OK != - TALER_string_to_amount (rounding_str, - ¤cy_round_unit)) + if ( (GNUNET_OK != + TALER_config_get_amount (cfg, + "taler", + "CURRENCY_ROUND_UNIT", + ¤cy_round_unit)) || + ( (0 != currency_round_unit.fraction) && + (0 != currency_round_unit.value) ) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Invalid amount `%s' specified in `TALER' under `CURRENCY_ROUND_UNIT'\n", - rounding_str); - GNUNET_free (rounding_str); + "Invalid value specified in `TALER' under `CURRENCY_ROUND_UNIT'\n"); return GNUNET_SYSERR; } } |