summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_debug.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-02-11 16:44:48 +0000
committerAndrey Hristov <andrey@php.net>2008-02-11 16:44:48 +0000
commitcf07e941f10a2ce263b3888e8b8950b17d0e21e5 (patch)
treea07b007c8cadf50896375d8c76e42ce2129ec504 /ext/mysqlnd/mysqlnd_debug.c
parent80861c001e4cee45b2f405bec0474ba431cfc4f1 (diff)
downloadphp-git-cf07e941f10a2ce263b3888e8b8950b17d0e21e5.tar.gz
cvs sync
Diffstat (limited to 'ext/mysqlnd/mysqlnd_debug.c')
-rw-r--r--ext/mysqlnd/mysqlnd_debug.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c
index d3811b3ae2..d2d2d3e72c 100644
--- a/ext/mysqlnd/mysqlnd_debug.c
+++ b/ext/mysqlnd/mysqlnd_debug.c
@@ -433,7 +433,8 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
}
i = j;
} else {
- self->file_name = (char *) mysqlnd_debug_default_trace_file;
+ if (!self->file_name)
+ self->file_name = (char *) mysqlnd_debug_default_trace_file;
}
state = PARSER_WAIT_COLON;
break;
@@ -491,9 +492,10 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
if ((i + 1) < mode_len && mode[i+1] == ',') {
i+= 2;
while (i < mode_len) {
- if (mode[i++] == ':') {
+ if (mode[i] == ':') {
break;
}
+ i++;
}
}
state = PARSER_WAIT_COLON;