lttng-sessiond: keep track of UST consumer fd for all UST sessions.
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Nov 2011 03:40:54 +0000 (22:40 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Nov 2011 23:47:21 +0000 (18:47 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-sessiond/main.c
lttng-sessiond/trace-ust.c
lttng-sessiond/trace-ust.h
lttng-sessiond/ust-app.c
lttng-sessiond/ust-app.h

index 0c93395b4a573ddbbaeca68332692e5169d777d2..d1cc3fa8f81a3aec484e6ca476720ff9a3e7fa48 100644 (file)
@@ -157,6 +157,8 @@ static struct ust_cmd_queue ust_cmd_queue;
  */
 static struct ltt_session_list *session_list_ptr;
 
+int ust_consumer_fd;
+
 /*
  * Create a poll set with O_CLOEXEC and add the thread quit pipe to the set.
  */
@@ -3010,8 +3012,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx)
                                        goto error;
                                }
 
-                               cmd_ctx->session->ust_session->consumer_fd =
-                                       ustconsumer_data.cmd_sock;
+                               ust_consumer_fd = ustconsumer_data.cmd_sock;
                        }
                        pthread_mutex_unlock(&ustconsumer_data.pid_mutex);
                }
index 4df481c12e28d4ccecdbede01c65d01779674db2..20e3dc5f149127d16768ad45381c200fb27c2a03 100644 (file)
@@ -98,7 +98,6 @@ struct ltt_ust_session *trace_ust_create_session(char *path, unsigned int uid,
        }
 
        /* Init data structure */
-       lus->consumer_fds_sent = 0;
        lus->uid = uid;
        lus->start_trace = 0;
 
index 9235ca62c837e261e682b671a6a9e7262ea5fb84..f0b639cba23da1fa68902450f6ce3278ea34b556 100644 (file)
@@ -100,8 +100,6 @@ struct ltt_ust_domain_exec {
 /* UST session */
 struct ltt_ust_session {
        int uid;   /* Unique identifier of session */
-       int consumer_fds_sent;
-       int consumer_fd;
        int start_trace;
        char pathname[PATH_MAX];
        struct ltt_ust_domain_global domain_global;
index 43832aacba25a56b8b6f90791afd5067b487b59f..f23fd306b20bfd540861ce76ef33b27b0f4367e8 100644 (file)
@@ -1141,7 +1141,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
        }
 
        /* Setup UST consumer socket and send fds to it */
-       ret = ust_consumer_send_session(usess->consumer_fd, ua_sess);
+       ret = ust_consumer_send_session(ust_consumer_fd, ua_sess);
        if (ret < 0) {
                goto error_rcu_unlock;
        }
index f369a8a2fcd503b4ea34534bfc972e1e1ccaf298..14e04c121510157ebbfa896ffed43794c84513d7 100644 (file)
@@ -26,6 +26,8 @@
 
 #define UST_APP_EVENT_LIST_SIZE 32
 
+extern int ust_consumer_fd;
+
 /*
  * Application registration data structure.
  */
This page took 0.032167 seconds and 4 git commands to generate.