cvs: php-src /ext/standard streamsfuncs.c

From: Date: Thu, 12 Apr 2007 13:15:18 +0000
Subject: cvs: php-src /ext/standard streamsfuncs.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43845@lists.php.net to get a copy of this message
tony2001 Thu Apr 12 13:15:18 2007 UTC Modified files: /php-src/ext/standard streamsfuncs.c Log: return success only if succeeded casting at least one stream to fd http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.102&r2=1.103&diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.102 php-src/ext/standard/streamsfuncs.c:1.103 --- php-src/ext/standard/streamsfuncs.c:1.102 Mon Apr 9 15:39:16 2007 +++ php-src/ext/standard/streamsfuncs.c Thu Apr 12 13:15:17 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.102 2007/04/09 15:39:16 dmitry Exp $ */ +/* $Id: streamsfuncs.c,v 1.103 2007/04/12 13:15:17 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -620,6 +620,7 @@ zval **elem; php_stream *stream; php_socket_t this_fd; + int cnt = 0; if (Z_TYPE_P(stream_array) != IS_ARRAY) { return 0; @@ -644,9 +645,10 @@ if (this_fd > *max_fd) { *max_fd = this_fd; } + cnt++; } } - return 1; + return cnt ? 1 : 0; } static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC)

« previous php.cvs (#43845) next »