From: Antony Dovgal Date: Thu, 17 Nov 2005 14:19:40 +0000 (+0000) Subject: MFH: fix #35079 (stream_set_blocking(true) toggles, not enables blocking) X-Git-Tag: php-5.1.0RC6~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a78dc5fbf54732e9edb27a79dc1116d971adf7f;p=php MFH: fix #35079 (stream_set_blocking(true) toggles, not enables blocking) patch by askalski at gmail dot com --- diff --git a/NEWS b/NEWS index bf2af37a44..19e30e6641 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ PHP NEWS - Fixed bug #35142 (SOAP Client/Server Complex Object Support). (Dmitry) - Fixed bug #35135 (PDOStatment without related PDO object may crash). (Ilia) - Fixed bug #35091 (SoapClient leaks memory). (Dmitry) +- Fixed bug #35079 (stream_set_blocking(true) toggles, not enables + blocking). (askalski at gmail dot com, Tony) - Fixed bug #35078 (configure does not find ldap_start_tls_s). (Jani) - Fixed bugs #35022, #35019 (Regression in the behavior of key() and current() functions). (Ilia) diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 6acb5edc86..83e0e74165 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -540,7 +540,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void flags = fcntl(fd, F_GETFL, 0); oldval = (flags & O_NONBLOCK) ? 0 : 1; if (value) - flags ^= O_NONBLOCK; + flags &= ~O_NONBLOCK; else flags |= O_NONBLOCK;