Subject: Re: [Patch] ares_process.c

Re: [Patch] ares_process.c

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 26 Jun 2012 23:11:26 +0200 (CEST)

On Tue, 26 Jun 2012, Gisle Vanem wrote:

> I can see that recvfrom() in ares_process.c many times is called
> with 'udp_socket' == ARES_SOCKET_BAD. I think I see why:
>
> ..check for ARES_SOCKET_BAD in outer server-loop...

but...

> count = recvfrom(server->udp_socket ...)
> ...
> process_answer(channel, buf, (int)count, i, 0, now);
> } while (count > 0);

... doesn't a bad socket make count turn negative when recvfrom() detects
that?

-- 
  / daniel.haxx.se
Received on 2012-06-26