/[smecontribs]/rpms/php5-cgi/contribs7/php-4.3.8-fdsetsize.patch
ViewVC logotype

Annotation of /rpms/php5-cgi/contribs7/php-4.3.8-fdsetsize.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Mar 4 14:52:52 2009 UTC (15 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: php5-cgi-5_2_8-2_el4_sme, php5-cgi-5_3_0-2_el4_sme, php5-cgi-5_2_8-1_el4_sme
Initial import of php5-cgi

1 slords 1.1 Add three FD_SETSIZE changes to main/network.c (#125258)
2    
3     --- php-4.3.8/main/network.c.fdsetsize
4     +++ php-4.3.8/main/network.c
5     @@ -287,7 +287,7 @@
6     fd_set wset;
7     fd_set eset;
8    
9     - if (timeout == NULL) {
10     + if (timeout == NULL || sockfd > FD_SETSIZE) {
11     /* blocking mode */
12     return connect(sockfd, addr, addrlen);
13     }
14     @@ -1010,6 +1010,8 @@
15     int retval;
16     struct timeval timeout, *ptimeout;
17    
18     + if (sock->socket > FD_SETSIZE) return;
19     +
20     FD_ZERO(&fdr);
21     FD_SET(sock->socket, &fdr);
22     sock->timeout_event = 0;
23     @@ -1187,6 +1189,8 @@
24     struct timeval tv = {0, 0};
25     char buf;
26    
27     + if (fd > FD_SETSIZE) return 1;
28     +
29     /* logic: if the select call indicates that there is data to
30     * be read, but a read returns 0 bytes of data, then the socket
31     * has been closed.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed