httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.org>
Subject cvs commit: apache/src/modules/proxy proxy_connect.c proxy_ftp.c proxy_http.c proxy_util.c
Date Sun, 27 Jul 1997 03:13:36 GMT
dgaudet     97/07/26 20:13:35

  Modified:    src       conf.h http_config.c util.c
               src/modules/proxy  proxy_connect.c proxy_ftp.c proxy_http.c
                        proxy_util.c
  Log:
  Add ap_inet_addr.  DGUX doesn't have inet_addr, and we use inet_network
  instead.  This just cleans up a few cases in the code.
  
  Revision  Changes    Path
  1.119     +5 -0      apache/src/conf.h
  
  Index: conf.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/conf.h,v
  retrieving revision 1.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- conf.h	1997/07/27 01:21:41	1.118
  +++ conf.h	1997/07/27 03:13:30	1.119
  @@ -381,6 +381,7 @@
   #define JMP_BUF sigjmp_buf
   /* A lot of SVR4 systems need this */
   #define USE_FCNTL_SERIALIZED_ACCEPT
  +#define ap_inet_addr inet_network
   
   #elif defined(__NetBSD__) || defined(__OpenBSD__)
   #define HAVE_SYS_RESOURCE_H
  @@ -786,6 +787,10 @@
       select((_a), (int *)(_b), (int *)(_c), (int *)(_d), (_e))
   #else
   #define ap_select	select
  +#endif
  +
  +#ifndef ap_inet_addr
  +#define ap_inet_addr inet_addr
   #endif
   
   /* so that we can use inline on some critical functions */
  
  
  
  1.67      +1 -7      apache/src/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- http_config.c	1997/07/27 01:56:03	1.66
  +++ http_config.c	1997/07/27 03:13:30	1.67
  @@ -994,13 +994,7 @@
   	    || strcmp(w, "255.255.255.255") == 0 ) {
   	my_addr = DEFAULT_VHOST_ADDR;
   	is_an_ip_addr = 1;
  -    } else if(
  -#ifdef DGUX
  -	    ( my_addr = inet_network(w) )
  -#else
  -	    ( my_addr = inet_addr(w) )
  -#endif
  -	    != INADDR_NONE ) {
  +    } else if ((my_addr = ap_inet_addr(w)) != INADDR_NONE) {
   	is_an_ip_addr = 1;
       }
       if( is_an_ip_addr ) {
  
  
  
  1.67      +1 -5      apache/src/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- util.c	1997/07/27 02:07:20	1.66
  +++ util.c	1997/07/27 03:13:31	1.67
  @@ -1232,11 +1232,7 @@
   	return htonl(INADDR_ANY);
       }
   	
  -#ifdef DGUX
  -    my_addr = inet_network(w);
  -#else
  -    my_addr = inet_addr(w);
  -#endif
  +    my_addr = ap_inet_addr(w);
       if (my_addr != INADDR_NONE)
       {
   	if (p != NULL) *p = ':';
  
  
  
  1.11      +1 -1      apache/src/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_connect.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- proxy_connect.c	1997/06/29 19:27:23	1.10
  +++ proxy_connect.c	1997/07/27 03:13:33	1.11
  @@ -121,7 +121,7 @@
       }
    
   /* check if ProxyBlock directive on this host */
  -    destaddr.s_addr = inet_addr(host);
  +    destaddr.s_addr = ap_inet_addr(host);
       for (i=0; i < conf->noproxies->nelts; i++)
       {
           if ((npent[i].name != NULL && strstr(host, npent[i].name) != NULL)
  
  
  
  1.27      +1 -1      apache/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- proxy_ftp.c	1997/07/21 03:37:53	1.26
  +++ proxy_ftp.c	1997/07/27 03:13:33	1.27
  @@ -471,7 +471,7 @@
       }
   
   /* check if ProxyBlock directive on this host */
  -    destaddr.s_addr = inet_addr(host);
  +    destaddr.s_addr = ap_inet_addr(host);
       for (i=0; i < conf->noproxies->nelts; i++)
       {
           if ((npent[i].name != NULL && strstr(host, npent[i].name) != NULL)
  
  
  
  1.23      +1 -1      apache/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- proxy_http.c	1997/07/19 08:58:35	1.22
  +++ proxy_http.c	1997/07/27 03:13:33	1.23
  @@ -197,7 +197,7 @@
       }
   
   /* check if ProxyBlock directive on this host */
  -    destaddr.s_addr = inet_addr(desthost);
  +    destaddr.s_addr = ap_inet_addr(desthost);
       for (i=0; i < conf->noproxies->nelts; i++)
       {
           if ((npent[i].name != NULL && strstr(desthost, npent[i].name) != NULL)
  
  
  
  1.22      +3 -3      apache/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- proxy_util.c	1997/07/27 02:21:16	1.21
  +++ proxy_util.c	1997/07/27 03:13:34	1.22
  @@ -245,7 +245,7 @@
   #ifdef WIN32
       if (host[i] == '\0' && (inet_addr(host) == -1))
   #else
  -    if (host[i] == '\0' && (inet_addr(host) == -1 || inet_network(host) == -1))
  +    if (host[i] == '\0' && (ap_inet_addr(host) == -1 || inet_network(host) == -1))
   #endif
       {
   	    return "Bad IP address in URL";
  @@ -790,7 +790,7 @@
   	    return "Host not found";
       } else
       {
  -	ipaddr = inet_addr(host);
  +	ipaddr = ap_inet_addr(host);
   	hp = gethostbyaddr((char *)&ipaddr, sizeof(u_long), AF_INET);
   	if (hp == NULL) {
   	    memset(&hpbuf, 0, sizeof(hpbuf));
  @@ -843,7 +843,7 @@
       unsigned long bits;
   
       /* if the address is given with an explicit netmask, use that */
  -    /* Due to a deficiency in inet_addr(), it is impossible to parse */
  +    /* Due to a deficiency in ap_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: */
  
  
  

Mime
View raw message