Hi Jukka,

On Tue, May 15, 2012 at 3:45 PM, Jukka Rissanen <
[email protected]> wrote:

> Hi Elena,
>
>
> On 05/15/2012 03:37 PM, Elena Tebesoi wrote:
>
>> Hi Jukka,
>>
>> Thank you for the quick review and please find my answers inline.
>> A new version of the patch is due, taking into account your suggestions.
>>
>> Regards,
>> Elena
>>
>> On Mon, May 14, 2012 at 2:21 PM, Jukka Rissanen
>> <[email protected].**com <[email protected]><mailto:
>> jukka.rissanen@linux.**intel.com <[email protected]>>>
>>
>>
>         connman_resolver_append___**lifetime(const char *interface, const
>>        char *domain,
>>                                return 0;
>>                        }
>>
>>        -               entry->timeout = g_timeout_add_seconds(__**
>> lifetime,
>>
>>        -
>>        resolver_expire_cb, entry);
>>        +               interval = floor(lifetime *
>>        +
>>        RESOLVER_LIFETIME_REFRESH___**THRESHOLD);
>>
>>
>>
>>    Do we really need to use floor() here? What about just
>>
>>            interval = lifetime * RESOLVER_LIFETIME_REFRESH___**THRESHOLD;
>>
>>
>>    The lifetime > 0 so we cannot have negative interval anyway.
>>
>>
>> [ElenaT] What I tried with floor and ceil is to split the lifetime into
>> two intervals without losing additional 1second with conversion from
>> floating point to integer.
>> RESOLVER_LIFETIME_REFRESH_**THRESHOLD is floating point here.
>>
>>
> Yes, I know. In this case you do not need to call floor() because interval
> is integer, the result of lifetime * RESOLVER_..._THRESHOLD will do the
> floor automagically for you (the value is truncated).
>
[ElenaT] Agree :)


>
>
> Cheers,
> Jukka
>
>
Regards,

Elena
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to