X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fconsumer.c;h=25194460645d377ad5d0680417629f1f69d2f40b;hb=e4049c75f9408fa96a8ed034972c9687fce78de6;hp=5e723e9b3804e08335d3e16758486899ec79f83e;hpb=1aabd7d398ed9db96c8a1439917a8511aeb3dce0;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/consumer.c b/src/bin/lttng-sessiond/consumer.c index 5e723e9b3..251944606 100644 --- a/src/bin/lttng-sessiond/consumer.c +++ b/src/bin/lttng-sessiond/consumer.c @@ -1068,6 +1068,7 @@ int consumer_send_channel_monitor_pipe(struct consumer_socket *consumer_sock, memset(&msg, 0, sizeof(msg)); msg.cmd_type = LTTNG_CONSUMER_SET_CHANNEL_MONITOR_PIPE; + pthread_mutex_lock(consumer_sock->lock); DBG3("Sending set_channel_monitor_pipe command to consumer"); ret = consumer_send_msg(consumer_sock, &msg); if (ret < 0) { @@ -1083,6 +1084,7 @@ int consumer_send_channel_monitor_pipe(struct consumer_socket *consumer_sock, DBG2("Channel monitoring pipe successfully sent"); error: + pthread_mutex_unlock(consumer_sock->lock); return ret; }