helly Sat Sep 13 15:56:40 2003 EDT
Modified files:
/php-src/main/streams streams.c
Log:
Show the whole message when in debug mode
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.36 php-src/main/streams/streams.c:1.37
--- php-src/main/streams/streams.c:1.36 Sat Sep 13 11:27:08 2003
+++ php-src/main/streams/streams.c Sat Sep 13 15:56:38 2003
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.36 2003/09/13 15:27:08 abies Exp $ */
+/* $Id: streams.c,v 1.37 2003/09/13 19:56:38 helly Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -367,8 +367,8 @@
/* it leaked: Lets deliberately NOT pefree it so that the
memory manager shows it
* as leaked; it will log a warning, but lets help it out and
display what kind
* of stream it was. */
- char leakbuf[512];
- snprintf(leakbuf, sizeof(leakbuf), __FILE__ "(%d) : Stream of
type '%s' %p (path:%s) was not closed\n", __LINE__, stream->ops->label, stream,
stream->__orig_path);
+ char *leakinfo;
+ spprintf(&leakinfo, 0, __FILE__ "(%d) : Stream of type '%s' %p
(path:%s) was not closed\n", __LINE__, stream->ops->label, stream,
stream->__orig_path);
if (stream->__orig_path) {
pefree(stream->__orig_path, stream->is_persistent);
@@ -376,10 +376,11 @@
}
# if defined(PHP_WIN32)
- OutputDebugString(leakbuf);
+ OutputDebugString(leakinfo);
# else
- fprintf(stderr, "%s", leakbuf);
+ fprintf(stderr, "%s", leakinfo);
# endif
+ efree(leakinfo);
} else {
if (stream->__orig_path) {
pefree(stream->__orig_path, stream->is_persistent);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php