]> granicus.if.org Git - php/commitdiff
MFH:- Fixed bugs #36796, #36918, #41371 (stream_set_blocking() does not work)
authorJani Taskinen <jani@php.net>
Tue, 17 Jul 2007 13:28:44 +0000 (13:28 +0000)
committerJani Taskinen <jani@php.net>
Tue, 17 Jul 2007 13:28:44 +0000 (13:28 +0000)
NEWS
main/streams/xp_socket.c

diff --git a/NEWS b/NEWS
index 72922d76946cbdfb3a354d793368e4d851262613..093db1650476df43bb5523263e46b07deb725046 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -154,6 +154,8 @@ PHP                                                                        NEWS
   apache child die). (isk at ecommerce dot com, Gopal, Tony)
 - Fixed bug #39291 (ldap_sasl_bind() misses the sasl_authc_id parameter).
   (diafour at gmail dot com, Jani)
+- Fixed bugs #36796, #36918, #41371 (stream_set_blocking() does not work).
+  (Jani)
 - Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present).
   (Jani)
 
index 57b231be1df768c9e6b517bbe827d1916fab95be..e502489e3ad9dc0a0ed6d2f90d7c972b59a42d0e 100644 (file)
@@ -281,18 +281,11 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void
                        }
                        
                case PHP_STREAM_OPTION_BLOCKING:
-       
                        oldmode = sock->is_blocked;
-       
-                       /* no need to change anything */
-                       if (value == oldmode)
-                               return oldmode;
-       
                        if (SUCCESS == php_set_sock_blocking(sock->socket, value TSRMLS_CC)) {
                                sock->is_blocked = value;
                                return oldmode;
                        }
-
                        return PHP_STREAM_OPTION_RETURN_ERR;
 
                case PHP_STREAM_OPTION_READ_TIMEOUT:
@@ -751,11 +744,8 @@ static int php_tcp_sockop_set_option(php_stream *stream, int option, int value,
                                        /* fall through */
                                        ;
                        }
-                       
-                       /* fall through */
-               default:
-                       return php_sockop_set_option(stream, option, value, ptrparam TSRMLS_CC);
        }
+       return php_sockop_set_option(stream, option, value, ptrparam TSRMLS_CC);
 }