projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small fix to lttng list session
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index bf20850003ece493934432f876af883a59979f58..6ae374483a428019721591fc012924044eb93758 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-769,12
+769,18
@@
static void update_ust_app(int app_sock)
{
struct ltt_session *sess, *stmp;
{
struct ltt_session *sess, *stmp;
+ session_lock_list();
+
/* For all tracing session(s) */
cds_list_for_each_entry_safe(sess, stmp, &session_list_ptr->head, list) {
/* For all tracing session(s) */
cds_list_for_each_entry_safe(sess, stmp, &session_list_ptr->head, list) {
+ session_lock(sess);
if (sess->ust_session) {
ust_app_global_update(sess->ust_session, app_sock);
}
if (sess->ust_session) {
ust_app_global_update(sess->ust_session, app_sock);
}
+ session_unlock(sess);
}
}
+
+ session_unlock_list();
}
/*
}
/*
@@
-3471,11
+3477,7
@@
static int process_client_msg(struct command_ctx *cmd_ctx)
session_lock_list();
nr_sessions = lttng_sessions_count(cmd_ctx->creds.uid, cmd_ctx->creds.gid);
session_lock_list();
nr_sessions = lttng_sessions_count(cmd_ctx->creds.uid, cmd_ctx->creds.gid);
- if (nr_sessions == 0) {
- ret = LTTCOMM_NO_SESSION;
- session_unlock_list();
- goto error;
- }
+
ret = setup_lttng_msg(cmd_ctx, sizeof(struct lttng_session) * nr_sessions);
if (ret < 0) {
session_unlock_list();
ret = setup_lttng_msg(cmd_ctx, sizeof(struct lttng_session) * nr_sessions);
if (ret < 0) {
session_unlock_list();
@@
-3899,17
+3901,12
@@
end:
*/
static int check_existing_daemon(void)
{
*/
static int check_existing_daemon(void)
{
- if (access(client_unix_sock_path, F_OK) < 0 &&
- access(apps_unix_sock_path, F_OK) < 0) {
- return 0;
- }
-
/* Is there anybody out there ? */
if (lttng_session_daemon_alive()) {
return -EEXIST;
/* Is there anybody out there ? */
if (lttng_session_daemon_alive()) {
return -EEXIST;
- } else {
- return 0;
}
}
+
+ return 0;
}
/*
}
/*
This page took
0.024736 seconds
and
4
git commands to generate.