apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [patch] apr_sockaddr_port_get broken
Date Fri, 05 Apr 2002 22:09:42 GMT
Ryan Morgan <rmorgan@covalent.net> writes:

> On Fri, Apr 05, 2002 at 04:42:33PM -0500, Jeff Trawick wrote:
> > Ryan Morgan <rmorgan@covalent.net> writes:
> > 
> > > The cleanup of the unix networking code a while back has broken 
> > > apr_sockaddr_port_get when 0 is specifed as the port to bind() to.  This
> > > is because we now grab the port from sockaddr->port rather than the
> > > actual sockaddr.  (sockaddr->port is never updated after 
> > > apr_sockaddr_port_set is called).
> > 
> > I would think that the better fix is to update sockaddr->port.
> > 
> > Can you try this instead (need win32 and os/2 flavors as well :( )?
> 
> Ah, much better.  That fixes the problem for me.  (And should fix win32
> and os/2 since they all use the same apr_socket_addr_get, correct?)

These few lines of code are OS-specific, unfortunately.  But there are
two versions, not three.  It turns out that OS/2 uses the Unix code
for this.

I'll commit the Unix code you tested and the identical Win32 code in
just a sec.

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

Mime
View raw message