Re: dns_timeout and dns_retransmit_interval in ms

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 18 Mar 2011 11:18:50 -0600

Hi Christos,

    It just occurred to me that we are now accepting "millisecond" units
for all time-based options, silently rounding millisecond-based values
down if they are not supported. I think we should not allow millisecond
units for options that do not support millisecond resolution (as before
the recent changes).

If you and others agree, please add a boolean "allowMsec" parameter to
parseTimeUnits() and do the T_MILLISECOND_STR check only if allowMsec.

Thank you,

Alex.

> -static int
> +static uint64_t
> parseTimeUnits(const char *unit)
> {
> - if (!strncasecmp(unit, T_SECOND_STR, strlen(T_SECOND_STR)))
> + if (!strncasecmp(unit, T_MILLISECOND_STR, strlen(T_MILLISECOND_STR)))
> return 1;
>
> + if (!strncasecmp(unit, T_SECOND_STR, strlen(T_SECOND_STR)))
> + return 1000;
> +
Received on Fri Mar 18 2011 - 17:19:01 MDT

This archive was generated by hypermail 2.2.0 : Sat Mar 19 2011 - 12:00:03 MDT