dmitry                                   Wed, 23 Sep 2009 10:25:54 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=288604

Log:
Fixed ext/standard/tests/streams/stream_get_contents_002.phpt

Changed paths:
    U   php/php-src/branches/PHP_5_2/main/streams/xp_socket.c
    U   php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
    U   php/php-src/trunk/main/streams/xp_socket.c

Modified: php/php-src/branches/PHP_5_2/main/streams/xp_socket.c
===================================================================
--- php/php-src/branches/PHP_5_2/main/streams/xp_socket.c       2009-09-23 
08:33:23 UTC (rev 288603)
+++ php/php-src/branches/PHP_5_2/main/streams/xp_socket.c       2009-09-23 
10:25:54 UTC (rev 288604)
@@ -289,7 +289,7 @@
                                if (sock->socket == -1) {
                                        alive = 0;
                                } else if (php_pollfd_for(sock->socket, 
PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
-                                       if (recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) != SOCK_CONN_ERR && php_socket_errno() != EWOULDBLOCK) {
+                                       if (0 >= recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
                                                alive = 0;
                                        }
                                }

Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c       2009-09-23 
08:33:23 UTC (rev 288603)
+++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c       2009-09-23 
10:25:54 UTC (rev 288604)
@@ -289,7 +289,7 @@
                                if (sock->socket == -1) {
                                        alive = 0;
                                } else if (php_pollfd_for(sock->socket, 
PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
-                                       if (recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) != SOCK_CONN_ERR && php_socket_errno() != EWOULDBLOCK) {
+                                       if (0 >= recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
                                                alive = 0;
                                        }
                                }

Modified: php/php-src/trunk/main/streams/xp_socket.c
===================================================================
--- php/php-src/trunk/main/streams/xp_socket.c  2009-09-23 08:33:23 UTC (rev 
288603)
+++ php/php-src/trunk/main/streams/xp_socket.c  2009-09-23 10:25:54 UTC (rev 
288604)
@@ -289,7 +289,7 @@
                                if (sock->socket == -1) {
                                        alive = 0;
                                } else if (php_pollfd_for(sock->socket, 
PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
-                                       if (recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) != SOCK_CONN_ERR && php_socket_errno() != EWOULDBLOCK) {
+                                       if (0 >= recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
                                                alive = 0;
                                        }
                                }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to