Subject: A patch to fix nsort initialization

A patch to fix nsort initialization

From: Александр Драчевский <alexander.drachevskiy_at_yandex.ru>
Date: Wed, 02 Jul 2014 21:14:38 +0400

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-02