/*
* Send relayd socket to consumer associated with a session name.
*
+ * The consumer socket lock must be held by the caller.
+ *
* On success return positive value. On error, negative value.
*/
int consumer_send_relayd_socket(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) {
DBG2("Channel monitoring pipe successfully sent");
error:
+ pthread_mutex_unlock(consumer_sock->lock);
return ret;
}