summaryrefslogtreecommitdiffstats
path: root/server/rfc1413.c
diff options
context:
space:
mode:
authorDavid Reid <dreid@apache.org>2000-11-08 15:47:33 +0100
committerDavid Reid <dreid@apache.org>2000-11-08 15:47:33 +0100
commitee4d19790d413edb7c792db0bdb022a3dbfd1773 (patch)
tree078b75326aff2e4c0c39d50149557d6a9f9ac073 /server/rfc1413.c
parentMore cleanup of apr_port_t stuff. (diff)
downloadapache2-ee4d19790d413edb7c792db0bdb022a3dbfd1773.tar.xz
apache2-ee4d19790d413edb7c792db0bdb022a3dbfd1773.zip
This adds the APR_LOCAL/APR_REMOTE to APR and changes the apr_get/set_port
functions to use it. This is onyl the start and I'll pause a while before I continue in case people really hate this. The patch can be backed out and all evidence will be removed, but I think this makes maintaining/developing the code easier in the long term. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86870 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/rfc1413.c')
-rw-r--r--server/rfc1413.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/rfc1413.c b/server/rfc1413.c
index 9535d9eb0d..a981c77d34 100644
--- a/server/rfc1413.c
+++ b/server/rfc1413.c
@@ -129,7 +129,7 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
* addresses from the query socket.
*/
- apr_set_local_port(sock, ANY_PORT);
+ apr_set_port(sock, APR_LOCAL, ANY_PORT);
apr_set_local_ipaddr(sock, local_ip);
if ((status = apr_bind(sock)) != APR_SUCCESS) {
@@ -142,13 +142,13 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
* errors from connect usually imply the remote machine doesn't support
* the service
*/
- apr_set_remote_port(sock, RFC1413_PORT);
+ apr_set_port(sock, APR_REMOTE, RFC1413_PORT);
apr_set_remote_ipaddr(sock, rmt_ip);
if (apr_connect(sock, NULL) != APR_SUCCESS)
return -1;
- apr_get_local_port(&sav_our_port, sock);
- apr_get_remote_port(&sav_rmt_port, sock);
+ apr_get_port(&sav_our_port, APR_LOCAL, sock);
+ apr_get_port(&sav_rmt_port, APR_REMOTE, sock);
/* send the data */
buflen = apr_snprintf(buffer, sizeof(buffer), "%u,%u\r\n", sav_rmt_port,