apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: apr_sockaddr_info_get: Posible bug
Date Wed, 20 Nov 2002 12:50:01 GMT
Damir Dezeljin <programing@nib.si> writes:

> Hi.
> 
> > In other words, apr_sockaddr_info_get() failed (which probably means
> > your resolver failed).  What is the return code from
> > apr_sockaddr_info_get()?
> >
> > What version of Linux is this, by the way?
> On WinXP / MS VS.NET
> Return code: 22
> APR err: Invalid argument
> 
> On Linux Debian 3.0 (Woody)
> Return code: 22
> APR err: Invalid argument
> 
> I can't find the snapshot date now, but it is from the past week.
> 
> I noticed this error prior, but I can't figure out which argument is
> invalid.

Silly me, it had nothing to do with OS level...  Look at this part of
the doc for apr_sockaddr_info_get():

 *       APR_IPV4_ADDR_OK          first query for IPv4 addresses; only look
 *                                 for IPv6 addresses if the first query failed;
 *                                 only valid if family is APR_UNSPEC and hostname
 *                                 isn't NULL; mutually exclusive with
 *                                 APR_IPV6_ADDR_OK

That flag is only valid for APR_UNSPEC, but you passed in APR_INET.
Take out that flag (i.e., pass 0 instead).

APR_IPV4_ADDR_OK is used to control what happens when the app doesn't
specify the address family.

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message