summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-11-25 08:37:02 +0000
committerkrakjoe <joe.watkins@live.co.uk>2014-11-25 08:37:02 +0000
commite07feeaf8b91f16a89e9903b461042a0f6a63ac0 (patch)
tree4a94cd382fcffefff920f7733562e1860a66cc44 /ext/mysqlnd/mysqlnd.c
parent9b6836ebd36eccc9e81ca51e2efe172e1d334f0b (diff)
parentd4f42289ddde002cb4d3ed9d1a4f2219f68df48e (diff)
downloadphp-git-e07feeaf8b91f16a89e9903b461042a0f6a63ac0.tar.gz
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r--ext/mysqlnd/mysqlnd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 41f34e366a..08a10dbbd1 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -1306,7 +1306,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p
stream = (*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC);
DBG_INF_FMT("conn=%llu stream=%p", (*p)->data->thread_id, stream);
if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
- (void*)&this_fd, 1) && this_fd >= 0) {
+ (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
PHP_SAFE_FD_SET(this_fd, fds);
@@ -1336,7 +1336,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds
stream = (*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC);
DBG_INF_FMT("conn=%llu stream=%p", (*fwd)->data->thread_id, stream);
if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
- (void*)&this_fd, 1) && this_fd >= 0) {
+ (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
if (PHP_SAFE_FD_ISSET(this_fd, fds)) {
if (disproportion) {
*bckwd = *fwd;