Fix: ust-app: protect app socket protocol with lock
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.h
index b62e218a03a74842d8bcf08dc3dbef0471f6f01e..27e3dd0e4903b6c22a019fb3b2f2b713d878bfce 100644 (file)
@@ -227,6 +227,8 @@ struct ust_app_session {
  */
 struct ust_app {
        int sock;
+       pthread_mutex_t sock_lock;      /* Protects sock protocol. */
+
        int notify_sock;
        pid_t pid;
        pid_t ppid;
@@ -283,11 +285,7 @@ struct ust_app {
 #ifdef HAVE_LIBLTTNG_UST_CTL
 
 int ust_app_register(struct ust_register_msg *msg, int sock);
-static inline
-int ust_app_register_done(int sock)
-{
-       return ustctl_register_done(sock);
-}
+int ust_app_register_done(struct ust_app *app);
 int ust_app_version(struct ust_app *app);
 void ust_app_unregister(int sock);
 int ust_app_start_trace_all(struct ltt_ust_session *usess);
@@ -381,7 +379,7 @@ int ust_app_register(struct ust_register_msg *msg, int sock)
        return -ENOSYS;
 }
 static inline
-int ust_app_register_done(int sock)
+int ust_app_register_done(struct ust_app *app)
 {
        return -ENOSYS;
 }
This page took 0.023474 seconds and 4 git commands to generate.