From: Jérémie Galarneau Date: Thu, 26 Nov 2020 20:36:03 +0000 (-0500) Subject: sessiond: return 'invalid protocol' error on reception error X-Git-Tag: v2.13.0-rc1~398 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=76992d4d80834399b1b08bc21eca634f22d18017;p=lttng-tools.git sessiond: return 'invalid protocol' error on reception error Signed-off-by: Jérémie Galarneau Change-Id: I15758543ae51dd2ce30b40d88a05ef0492ce0e51 --- 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; }