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

Contents 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.2 - (show annotations) (download)
Thu Jul 15 16:29:12 2010 UTC (13 years, 10 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Update package

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