From: Jeff Trawick Date: Tue, 12 Mar 2002 23:15:54 +0000 (+0000) Subject: simplify the way we find the family of an apr_sockaddr_t X-Git-Tag: CHANGES~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53d837b39bae6fc8f5cf0b817f8c629c41d031f7;p=apache simplify the way we find the family of an apr_sockaddr_t git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93884 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/listen.c b/server/listen.c index 24924c39c6..6d7eb686b6 100644 --- a/server/listen.c +++ b/server/listen.c @@ -272,7 +272,7 @@ static void alloc_listener(process_rec *process, char *addr, apr_port_t port) return; } if ((status = apr_socket_create(&new->sd, - new->bind_addr->sa.sin.sin_family, + new->bind_addr->family, SOCK_STREAM, process->pool)) != APR_SUCCESS) { ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool, diff --git a/server/mpm/beos/beos.c b/server/mpm/beos/beos.c index c424f8cba4..ff9dad00d4 100644 --- a/server/mpm/beos/beos.c +++ b/server/mpm/beos/beos.c @@ -782,7 +782,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) "couldn't create control socket information, shutting down"); return 1; } - if (apr_socket_create(&udp_sock, udp_sa->sa.sin.sin_family, SOCK_DGRAM, + if (apr_socket_create(&udp_sock, udp_sa->family, SOCK_DGRAM, _pconf) != APR_SUCCESS){ ap_log_error(APLOG_MARK, APLOG_ALERT, errno, s, "couldn't create control socket, shutting down"); diff --git a/server/mpm/mpmt_os2/mpmt_os2.c b/server/mpm/mpmt_os2/mpmt_os2.c index bf2f4cc0e2..96ba77a23b 100644 --- a/server/mpm/mpmt_os2/mpmt_os2.c +++ b/server/mpm/mpmt_os2/mpmt_os2.c @@ -181,7 +181,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) ap_listeners = lr; apr_sockaddr_info_get(&lr->bind_addr, "0.0.0.0", APR_UNSPEC, DEFAULT_HTTP_PORT, 0, s->process->pool); - apr_socket_create(&lr->sd, lr->bind_addr->sa.sin.sin_family, + apr_socket_create(&lr->sd, lr->bind_addr->family, SOCK_STREAM, s->process->pool); } diff --git a/support/ab.c b/support/ab.c index bd84d0c4b2..3d2de47ac5 100644 --- a/support/ab.c +++ b/support/ab.c @@ -849,7 +849,7 @@ static void start_connect(struct connection * c) apr_pool_destroy(c->ctx); apr_pool_create(&c->ctx, cntxt); - if ((rv = apr_socket_create(&c->aprsock, destsa->sa.sin.sin_family, + if ((rv = apr_socket_create(&c->aprsock, destsa->family, SOCK_STREAM, c->ctx)) != APR_SUCCESS) { apr_err("socket", rv); } @@ -1302,14 +1302,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.87 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.88 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_SERVER_BASEREVISION, "$Revision: 1.87 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_SERVER_BASEREVISION, "$Revision: 1.88 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/
\n"); printf("

\n

\n");