Fix: sessiond: cmd_enable_channel: negative error code used
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 25 Mar 2022 19:34:47 +0000 (15:34 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 28 Mar 2022 20:24:36 +0000 (16:24 -0400)
A negative `lttng_error_code` value is returned (as an integer)
when a channel copy fails. Return a positive error code.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I340f739cc33858a06832bb75a7a6d5e18459551f

src/bin/lttng-sessiond/cmd.cpp

index ff7c0394719de93b893250d7ecd1762dd29ba336..4892e353964aa72fe003966c220085f15b4f6e7d 100644 (file)
@@ -1290,7 +1290,7 @@ static int cmd_enable_channel_internal(struct ltt_session *session,
 
        attr = lttng_channel_copy(_attr);
        if (!attr) {
-               ret = -LTTNG_ERR_NOMEM;
+               ret = LTTNG_ERR_NOMEM;
                goto end;
        }
 
This page took 0.0293 seconds and 5 git commands to generate.