@@ -1225,6 +1225,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, reap_query)(MYSQLND_CONN_DATA * conn TSRMLS_DC
1225
1225
1226
1226
#include "php_network.h"
1227
1227
1228
+ /* {{{ mysqlnd_stream_array_to_fd_set */
1228
1229
MYSQLND * * mysqlnd_stream_array_check_for_readiness (MYSQLND * * conn_array TSRMLS_DC )
1229
1230
{
1230
1231
int cnt = 0 ;
@@ -1255,15 +1256,17 @@ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array TSRMLS
1255
1256
}
1256
1257
return ret ;
1257
1258
}
1259
+ /* }}} */
1258
1260
1259
1261
1260
- /* {{{ stream_select mysqlnd_stream_array_to_fd_set functions */
1262
+ /* {{{ mysqlnd_stream_array_to_fd_set */
1261
1263
static int mysqlnd_stream_array_to_fd_set (MYSQLND * * conn_array , fd_set * fds , php_socket_t * max_fd TSRMLS_DC )
1262
1264
{
1263
1265
php_socket_t this_fd ;
1264
1266
php_stream * stream = NULL ;
1265
- int cnt = 0 ;
1267
+ unsigned int cnt = 0 ;
1266
1268
MYSQLND * * p = conn_array ;
1269
+ DBG_ENTER ("mysqlnd_stream_array_to_fd_set" );
1267
1270
1268
1271
while (* p ) {
1269
1272
/* get the fd.
@@ -1272,6 +1275,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p
1272
1275
* is not displayed.
1273
1276
* */
1274
1277
stream = (* p )-> data -> net -> data -> m .get_stream ((* p )-> data -> net TSRMLS_CC );
1278
+ DBG_INF_FMT ("conn=%llu stream=%p" , (* p )-> data -> thread_id , stream );
1275
1279
if (stream != NULL && SUCCESS == php_stream_cast (stream , PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL ,
1276
1280
(void * )& this_fd , 1 ) && this_fd >= 0 ) {
1277
1281
@@ -1284,21 +1288,24 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p
1284
1288
}
1285
1289
p ++ ;
1286
1290
}
1287
- return cnt ? 1 : 0 ;
1291
+ DBG_RETURN ( cnt ? 1 : 0 ) ;
1288
1292
}
1293
+ /* }}} */
1294
+
1289
1295
1296
+ /* {{{ mysqlnd_stream_array_from_fd_set */
1290
1297
static int mysqlnd_stream_array_from_fd_set (MYSQLND * * conn_array , fd_set * fds TSRMLS_DC )
1291
1298
{
1292
1299
php_socket_t this_fd ;
1293
1300
php_stream * stream = NULL ;
1294
1301
int ret = 0 ;
1295
1302
zend_bool disproportion = FALSE;
1296
-
1297
-
1298
1303
MYSQLND * * fwd = conn_array , * * bckwd = conn_array ;
1304
+ DBG_ENTER ("mysqlnd_stream_array_from_fd_set" );
1299
1305
1300
1306
while (* fwd ) {
1301
1307
stream = (* fwd )-> data -> net -> data -> m .get_stream ((* fwd )-> data -> net TSRMLS_CC );
1308
+ DBG_INF_FMT ("conn=%llu stream=%p" , (* fwd )-> data -> thread_id , stream );
1302
1309
if (stream != NULL && SUCCESS == php_stream_cast (stream , PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL ,
1303
1310
(void * )& this_fd , 1 ) && this_fd >= 0 ) {
1304
1311
if (PHP_SAFE_FD_ISSET (this_fd , fds )) {
@@ -1316,7 +1323,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds
1316
1323
}
1317
1324
* bckwd = NULL ;/* NULL-terminate the list */
1318
1325
1319
- return ret ;
1326
+ DBG_RETURN ( ret ) ;
1320
1327
}
1321
1328
/* }}} */
1322
1329
0 commit comments