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

index d58cc07e0daa20853f59dcc411c670b936f70e04..64dc0fca68c8c88f43d8c369defd28fc85c44fb9 100644 (file)
@@ -150,6 +150,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.027045 seconds and 4 git commands to generate.