Fix: wrong error check on kernel session creation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 14 Jan 2019 22:09:42 +0000 (17:09 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 21 Jan 2019 18:39:25 +0000 (13:39 -0500)
create_kernel_session() returns a positive lttng error code
on error and returns LTTNG_OK on success.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/client.c

index 8cf28a9d6323b4859b9563a374422be5489a7484..67e246b63505bb71819bc273cda7e861d2c7cadb 100644 (file)
@@ -884,7 +884,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock,
                if (need_tracing_session) {
                        if (cmd_ctx->session->kernel_session == NULL) {
                                ret = create_kernel_session(cmd_ctx->session);
-                               if (ret < 0) {
+                               if (ret != LTTNG_OK) {
                                        ret = LTTNG_ERR_KERN_SESS_FAIL;
                                        goto error;
                                }
This page took 0.026417 seconds and 4 git commands to generate.