Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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) {
DBG2("Channel monitoring pipe successfully sent");
error:
+ pthread_mutex_unlock(consumer_sock->lock);
return ret;
}
if (!cmd_socket_wrapper) {
goto error;
}
+ cmd_socket_wrapper->lock = &consumer_data->lock;
ret = consumer_send_channel_monitor_pipe(cmd_socket_wrapper,
consumer_data->channel_monitor_pipe);