httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: httpd-2.0/server util.c
Date Fri, 15 Dec 2000 13:29:00 GMT
trawick     00/12/15 05:28:57

  Modified:    include  httpd.h
               server   util.c
  Log:
  Axe ap_get_virthost_addr().  This <address>[:port] parse routine
  is not used anymore and it doesn't handle IPv6, so it is best to
  drop it.  If/when mod_tls (Netware) is ported to 2.0 it can use
  apr_parse_addr_port().
  
  Revision  Changes    Path
  1.125     +0 -10     httpd-2.0/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/httpd.h,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- httpd.h	2000/12/14 18:47:19	1.124
  +++ httpd.h	2000/12/15 13:28:51	1.125
  @@ -1559,16 +1559,6 @@
    */
   char *ap_get_local_host(apr_pool_t *p);
   
  -/**
  - * Parses a host of the form <address>[:port] :port is permitted if 'port' 
  - * is not NULL
  - * @param hostname The hostname to parse
  - * @param port The port found in the hostname
  - * @return The address of the server
  - * @deffunc unsigned long ap_get_virthost_addr(char *hostname, apr_port_t *port)
  - */
  -unsigned long ap_get_virthost_addr(char *hostname, apr_port_t *port);
  -
   /*
    * Redefine assert() to something more useful for an Apache...
    *
  
  
  
  1.84      +0 -53     httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- util.c	2000/12/05 16:18:54	1.83
  +++ util.c	2000/12/15 13:28:57	1.84
  @@ -1845,59 +1845,6 @@
   }
   
   
  -/*
  - * Parses a host of the form <address>[:port]
  - * :port is permitted if 'port' is not NULL
  - */
  -unsigned long ap_get_virthost_addr(char *w, apr_port_t *ports)
  -{
  -    struct hostent *hep;
  -    unsigned long my_addr;
  -    char *p;
  -
  -    p = strchr(w, ':');
  -    if (ports != NULL) {
  -	*ports = 0;
  -	if (p != NULL && strcmp(p + 1, "*") != 0)
  -	    *ports = atoi(p + 1);
  -    }
  -
  -    if (p != NULL)
  -	*p = '\0';
  -    if (strcmp(w, "*") == 0) {
  -	if (p != NULL)
  -	    *p = ':';
  -	return htonl(INADDR_ANY);
  -    }
  -
  -    my_addr = apr_inet_addr((char *)w);
  -    if (my_addr != APR_INADDR_NONE) {
  -	if (p != NULL)
  -	    *p = ':';
  -	return my_addr;
  -    }
  -
  -    hep = gethostbyname(w);
  -
  -    if ((!hep) || (hep->h_addrtype != APR_INET || !hep->h_addr_list[0])) {
  -	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Cannot resolve host
name %s --- exiting!", w);
  -	exit(1);
  -    }
  -
  -    if (hep->h_addr_list[1]) {
  -	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Host %s has multiple
addresses ---", w);
  -	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "you must choose one
explicitly for use as");
  -	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "a virtual host.  Exiting!!!");
  -	exit(1);
  -    }
  -
  -    if (p != NULL)
  -	*p = ':';
  -
  -    return ((struct in_addr *) (hep->h_addr))->s_addr;
  -}
  -
  -
   static char *find_fqdn(apr_pool_t *a, struct hostent *p)
   {
       int x;
  
  
  

Mime
View raw message