dmitry Thu May 10 15:21:02 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/sapi/cgi fastcgi.c Log: Fixed bug #41291 (FastCGI does not set SO_REUSEADDR). (fmajid at kefta dot com) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.693&r2=1.2027.2.547.2.694&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.693 php-src/NEWS:1.2027.2.547.2.694 --- php-src/NEWS:1.2027.2.547.2.693 Thu May 10 14:58:17 2007 +++ php-src/NEWS Thu May 10 15:21:02 2007 @@ -16,6 +16,8 @@ - Fixed bug #41304 (compress.zlib temp files left). (Dmitry) - Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no default post handler). (Ilia) +- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR). + (fmajid at kefta dot com, Dmitry) - Fixed gd build when used with freetype 1.x (Pierre, Tony) - Fixed bug #41287 (Namespace functions don't allow xmlns definition to be optional). (Rob) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.24&r2=1.4.2.13.2.25&diff_format=u Index: php-src/sapi/cgi/fastcgi.c diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.24 php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.25 --- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.24 Mon Apr 9 15:39:59 2007 +++ php-src/sapi/cgi/fastcgi.c Thu May 10 15:21:02 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fastcgi.c,v 1.4.2.13.2.24 2007/04/09 15:39:59 dmitry Exp $ */ +/* $Id: fastcgi.c,v 1.4.2.13.2.25 2007/05/10 15:21:02 dmitry Exp $ */ #include "php.h" #include "fastcgi.h" @@ -345,6 +345,13 @@ int listen_socket; sa_t sa; socklen_t sock_len; +#ifdef SO_REUSEADDR +# ifdef _WIN32 + BOOL reuse = 1; +# else + int reuse = 1; +# endif +#endif if ((s = strchr(path, ':'))) { port = atoi(s+1); @@ -434,6 +441,9 @@ /* Create, bind socket and start listen on it */ if ((listen_socket = socket(sa.sa.sa_family, SOCK_STREAM, 0)) < 0 || +#ifdef SO_REUSEADDR + setsockopt(listen_socket, SOL_SOCKET, SO_REUSEADDR, (char*)&reuse, sizeof(reuse)) < 0 || +#endif bind(listen_socket, (struct sockaddr *) &sa, sock_len) < 0 || listen(listen_socket, backlog) < 0) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php