diff options
author | Jeff Trawick <trawick@apache.org> | 2010-04-14 17:48:50 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2010-04-14 17:48:50 +0000 |
commit | 4b9acfe62656f3475f12cbf449ad6aa4d80f3957 (patch) | |
tree | 5b1f1955025363cd9412ede5a961e098be7d57aa /support/fcgistarter.c | |
parent | 8fa54a82f4acc5d2694b176431232b7634fabe5b (diff) | |
download | httpd-4b9acfe62656f3475f12cbf449ad6aa4d80f3957.tar.gz |
build the socket address first, then get a matching socket
that resolves an issue where sockaddr_get would return an
AF_INET6/IPv6 address that we'd try to bind to an AF_INET/IPv4
socket
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@934052 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/fcgistarter.c')
-rw-r--r-- | support/fcgistarter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/support/fcgistarter.c b/support/fcgistarter.c index 6eff391392..2e2c3e5662 100644 --- a/support/fcgistarter.c +++ b/support/fcgistarter.c @@ -123,14 +123,14 @@ int main(int argc, const char * const argv[]) usage(); } - rv = apr_socket_create(&skt, APR_INET, SOCK_STREAM, APR_PROTO_TCP, pool); + rv = apr_sockaddr_info_get(&skaddr, interface, APR_UNSPEC, port, 0, pool); if (rv) { - exit_error(rv, "apr_socket_create"); + exit_error(rv, "apr_sockaddr_info_get"); } - rv = apr_sockaddr_info_get(&skaddr, interface, APR_UNSPEC, port, 0, pool); + rv = apr_socket_create(&skt, skaddr->family, SOCK_STREAM, APR_PROTO_TCP, pool); if (rv) { - exit_error(rv, "apr_sockaddr_info_get"); + exit_error(rv, "apr_socket_create"); } rv = apr_socket_bind(skt, skaddr); |