From: David Reid Date: Fri, 3 Nov 2000 15:09:16 +0000 (+0000) Subject: Remove some more references to sockaddr structures... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d78ab98b63555f4d26a07574873f3268b33a68b;p=apache Remove some more references to sockaddr structures... 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 --- diff --git a/server/vhost.c b/server/vhost.c index 4954c2aaf4..b1601a0147 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -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.