This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/15726] getaddrinfo() error codes


http://sourceware.org/bugzilla/show_bug.cgi?id=15726

--- Comment #2 from Kurt Roeckx <kurt at roeckx dot be> ---
(In reply to Andreas Schwab from comment #1)
> EAI_FAIL is only returned for an erroneous answer.  A negative answer is not
> erroneous.

I'm not sure what you're trying to say here.  I never said something about what
I think an erroneous answer should return.  But I can understand both EAI_FAIL
and EAI_AGAIN as valid return code for that case.

But that has nothing to do with what a negative answer should have as return
value.  And clearly EAI_NONAME is the wrong thing to return for any of the
cases I've mentioned that it currently returns it.

It should only return EAI_NONAME in case of:
- AI_NUMERICHOST was used and nodename is not a numeric string representing an
address.
- AI_NUMERICSERV was used and servname is not a numeric string representing a
port
- Both nodename and servname are NULL

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]