From: Jonathan Rajotte Date: Tue, 13 Sep 2016 21:17:50 +0000 (-0400) Subject: Fix: do not overwrite ret if already set and session found X-Git-Tag: v2.8.2~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=80931b4f6b4ba8fe5a828c907b75796cc197a1ff;p=lttng-tools.git Fix: do not overwrite ret if already set and session found 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 --- diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c index 6c639af44..503f49fad 100644 --- a/src/common/config/session-config.c +++ b/src/common/config/session-config.c @@ -2842,7 +2842,7 @@ end: } } - if (session_found) { + if (session_found && !ret) { ret = 0; }