Subject: Re: A patch to fix nsort initialization

Re: A patch to fix nsort initialization

From: David Drysdale <drysdale_at_google.com>
Date: Thu, 3 Jul 2014 08:00:29 +0100

Shouldn't the line:
  if (channel->nsort > 0)
be:
  if (options->nsort > 0)
instead?

On Wed, Jul 2, 2014 at 6:14 PM, п░п╩п╣п╨я│п╟п╫п╢я─ п■я─п╟я┤п╣п╡я│п╨п╦п╧
<alexander.drachevskiy_at_yandex.ru> wrote:
> Hi,
>
> This patch addresses the bug introduced in commit 803e2a28. The problem it fixes is that after the init_by_options function completes, if the options object has an empty sortlist (nsort == 0), the destination channel's nsort value will still remain -1. The implication is that if 'sortlist' is not present in /etc/resolv.conf, then ares_dup function is pretty useless in that it always entails a costly read of /etc/resolv.conf.
>
> As a side note, the current documentation for the ares_dup function is a bit misleading in its use of the nonexistent ares_dup_options function.
>
> Alexander Drachevskiy
Received on 2014-07-03