apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/network_io/unix sockaddr.c
Date Thu, 14 Aug 2003 17:36:17 GMT
jerenkrantz    2003/08/14 10:36:17

  Modified:    network_io/unix sockaddr.c
  Log:
  If we don't have IPv6 enabled within APR (even if the OS supports it), we
  need to fail over to APR_INET rather than passing APR_UNSPEC.
  
  (Justin tweaked the patch so this code would always execute and add a
  description why we need this because it's not exactly obvious.)
  
  Submitted by: Colm MacCarthaigh <colm@stdlib.net>
  Reviewed by: Justin Erenkrantz
  
  Revision  Changes    Path
  1.41      +11 -1     apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -u -r1.40 -r1.41
  --- sockaddr.c	14 Aug 2003 00:09:28 -0000	1.40
  +++ sockaddr.c	14 Aug 2003 17:36:17 -0000	1.41
  @@ -601,7 +601,17 @@
           }
   #endif
       }
  -    
  +#if !APR_HAVE_IPV6
  +    /* What may happen is that APR is not IPv6-enabled, but we're still
  +     * going to call getaddrinfo(), so we have to tell the OS we only
  +     * want IPv4 addresses back since we won't know what to do with
  +     * IPv6 addresses.
  +     */
  +    if (family == APR_UNSPEC) {
  +        family = APR_INET;
  +    }
  +#endif
  +
       return find_addresses(sa, hostname, family, port, flags, p);
   }
   
  
  
  

Mime
View raw message