summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-11-17 14:21:10 +0000
committerAntony Dovgal <tony2001@php.net>2005-11-17 14:21:10 +0000
commita5ecd7d9666d8a2b4c69efe2f929a51f76f1573d (patch)
tree7974951904fa59d1c1882ebbae6bf8e2f889455e
parenta639716fba745cb262796860519778008a00d705 (diff)
downloadphp-git-a5ecd7d9666d8a2b4c69efe2f929a51f76f1573d.tar.gz
MFH: fix #35079 (stream_set_blocking(true) toggles, not enables blocking)
patch by askalski at gmail dot com
-rw-r--r--NEWS2
-rwxr-xr-xmain/streams.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 1c7bd0912e..048a4d002e 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ PHP 4 NEWS
- Added missing safe_mode/open_basedir checks in cURL extension. (Ilia)
- Fixed bug #35257 (Calling ob_flush after creating an ob callback causes
segfault). (Tony)
+- 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 bug #35071 (Wrong fopen mode used in GD safe-mode checks). (Jani)
- Fixed bug #35067, #35063 (key(),current() need to work by reference). (Ilia)
diff --git a/main/streams.c b/main/streams.c
index 37cdf4ad94..267e4f580e 100755
--- a/main/streams.c
+++ b/main/streams.c
@@ -1667,7 +1667,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;