apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@apache.org>
Subject Re: cvs commit: apr/network_io/win32 sockets.c
Date Sun, 27 Oct 2002 03:52:40 GMT
FWIW, somehow this patch breaks Win32 with APR_HAVE_IPV6.

The Apache service named  reported the following error:
>>> [Sat Oct 26 22:45:29 2002] [crit] (OS 11001)No such host is known.  : alloc_listener:
failed to set up sockaddr for ::     .

No time to debug now... a dozen overdue assignments.  Just wanted
to pass on a heads up and invite folks to look at this.

Bill

>trawick     2002/10/25 10:15:37
>
>  Modified:    .        CHANGES
>               include/arch/os2 networkio.h
>               include/arch/unix networkio.h
>               include/arch/win32 networkio.h
>               network_io/os2 sockets.c
>               network_io/unix sa_common.c sockaddr.c sockets.c
>               network_io/win32 sockets.c
>  Log:
>  Fix a problem retrieving the remote socket address for sockets
>  created via apr_os_sock_put() or apr_s_sock_make()
>  
>  1.69      +7 -0      apr/network_io/unix/sa_common.c
>  
>  Index: sa_common.c
>  ===================================================================
>  RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
>  retrieving revision 1.68
>  retrieving revision 1.69
>  diff -u -r1.68 -r1.69
>  --- sa_common.c       15 Oct 2002 12:27:38 -0000      1.68
>  +++ sa_common.c       25 Oct 2002 17:15:37 -0000      1.69
>  @@ -209,6 +209,13 @@
>           *sa = sock->local_addr;
>       }
>       else if (which == APR_REMOTE) {
>  +        if (sock->remote_addr_unknown) {
>  +            apr_status_t rv = get_remote_addr(sock);
>  +
>  +            if (rv != APR_SUCCESS) {
>  +                return rv;
>  +            }
>  +        }
>           *sa = sock->remote_addr;
>       }
>       else {
>  
>  1.91      +4 -0      apr/network_io/win32/sockets.c
>  
>  Index: sockets.c
>  ===================================================================
>  RCS file: /home/cvs/apr/network_io/win32/sockets.c,v
>  retrieving revision 1.90
>  retrieving revision 1.91
>  diff -u -r1.90 -r1.91
>  --- sockets.c 22 Oct 2002 03:35:47 -0000      1.90
>  +++ sockets.c 25 Oct 2002 17:15:37 -0000      1.91
>  @@ -451,6 +451,9 @@
>           /* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
>           (*apr_sock)->remote_addr->port = ntohs((*apr_sock)->remote_addr->sa.sin.sin_port);
>       }
>  +    else {
>  +        (*apr_sock)->remote_addr_unknown = 1;
>  +    }
>           
>       apr_pool_cleanup_register((*apr_sock)->cntxt, (void *)(*apr_sock), 
>                           socket_cleanup, apr_pool_cleanup_null);
>  @@ -471,6 +474,7 @@
>           (*sock)->disconnected = 0;
>       }
>       (*sock)->local_port_unknown = (*sock)->local_interface_unknown = 1;
>  +    (*sock)->remote_addr_unknown = 1;
>       (*sock)->socketdes = *thesock;
>       return APR_SUCCESS;
>   }


Mime
View raw message