From 76992d4d80834399b1b08bc21eca634f22d18017 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 26 Nov 2020 15:36:03 -0500 Subject: [PATCH] sessiond: return 'invalid protocol' error on reception error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Change-Id: I15758543ae51dd2ce30b40d88a05ef0492ce0e51 --- src/bin/lttng-sessiond/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 2abcdf48e..2ae0ba687 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4295,8 +4295,7 @@ int cmd_register_trigger(struct command_ctx *cmd_ctx, int sock, sock, trigger_payload.buffer.data, trigger_len); if (sock_recv_len < 0 || sock_recv_len != trigger_len) { ERR("Failed to receive \"register trigger\" command payload"); - /* TODO: should this be a new error enum ? */ - ret = LTTNG_ERR_INVALID_TRIGGER; + ret = LTTNG_ERR_INVALID_PROTOCOL; goto end; } -- 2.34.1