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.9.0-rc1~35 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=464133ea1e46be8c38c3580c1a659096f24e32d5;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; }