]> granicus.if.org Git - php/commitdiff
MFH: Revert fix for 43782, as it caused problems.
authorDavid Soria Parra <dsp@php.net>
Mon, 24 Nov 2008 15:37:33 +0000 (15:37 +0000)
committerDavid Soria Parra <dsp@php.net>
Mon, 24 Nov 2008 15:37:33 +0000 (15:37 +0000)
NEWS
main/streams/streams.c
main/streams/xp_socket.c

diff --git a/NEWS b/NEWS
index 34b84f1534cfb56f13e6efbf157bb5bb1e2d613b..d37db7a86602bb420cccac6ab2d838b233d9bb99 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -269,7 +269,6 @@ PHP                                                                        NEWS
   overlapping needles). (Moriyoshi)
 - Fixed Bug #43958 (class name added into the error message). (Dmitry)
 - Fixed bug #43941 (json_encode silently cuts non-UTF8 strings). (Stas)
-- Fixed bug #43782 (feof() does not detect timeout on socket). (David Soria Parra)
 - Fixed bug #43668 (Added odbc.default_cursortype to control the ODBC
   cursormodel). (Patrick)
 - Fixed bug #43666 (Fixed code to use ODBC 3.52 datatypes for 64bit systems). 
index 747aa4b9180b085da3cfbbc529b6ae25c1334b80..01f6f6e1c40a18262f9da7ba69c5949ebd461a93 100755 (executable)
@@ -641,7 +641,7 @@ PHPAPI int _php_stream_eof(php_stream *stream TSRMLS_DC)
        /* use the configured timeout when checking eof */
        if (!stream->eof && PHP_STREAM_OPTION_RETURN_ERR ==
                        php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS,
-                       -1, NULL)) {
+                       0, NULL)) {
                stream->eof = 1;
        }
 
index e181feb94b16fd4723b13fb59b1266e8ef55f936..5e074a0ca0b579a853a2ae22a9d3de27c434cb0f 100644 (file)
@@ -280,12 +280,8 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void
 
                                if (sock->socket == -1) {
                                        alive = 0;
-                               } else {
-                                       if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
-                                               if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
-                                                       alive = 0;
-                                               }
-                                       } else {
+                               } else if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
+                                       if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
                                                alive = 0;
                                        }
                                }