httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: EAI_SYSTEM in apr_getaddrinfo()
Date Tue, 29 Jan 2002 12:00:14 GMT
dev@apr is the right list :)

Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com> writes:

> In apr_sockaddr_info_get(), I see this:
> 
>         error = getaddrinfo(hostname, numptr, &hints, &ai_list);
>         if (error) {
>             if (error == EAI_SYSTEM) {
>                 return errno;
>             }

> In my opinion, the "return errno" is wrong: EAI_SYSTEM is not of
> type apr_status_t, so it should be handled just like any other EAI_
> error code. Was there a special reason to treat it differently?

Yes, see the documentation for EAI_SYSTEM.

When getaddrinfo() returns EAI_SYSTEM, the real error code is in
errno.

Compare/contrast with gethostname() cruft where you never knew for
sure whether or not errno had meaningful information.

> Cscope finds no reference to EAI_SYSTEM other than this one,
> not in apr, nor in apr-util or httpd-2.0

It is a system symbol, not an apache.org symbol.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message