[PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo if we run out of fds
Siddhesh Poyarekar
siddhesh@redhat.com
Tue Oct 23 12:14:00 GMT 2012
On Tue, 23 Oct 2012 14:01:48 +0200, Andreas wrote:
> This line is to long, please wrap at 78 characters.
Done.
> > + case EMFILE:
> > + case ENFILE:
> > + h_errno = NETDB_INTERNAL;
>
> No break? In that case, please document that this is intented, e.g.
> say "Fall through"
It's intentional. Added comments in both instances in the updated
patch.
> > + case ECONNREFUSED:
> > + case ETIMEDOUT:
> > + status = NSS_STATUS_UNAVAIL;
> > + break;
> > + default:
> > + status = NSS_STATUS_NOTFOUND;
> > + break;
>
> You're setting it to UNAVAIL also with ETIMEDOUT which wasn't done
> before. Is that correct? It seems to mirror the conditions above
Yes, that is intentional too since this is an incorrect difference in
the _nss_dns_gethostbyname3 and _nss_dns_gethostbyname4 implementations.
Here's an updated patch with fixes based on your suggestions.
Regards,
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr14719.patch
Type: text/x-patch
Size: 2639 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121023/793b641a/attachment.bin>
More information about the Libc-alpha
mailing list