httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_vhost.c
Date Wed, 08 Nov 2000 12:07:27 GMT
dreid       00/11/08 04:07:27

  Modified:    src/main http_vhost.c
  Log:
  More cleanup of apr_port_t stuff.
  
  This file will need a lot of work as it's using a lot of "raw" information
  from socket structures that won't work with IPv6.  Needs to be abstracted out
  and use APR instead.
  
  Revision  Changes    Path
  1.33      +5 -4      apache-2.0/src/main/http_vhost.c
  
  Index: http_vhost.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_vhost.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- http_vhost.c	2000/11/08 11:48:09	1.32
  +++ http_vhost.c	2000/11/08 12:07:27	1.33
  @@ -184,7 +184,7 @@
    * port is the default port to assume
    */
   static const char *get_addresses(apr_pool_t *p, const char *w_,
  -				 server_addr_rec ***paddr, unsigned port)
  +				 server_addr_rec ***paddr, apr_port_t port)
   {
       struct hostent *hep;
       unsigned long my_addr;
  @@ -389,7 +389,7 @@
   
   
   static apr_inline ipaddr_chain *find_ipaddr(struct in_addr *server_ip,
  -    unsigned port)
  +    apr_port_t port)
   {
       unsigned bucket;
       ipaddr_chain *trav;
  @@ -410,7 +410,7 @@
   }
   
   
  -static ipaddr_chain *find_default_server(unsigned port)
  +static ipaddr_chain *find_default_server(apr_port_t port)
   {
       server_addr_rec *sar;
       ipaddr_chain *trav;
  @@ -975,7 +975,8 @@
   void ap_update_vhost_given_ip(conn_rec *conn)
   {
       ipaddr_chain *trav;
  -    unsigned port = ntohs(conn->local_addr.sin_port);
  +    apr_port_t port;
  +    apr_get_local_port(&port, conn->client_socket);
   
       /* scan the hash apr_table_t for an exact match first */
       trav = find_ipaddr(&conn->local_addr.sin_addr, port);
  
  
  

Mime
View raw message