From cd7b292775db15d15db74519e5c8673834bbbff5 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Sat, 22 Aug 2015 02:47:53 -0400 Subject: [PATCH 1/1] Fix: MI: close domain when listing multiple agent domains MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without this patch, each agent domain gets nested under the previous one. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.34.1