consumerd: tag metadata channel as being part of a live session
[lttng-tools.git] / src / bin / lttng-sessiond / ust-consumer.c
index 3bb54f03983178f035fdcb345f8e1d7670557847..8bf342293e4846b877b7bbcd92e1eafc6dbcb443 100644 (file)
@@ -174,6 +174,7 @@ static int ask_channel_creation(struct ust_app_session *ua_sess,
                        ua_chan->attr.switch_timer_interval,
                        ua_chan->attr.read_timer_interval,
                        ua_sess->live_timer_interval,
+                       ua_sess->live_timer_interval != 0,
                        output,
                        (int) ua_chan->attr.type,
                        ua_sess->tracing_id,
@@ -496,7 +497,9 @@ int ust_consumer_metadata_request(struct consumer_socket *socket)
 
                        memset(&msg, 0, sizeof(msg));
                        msg.cmd_type = LTTNG_ERR_UND;
+                       pthread_mutex_lock(socket->lock);
                        (void) consumer_send_msg(socket, &msg);
+                       pthread_mutex_unlock(socket->lock);
                        /*
                         * This is possible since the session might have been destroyed
                         * during a consumer metadata request. So here, return gracefully
This page took 0.025642 seconds and 5 git commands to generate.