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 19:45:01 GMT
trawick     2003/09/09 12:45:01

  Modified:    network_io/unix Tag: APR_0_9_BRANCH 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
  No                   revision
  No                   revision
  1.43.2.1  +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.43.2.1
  diff -u -r1.43 -r1.43.2.1
  --- sockaddr.c	31 Aug 2003 16:28:55 -0000	1.43
  +++ sockaddr.c	9 Sep 2003 19:45:01 -0000	1.43.2.1
  @@ -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