Changeset: ae0c67221196 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae0c67221196 Modified Files: clients/ChangeLog.Apr2011 clients/mapiclient/stethoscope.c Branch: Apr2011 Log Message:
stethoscope: properly set mod.fcn filter for all connections Fix for bug 2827, when multiple targets are used, the filter would not be correct for all but the first connection to set the filter. This obviously was caused by sharing the same buffer and modifying it. We now copy the buffer before modifying it. diffs (46 lines): diff --git a/clients/ChangeLog.Apr2011 b/clients/ChangeLog.Apr2011 --- a/clients/ChangeLog.Apr2011 +++ b/clients/ChangeLog.Apr2011 @@ -1,6 +1,9 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Fri Jul 1 2011 Fabian Groffen <fab...@cwi.nl> +- Fix mod.fcn filter when using multiple targets, bug #2827 + * Wed Jun 29 2011 Sjoerd Mullender <sjo...@acm.org> - The separate Python distribution now uses the same version number as the main package. diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c --- a/clients/mapiclient/stethoscope.c +++ b/clients/mapiclient/stethoscope.c @@ -297,20 +297,24 @@ } else { for (a = 0; a < wthr->argc; a++) { char *c; - c = strchr(wthr->argv[a], '.'); + char *arg = strdup(wthr->argv[a]); + c = strchr(arg, '.'); if (c) { - mod = wthr->argv[a]; - if (mod == c) mod = "*"; + mod = arg; + if (mod == c) + mod = "*"; fcn = c + 1; - if (*fcn == 0) fcn = "*"; + if (*fcn == 0) + fcn = "*"; *c = 0; } else { - fcn = wthr->argv[a]; + fcn = arg; mod = "*"; } snprintf(buf, BUFSIZ, "profiler.setFilter(\"%s\",\"%s\");", mod, fcn); printf("-- %s%s\n", id, buf); doQ(buf); + free(arg); } } printf("-- %sprofiler.start();\n", id); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list