X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=986826fca267c455ba9825ea288edbff2e1ca8f4;hp=6b47ec0c9b2739cb04b07808a03890eee065e2fa;hb=75d83e506938a3e673ad19bb11838ee88e977e72;hpb=d98a47c754f867bee113325ff69419f0829de0bb diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 6b47ec0c9..986826fca 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1890,6 +1890,7 @@ int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx, channel->session_id, channel->session_id_per_pid); + pthread_mutex_lock(&ctx->metadata_socket_lock); ret = lttcomm_send_unix_sock(ctx->consumer_metadata_socket, &request, sizeof(request)); if (ret < 0) { @@ -1955,5 +1956,6 @@ int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx, ret = 0; end: + pthread_mutex_unlock(&ctx->metadata_socket_lock); return ret; }