From: Jérémie Galarneau Date: Mon, 14 Jan 2019 22:09:42 +0000 (-0500) Subject: Fix: wrong error check on kernel session creation X-Git-Tag: v2.12.0-rc1~666 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=51630bd8cf4eaffdc8da8fec3c10f46c8110ddea Fix: wrong error check on kernel session creation create_kernel_session() returns a positive lttng error code on error and returns LTTNG_OK on success. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/client.c b/src/bin/lttng-sessiond/client.c index 8cf28a9d6..67e246b63 100644 --- a/src/bin/lttng-sessiond/client.c +++ b/src/bin/lttng-sessiond/client.c @@ -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; }