X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.c;h=c457f754d230598ab52b7cd871c013449803e33a;hb=da151cc5d0a127c08de59d6861c20a617c192682;hp=fcb100e1a64ade8cf1c50b7c9f07bc55f931e39d;hpb=2e435abd2c3e09706fab156e1f965deccbbc68d5;p=lttng-tools.git diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index fcb100e1a..c457f754d 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -1272,11 +1272,14 @@ void lttng_consumer_set_command_sock_path( * Send return code to the session daemon. * If the socket is not defined, we return 0, it is not a fatal error */ -int lttng_consumer_send_error(struct lttng_consumer_local_data *ctx, int cmd) +int lttng_consumer_send_error(struct lttng_consumer_local_data *ctx, + enum lttcomm_return_code error_code) { if (ctx->consumer_error_socket > 0) { - return lttcomm_send_unix_sock(ctx->consumer_error_socket, &cmd, - sizeof(enum lttcomm_sessiond_command)); + const int32_t comm_code = (int32_t) error_code; + + return lttcomm_send_unix_sock( + ctx->consumer_error_socket, &comm_code, sizeof(comm_code)); } return 0;