iliaa Tue Feb 3 19:23:12 2009 UTC Modified files: /php-src/ext/sockets sockets.c Log: MFB: Return empty string when recv() does not fetch any data http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.209&r2=1.210&diff_format=u Index: php-src/ext/sockets/sockets.c diff -u php-src/ext/sockets/sockets.c:1.209 php-src/ext/sockets/sockets.c:1.210 --- php-src/ext/sockets/sockets.c:1.209 Sat Jan 24 13:09:13 2009 +++ php-src/ext/sockets/sockets.c Tue Feb 3 19:23:12 2009 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c,v 1.209 2009/01/24 13:09:13 tony2001 Exp $ */ +/* $Id: sockets.c,v 1.210 2009/02/03 19:23:12 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1036,6 +1036,9 @@ efree(tmpbuf); RETURN_FALSE; + } else if (!retval) { + efree(tmpbuf); + RETURN_EMPTY_STRING(); } tmpbuf = erealloc(tmpbuf, retval + 1);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php