projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lttng-sessiond: keep track of UST consumer fd for all UST sessions.
[lttng-tools.git]
/
lttng-sessiond
/
main.c
diff --git
a/lttng-sessiond/main.c
b/lttng-sessiond/main.c
index ccdc50f1dbbb0e23b769f6b3fe2bbcd73059577b..d1cc3fa8f81a3aec484e6ca476720ff9a3e7fa48 100644
(file)
--- a/
lttng-sessiond/main.c
+++ b/
lttng-sessiond/main.c
@@
-157,6
+157,8
@@
static struct ust_cmd_queue ust_cmd_queue;
*/
static struct ltt_session_list *session_list_ptr;
*/
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.
*/
/*
* Create a poll set with O_CLOEXEC and add the thread quit pipe to the set.
*/
@@
-588,9
+590,9
@@
static int setup_lttng_msg(struct command_ctx *cmd_ctx, size_t size)
buf_size = size;
buf_size = size;
- cmd_ctx->llm = malloc(sizeof(struct lttcomm_lttng_msg) + buf_size);
+ cmd_ctx->llm =
z
malloc(sizeof(struct lttcomm_lttng_msg) + buf_size);
if (cmd_ctx->llm == NULL) {
if (cmd_ctx->llm == NULL) {
- perror("malloc");
+ perror("
z
malloc");
ret = -ENOMEM;
goto error;
}
ret = -ENOMEM;
goto error;
}
@@
-1260,9
+1262,9
@@
static void *thread_registration_apps(void *data)
}
/* Create UST registration command for enqueuing */
}
/* Create UST registration command for enqueuing */
- ust_cmd = malloc(sizeof(struct ust_command));
+ ust_cmd =
z
malloc(sizeof(struct ust_command));
if (ust_cmd == NULL) {
if (ust_cmd == NULL) {
- perror("ust command malloc");
+ perror("ust command
z
malloc");
goto error;
}
goto error;
}
@@
-2097,7
+2099,7
@@
static int cmd_enable_channel(struct ltt_session *session,
}
/* Add channel to all registered applications */
}
/* Add channel to all registered applications */
- ret = ust_app_
add
_channel_all(usess, uchan);
+ ret = ust_app_
create
_channel_all(usess, uchan);
if (ret != 0) {
goto error;
}
if (ret != 0) {
goto error;
}
@@
-2360,7
+2362,7
@@
static int cmd_enable_event(struct ltt_session *session, int domain,
}
}
- ret = ust_app_
add
_event_all(usess, uchan, uevent);
+ ret = ust_app_
create
_event_all(usess, uchan, uevent);
if (ret < 0) {
ret = LTTCOMM_UST_ENABLE_FAIL;
goto error;
if (ret < 0) {
ret = LTTCOMM_UST_ENABLE_FAIL;
goto error;
@@
-3010,8
+3012,7
@@
static int process_client_msg(struct command_ctx *cmd_ctx)
goto error;
}
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);
}
}
pthread_mutex_unlock(&ustconsumer_data.pid_mutex);
}
@@
-3344,16
+3345,16
@@
static void *thread_manage_clients(void *data)
}
/* Allocate context command to process the client request */
}
/* Allocate context command to process the client request */
- cmd_ctx = malloc(sizeof(struct command_ctx));
+ cmd_ctx =
z
malloc(sizeof(struct command_ctx));
if (cmd_ctx == NULL) {
if (cmd_ctx == NULL) {
- perror("malloc cmd_ctx");
+ perror("
z
malloc cmd_ctx");
goto error;
}
/* Allocate data buffer for reception */
goto error;
}
/* Allocate data buffer for reception */
- cmd_ctx->lsm = malloc(sizeof(struct lttcomm_session_msg));
+ cmd_ctx->lsm =
z
malloc(sizeof(struct lttcomm_session_msg));
if (cmd_ctx->lsm == NULL) {
if (cmd_ctx->lsm == NULL) {
- perror("malloc cmd_ctx->lsm");
+ perror("
z
malloc cmd_ctx->lsm");
goto error;
}
goto error;
}
@@
-3390,7
+3391,7
@@
static void *thread_manage_clients(void *data)
if (ret < 0) {
/*
* TODO: Inform client somehow of the fatal error. At
if (ret < 0) {
/*
* TODO: Inform client somehow of the fatal error. At
- * this point, ret < 0 means that a malloc failed
+ * this point, ret < 0 means that a
z
malloc failed
* (ENOMEM). Error detected but still accept command.
*/
clean_command_ctx(&cmd_ctx);
* (ENOMEM). Error detected but still accept command.
*/
clean_command_ctx(&cmd_ctx);
This page took
0.025326 seconds
and
4
git commands to generate.