apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/network_io/unix sockaddr.c
Date Tue, 09 Sep 2003 18:37:12 GMT
trawick     2003/09/09 11:37:12

  Modified:    network_io/unix sockaddr.c
  Log:
  work around a problem in current AIX getaddrinfo()
  
  it wasn't needed in previous releases of APR or Apache because
  we didn't call the resolver when hostname was NULL
  
  Revision  Changes    Path
  1.44      +10 -0     apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- sockaddr.c	31 Aug 2003 16:28:55 -0000	1.43
  +++ sockaddr.c	9 Sep 2003 18:37:12 -0000	1.44
  @@ -391,6 +391,16 @@
           /* getaddrinfo according to RFC 2553 must have either hostname
            * or servname non-NULL.
            */
  +#ifdef _AIX
  +        /* But current AIX getaddrinfo() doesn't like servname = "0";
  +         * the "1" won't hurt since we use the port parameter to fill
  +         * in the returned socket addresses later
  +         */
  +        if (!port) {
  +            servname = "1";
  +        }
  +        else
  +#endif
           servname = apr_itoa(p, port);
       }
       error = getaddrinfo(hostname, servname, &hints, &ai_list);
  
  
  

Mime
View raw message