You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by or...@apache.org on 2001/08/01 07:50:29 UTC

cvs commit: httpd-proxy/module-2.0 proxy_util.c

orlikowski    01/07/31 22:50:29

  Modified:    module-2.0 proxy_util.c
  Log:
  inet_addr and inet_network are not interchangable.
  Furthermore, use apr_inet_addr, rather than ap_inet_addr (though they map
  to the same thing).
  
  Revision  Changes    Path
  1.67      +2 -6      httpd-proxy/module-2.0/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_util.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- proxy_util.c	2001/07/31 19:19:34	1.66
  +++ proxy_util.c	2001/08/01 05:50:29	1.67
  @@ -276,11 +276,7 @@
   	if (!apr_isdigit(host[i]) && host[i] != '.')
   	    break;
       /* must be an IP address */
  -#if defined(WIN32) || defined(NETWARE) || defined(TPF) || defined(BEOS)
  -    if (host[i] == '\0' && (inet_addr(host) == -1))
  -#else
  -    if (host[i] == '\0' && (ap_inet_addr(host) == -1 || inet_network(host) == -1))
  -#endif
  +    if (host[i] == '\0' && (apr_inet_addr(host) == -1))
       {
   	return "Bad IP address in URL";
       }
  @@ -630,7 +626,7 @@
       long bits;
   
       /* if the address is given with an explicit netmask, use that */
  -    /* Due to a deficiency in ap_inet_addr(), it is impossible to parse */
  +    /* Due to a deficiency in apr_inet_addr(), it is impossible to parse */
       /* "partial" addresses (with less than 4 quads) correctly, i.e.  */
       /* 192.168.123 is parsed as 192.168.0.123, which is not what I want. */
       /* I therefore have to parse the IP address manually: */