"Daniel Stenberg" <daniel_at_haxx.se> wrote:
>> We could probably just drop perror() in adig.c. And just print the error
>> number from SOCKERRNO.
>
> I quite agree. Care to provide a patch?
Okay:
diff -u3 -Hb -r Git-latest\adig.c .\adig.c
--- Git-latest\adig.c Wed Oct 12 11:43:30 2011
+++ .\adig.c Tue Aug 21 17:51:13 2012
@@ -390,9 +390,9 @@
break;
tvp = ares_timeout(channel, NULL, &tv);
count = select(nfds, &read_fds, &write_fds, NULL, tvp);
- if (count < 0 && SOCKERRNO != EINVAL)
+ if (count < 0 && (status = SOCKERRNO) != EINVAL)
{
- perror("select");
+ printf("select fail: %d", status);
return 1;
}
ares_process(channel, &read_fds, &write_fds);
--gv
Received on 2012-08-21