summaryrefslogtreecommitdiff
path: root/ext/mysqlnd
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
parent9b6836ebd36eccc9e81ca51e2efe172e1d334f0b (diff)
parentd4f42289ddde002cb4d3ed9d1a4f2219f68df48e (diff)
downloadphp-git-e07feeaf8b91f16a89e9903b461042a0f6a63ac0.tar.gz
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r--ext/mysqlnd/mysqlnd.c4
-rw-r--r--ext/mysqlnd/mysqlnd.h2
2 files changed, 3 insertions, 3 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;
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index 1a23781eb0..aab977d24c 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -29,7 +29,7 @@
#define MYSQLND_STRING_TO_INT_CONVERSION
/*
- This force mysqlnd to do a single (or more depending on ammount of data)
+ This force mysqlnd to do a single (or more depending on amount of data)
non-blocking read() calls before sending a command to the server. Useful
for debugging, if previous function hasn't consumed all the output sent
to it - like stmt_send_long_data() error because the data was larger that