httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sa_common.c
Date Thu, 09 Nov 2000 20:28:01 GMT
Maybe I wasn't clear. You are assigned to the local variable. Shouldn't
there be an indirection in there to actually return a value to the caller?

Cheers,
-g

On Thu, Nov 09, 2000 at 08:07:25PM -0000, David Reid wrote:
> No, but it's actually what we use at the moment!
> 
> Until we adding wider support it'll do for the time being...  not ideal I
> agree, but at least it moves forward...
> 
> Commit then improve?
> 
> david
> ----- Original Message -----
> From: "Greg Stein" <gstein@lyra.org>
> To: <new-httpd@apache.org>
> Sent: Thursday, November 09, 2000 7:28 PM
> Subject: Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sa_common.c
> 
> 
> > On Thu, Nov 09, 2000 at 04:05:26PM -0000, dreid@locus.apache.org wrote:
> > > dreid       00/11/09 08:05:25
> > >
> > >   Added:       src/lib/apr/network_io/unix sa_common.c
> > >...
> > >   apr_status_t apr_get_inaddr(apr_in_addr *addr, char *hostname)
> > >   {
> > >       struct hostent *he;
> > >
> > >       if (strcmp(hostname,"*") == 0){
> > >           addr->s_addr = htonl(INADDR_ANY);
> > >           return APR_SUCCESS;
> > >       }
> > >       if ((addr->s_addr = apr_inet_addr(hostname)) != INADDR_NONE)
> > >           return APR_SUCCESS;
> > >
> > >       /* hmmm, it's not a numeric IP address so we need to look it up
> ( */
> > >       he = gethostbyname(hostname);
> > >       if (!he || he->h_addrtype != AF_INET || !he->h_addr_list[0])
> > >           return (h_errno + APR_OS_START_SYSERR);
> > >
> > >       addr = (struct in_addr*)he->h_addr_list[0];
> >
> > That last line there isn't going to be very helpful :-)
> >
> > Cheers,
> > -g
> >
> > --
> > Greg Stein, http://www.lyra.org/
> >

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message