From edfcf0addd3c809a0939cb2bb98f8d81296c5a6a Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 13 Sep 2016 17:17:50 -0400 Subject: [PATCH] Fix: do not overwrite ret if already set and session found MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Errors were not propagated correctly otherwise. e.g: (No sessiond running) lttng load --all -> All sessions have been loaded successfully lttng list show no sessions With fix the same command output: Error: No session daemon is available Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- src/common/config/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/config/config.c b/src/common/config/config.c index f0d38ef92..d68d56000 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -2750,7 +2750,7 @@ end: } } - if (session_found) { + if (session_found && !ret) { ret = 0; } -- 2.34.1