Subject: Re: adig.c calls perror()

Re: adig.c calls perror()

From: Tommie Gannert <tommie_at_spotify.com>
Date: Wed, 15 Aug 2012 08:56:53 +0200

2012/8/14 Daniel Stenberg <daniel_at_haxx.se>:
> On Fri, 10 Aug 2012, Gisle Vanem wrote:
>
>> adig.c calls perror() when select() fail. This doesn't work on Winsock;
>> perror() prints errno string, not WSAGetLastError(). So I suggest we add a
>> new ares_perror() function to ares_strerror.c:
>
>
> Do we really need that function as part of the c-ares API? I realize that
> example is wrong, but is that reason enough to introduce a new function?
>
> Are there others in favor of adding this function?

I don't think it should be public, but printing the right error code
is a good idea. :)

I also agree with Ben that the best thing would be to not print stuff
at all, but that feels like a larger change (not just fixing a bug.)

-- 
Tommie
Received on 2012-08-15