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 22:04:45 +0000 (18:04 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/load.c

index 708ef0b4d8e6c5c035b8fa6a66ddd1e966c73440..3145a5cdf903a29e80d6a1f7eb30e3211da6e09c 100644 (file)
@@ -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) {
This page took 0.025654 seconds and 4 git commands to generate.