httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0/server listen.c
Date Mon, 25 Aug 2003 16:00:49 GMT
jorton      2003/08/25 09:00:49

  Modified:    server   listen.c
  Log:
  * listen.c (ap_listen_open): Avoid casts when checking for :: and
  0.0.0.0 to fix build on FreeBSD 4.2, and fix logic.
  
  Reviewed by: Colm MacCarthaigh
  
  Revision  Changes    Path
  1.91      +5 -5      httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -u -r1.90 -r1.91
  --- listen.c	24 Aug 2003 22:43:36 -0000	1.90
  +++ listen.c	25 Aug 2003 16:00:49 -0000	1.91
  @@ -355,11 +355,11 @@
                */
               if (previous != NULL &&
                   lr->bind_addr->family == APR_INET &&
  -                *((in_addr_t *)lr->bind_addr->ipaddr_ptr) == INADDR_ANY &&
  +                lr->bind_addr->sa.sin.sin_addr.s_addr == INADDR_ANY &&
                   lr->bind_addr->port == previous->bind_addr->port &&
                   previous->bind_addr->family == APR_INET6 &&
                   IN6_IS_ADDR_UNSPECIFIED(
  -                        (struct in6_addr*)(previous->bind_addr->ipaddr_ptr)) &&
  +                    &previous->bind_addr->sa.sin6.sin6_addr) &&
                   apr_socket_opt_get(previous->sd, APR_IPV6_V6ONLY,
                                      &v6only_setting) == APR_SUCCESS &&
                   v6only_setting == 0) {
  @@ -382,10 +382,10 @@
                    */
                   if (lr->next != NULL && lr->bind_addr->family == APR_INET6
&&
                       IN6_IS_ADDR_UNSPECIFIED(
  -                        (struct in6_addr*)(previous->bind_addr->ipaddr_ptr)) &&
  +                        &lr->bind_addr->sa.sin6.sin6_addr) &&
                       lr->bind_addr->port == lr->next->bind_addr->port &&
  -                    *((in_addr_t *)lr->next->bind_addr->ipaddr_ptr)
  -                    == INADDR_ANY) {
  +                    lr->next->bind_addr->family == APR_INET && 
  +                    lr->next->bind_addr->sa.sin.sin_addr.s_addr == INADDR_ANY)
{
   
                       /* Remove the current listener from the list */
                       if (previous) {
  
  
  

Mime
View raw message