From: Jérémie Galarneau Date: Thu, 6 Oct 2016 18:52:19 +0000 (-0400) Subject: Fix: check for a session daemon before running load command X-Git-Tag: v2.7.5~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b24ef19054f158b350b248366f0736116b305477;p=lttng-tools.git Fix: check for a session daemon before running load command Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/load.c b/src/bin/lttng/commands/load.c index 708ef0b4d..3145a5cdf 100644 --- a/src/bin/lttng/commands/load.c +++ b/src/bin/lttng/commands/load.c @@ -170,6 +170,14 @@ int cmd_load(int argc, const char **argv) } } + ret = lttng_session_daemon_alive(); + if (!ret) { + ERR("No session daemon is available"); + ret = CMD_ERROR; + goto end; + } + ret = 0; + if (!opt_load_all) { session_name = poptGetArg(pc); if (session_name) {