From 07e907f0c23dc9e5d425e9773a3e121e3733aca7 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 5 Dec 2003 00:59:29 +0000 Subject: [PATCH] stop using apr_sockaddr_port_get() accessor function, as it will disappear from APR 1.0 API shortly git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101991 13f79535-47bb-0310-9956-ffa450edef68 --- modules/dav/main/util.c | 2 +- modules/metadata/mod_ident.c | 4 ++-- modules/proxy/proxy_ftp.c | 2 +- server/listen.c | 2 +- server/util_script.c | 2 +- server/vhost.c | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c index 93dfa8eb35..afe17eafb7 100644 --- a/modules/dav/main/util.c +++ b/modules/dav/main/util.c @@ -252,7 +252,7 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r, /* now, verify that the URI uses the same scheme as the current. request. the port must match our port. */ - apr_sockaddr_port_get(&port, r->connection->local_addr); + port = r->connection->local_addr->port; if (strcasecmp(comp.scheme, scheme) != 0 #ifdef APACHE_PORT_HANDLING_IS_BUSTED || comp.port != port diff --git a/modules/metadata/mod_ident.c b/modules/metadata/mod_ident.c index 1d19b39dfb..97475fa015 100644 --- a/modules/metadata/mod_ident.c +++ b/modules/metadata/mod_ident.c @@ -210,8 +210,8 @@ static apr_status_t rfc1413_query(apr_socket_t *sock, conn_rec *conn, char user[RFC1413_USERLEN + 1]; /* XXX */ apr_size_t buflen; - apr_sockaddr_port_get(&sav_our_port, conn->local_addr); - apr_sockaddr_port_get(&sav_rmt_port, conn->remote_addr); + sav_our_port = conn->local_addr->port; + sav_rmt_port = conn->remote_addr->port; /* send the data */ buflen = apr_snprintf(buffer, sizeof(buffer), "%hu,%hu\r\n", sav_rmt_port, diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c index bd9d9c07b1..f89df59506 100644 --- a/modules/proxy/proxy_ftp.c +++ b/modules/proxy/proxy_ftp.c @@ -1412,7 +1412,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, return HTTP_INTERNAL_SERVER_ERROR; } apr_socket_addr_get(&local_addr, APR_LOCAL, sock); - apr_sockaddr_port_get(&local_port, local_addr); + local_port = local_addr->port; apr_sockaddr_ip_get(&local_ip, local_addr); if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one)) diff --git a/server/listen.c b/server/listen.c index 3b6c6d8ceb..dac1c14877 100644 --- a/server/listen.c +++ b/server/listen.c @@ -244,7 +244,7 @@ static const char *alloc_listener(process_rec *process, char *addr, apr_port_t p ap_listen_rec *new; apr_port_t oldport; - apr_sockaddr_port_get(&oldport, sa); + oldport = sa->port; /* If both ports are equivalent, then if their names are equivalent, * then we will re-use the existing record. */ diff --git a/server/util_script.c b/server/util_script.c index 1c05fedd7b..c1b8668824 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -280,7 +280,7 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r) apr_table_addn(e, "SERVER_ADMIN", s->server_admin); /* Apache */ apr_table_addn(e, "SCRIPT_FILENAME", r->filename); /* Apache */ - apr_sockaddr_port_get(&rport, c->remote_addr); + rport = c->remote_addr->port; apr_table_addn(e, "REMOTE_PORT", apr_itoa(r->pool, rport)); if (r->user) { diff --git a/server/vhost.c b/server/vhost.c index 4d83f0e72c..387b7cb45f 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -913,7 +913,7 @@ static void check_hostalias(request_rec *r) last_s = NULL; - apr_sockaddr_port_get(&port, r->connection->local_addr); + port = r->connection->local_addr->port; /* 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 @@ -969,7 +969,7 @@ static void check_serverpath(request_rec *r) name_chain *src; apr_port_t port; - apr_sockaddr_port_get(&port, r->connection->local_addr); + port = r->connection->local_addr->port; /* * This is in conjunction with the ServerPath code in http_core, so we @@ -1044,7 +1044,7 @@ AP_DECLARE(void) ap_update_vhost_given_ip(conn_rec *conn) /* maybe there's a default server or wildcard name-based vhost * matching this port */ - apr_sockaddr_port_get(&port, conn->local_addr); + port = conn->local_addr->port; trav = find_default_server(port); if (trav) { -- 2.50.1