X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.c;fp=src%2Fcommon%2Fconsumer%2Fconsumer.c;h=f5c532714cdedfd8f624295d2274a5402e96b640;hb=a73d94960e33d71f20cb99ea648cd24d064aabee;hp=a2df6c9587b5b047f6c71a286d3973f3a248f1f1;hpb=c0e55b9aa6c04ffffa8ca9a164b09e07df7f7a5d;p=lttng-tools.git diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index a2df6c958..f5c532714 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -1269,11 +1269,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;