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.7.5~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=edfcf0addd3c809a0939cb2bb98f8d81296c5a6a;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/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; }