You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@locus.apache.org on 2000/11/03 16:09:18 UTC
cvs commit: apache-2.0/src/main http_vhost.c
dreid 00/11/03 07:09:17
Modified: src/main http_vhost.c
Log:
Remove some more references to sockaddr structures...
Removing the rest will need someone who knows this code to look through
in more detail.
Revision Changes Path
1.30 +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.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- http_vhost.c 2000/10/18 04:48:34 1.29
+++ http_vhost.c 2000/11/03 15:09:16 1.30
@@ -854,12 +854,13 @@
* 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 @@
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.