From: Philippe Proulx Date: Sat, 22 Aug 2015 06:47:53 +0000 (-0400) Subject: Fix: MI: close domain when listing multiple agent domains X-Git-Tag: v2.8.0-rc1~385 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=cd7b292775db15d15db74519e5c8673834bbbff5 Fix: MI: close domain when listing multiple agent domains Without this patch, each agent domain gets nested under the previous one. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 18ae026c2..bc59e626f 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -1855,7 +1855,8 @@ int cmd_list(int argc, const char **argv) if (ret) { goto end; } - continue; + + goto next_domain; } switch (domains[i].type) { @@ -1875,6 +1876,7 @@ int cmd_list(int argc, const char **argv) goto end; } +next_domain: if (lttng_opt_mi) { /* Close domain element */ ret = mi_lttng_writer_close_element(writer);