]> granicus.if.org Git - apache/commitdiff
Remove some more references to sockaddr structures...
authorDavid Reid <dreid@apache.org>
Fri, 3 Nov 2000 15:09:16 +0000 (15:09 +0000)
committerDavid Reid <dreid@apache.org>
Fri, 3 Nov 2000 15:09:16 +0000 (15:09 +0000)
Removing the rest will need someone who knows this code to look through
in more detail.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86824 13f79535-47bb-0310-9956-ffa450edef68

server/vhost.c

index 4954c2aaf4dff2247183dde6d480450b12e7c086..b1601a0147abb3bc13af72264a11daaeccecee11 100644 (file)
@@ -854,12 +854,13 @@ static void check_hostalias(request_rec *r)
      *   names we'll match have ports associated with them
      */
     const char *host = r->hostname;
-    unsigned port = ntohs(r->connection->local_addr.sin_port);
+    unsigned port;
     server_rec *s;
     server_rec *last_s;
     name_chain *src;
 
     last_s = NULL;
+    apr_get_local_port(&port, r->connection->client_socket);
 
     /* Recall that the name_chain is a list of server_addr_recs, some of
      * whose ports may not match.  Also each server may appear more than
@@ -913,9 +914,9 @@ static void check_serverpath(request_rec *r)
     server_rec *s;
     server_rec *last_s;
     name_chain *src;
-    /* use AP func here. */
-    unsigned port = ntohs(r->connection->local_addr.sin_port);
-
+    unsigned port;
+    apr_get_local_port(&port, r->connection->client_socket);
+   
     /*
      * This is in conjunction with the ServerPath code in http_core, so we
      * get the right host attached to a non- Host-sending request.