Fix: check for a session daemon before running load command
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Oct 2016 18:52:19 +0000 (14:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Oct 2016 04:44:05 +0000 (00:44 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/load.c

index ee5aabefbc49a1f6215cceb8f51d8a7b7d793953..a0f5e1d65befd4f5990def4bd91acd948c6dd3f5 100644 (file)
@@ -155,6 +155,13 @@ 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;
+       }
+
        if (!opt_load_all) {
                session_name = poptGetArg(pc);
                if (session_name) {
This page took 0.028821 seconds and 4 git commands to generate.