Re: dns_timeout and dns_retransmit_interval in ms

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Fri, 18 Mar 2011 21:07:37 +0200

On 03/18/2011 07:18 PM, Alex Rousskov wrote:
> 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).

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

I will make a fix...

>
> 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 - 19:07:48 MDT

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