diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-11-29 01:45:54 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-11-29 01:45:54 +0000 |
commit | 01554bf3e417f13baf7af874e449c265c0309279 (patch) | |
tree | 8aca46ab27a54cea34c14001af774942f0502e39 /ext/mysqlnd/mysqlnd.c | |
parent | 65c8edd525108f6598a8bb25fb3c5d6c80233322 (diff) | |
parent | 719083bd943e6c287c2dcb47918cf51f89a4ac08 (diff) | |
download | php-git-01554bf3e417f13baf7af874e449c265c0309279.tar.gz |
Merge branch 'master' into zppFailOnOverflow
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd.c | 4 |
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; |