]> granicus.if.org Git - apache/commitdiff
stop using apr_sockaddr_port_get() accessor function, as it will
authorJeff Trawick <trawick@apache.org>
Fri, 5 Dec 2003 00:59:29 +0000 (00:59 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 5 Dec 2003 00:59:29 +0000 (00:59 +0000)
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
modules/metadata/mod_ident.c
modules/proxy/proxy_ftp.c
server/listen.c
server/util_script.c
server/vhost.c

index 93dfa8eb35747900d03e1d5a1a51862fb8703cd0..afe17eafb75282929b6e77e99466f50926f829b6 100644 (file)
@@ -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
index 1d19b39dfbb64537b5a3125e15288f090c637617..97475fa015888166d16e7c05df0d9d219c4f3cb9 100644 (file)
@@ -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,
index bd9d9c07b118b11f91c419219433dbc9c7e62e21..f89df59506959f72302112a8652371fb068c2314 100644 (file)
@@ -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)) 
index 3b6c6d8cebafc0dea09af93cd515b4ecfec90205..dac1c14877e1850385f0e4a67bdd08354149eef7 100644 (file)
@@ -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.
              */
index 1c05fedd7b132e1a732d392ceaee8a1c151315e6..c1b8668824e08d5fcf5387e5865d1eeb18f8a749 100644 (file)
@@ -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) {
index 4d83f0e72c18c4c4687b21169cff9014056aff3b..387b7cb45f4ac89a0537f730280ac4ad9925810c 100644 (file)
@@ -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) {