Subject: Re: adig.c calls perror()

Re: adig.c calls perror()

From: Ben Greear <greearb_at_candelatech.com>
Date: Tue, 14 Aug 2012 14:23:18 -0700

On 08/14/2012 02:20 PM, Daniel Stenberg wrote:
> 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 think the library shouldn't print anything out. It could instead return
some error code and/or string that the application could deal with as
it sees fit.

But, I don't care that much either way :)

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
Received on 2012-08-14