httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r934052 - /httpd/httpd/trunk/support/fcgistarter.c
Date Wed, 14 Apr 2010 17:48:51 GMT
Author: trawick
Date: Wed Apr 14 17:48:50 2010
New Revision: 934052

URL: http://svn.apache.org/viewvc?rev=934052&view=rev
Log:
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

Modified:
    httpd/httpd/trunk/support/fcgistarter.c

Modified: httpd/httpd/trunk/support/fcgistarter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/fcgistarter.c?rev=934052&r1=934051&r2=934052&view=diff
==============================================================================
--- httpd/httpd/trunk/support/fcgistarter.c (original)
+++ httpd/httpd/trunk/support/fcgistarter.c Wed Apr 14 17:48:50 2010
@@ -123,14 +123,14 @@ int main(int argc, const char * const ar
         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);



Mime
View raw message