Fix: sessiond: use system LTTng-UST headers when available
[lttng-tools.git] / src / bin / lttng-sessiond / ust-consumer.c
index 82fd0ea074e0519c2c6bac47c146295e6c861053..8dc0fd905ae823d53709dd498dc68583acfb288a 100644 (file)
@@ -30,6 +30,7 @@
 #include "consumer.h"
 #include "health-sessiond.h"
 #include "ust-consumer.h"
+#include "lttng-ust-error.h"
 #include "buffer-registry.h"
 #include "session.h"
 #include "lttng-sessiond.h"
@@ -505,7 +506,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.023181 seconds and 4 git commands to generate.