projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix return value on ust app session create
[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 61a762803668af2ffbbc330303b5034010bc6b87..6c4b8ec5ce4c94a26b14c33f44839938f8bdd7ac 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();
}
/*
}
/*
@@
-2035,13
+2041,13
@@
static int list_lttng_ust_global_events(char *channel_name,
tmp[i].loglevel = uevent->attr.loglevel;
switch (uevent->attr.loglevel_type) {
case LTTNG_UST_LOGLEVEL_ALL:
tmp[i].loglevel = uevent->attr.loglevel;
switch (uevent->attr.loglevel_type) {
case LTTNG_UST_LOGLEVEL_ALL:
- tmp[i].type = LTTNG_EVENT_LOGLEVEL_ALL;
+ tmp[i].
loglevel_
type = LTTNG_EVENT_LOGLEVEL_ALL;
break;
case LTTNG_UST_LOGLEVEL_RANGE:
break;
case LTTNG_UST_LOGLEVEL_RANGE:
- tmp[i].type = LTTNG_EVENT_LOGLEVEL_RANGE;
+ tmp[i].
loglevel_
type = LTTNG_EVENT_LOGLEVEL_RANGE;
break;
case LTTNG_UST_LOGLEVEL_SINGLE:
break;
case LTTNG_UST_LOGLEVEL_SINGLE:
- tmp[i].type = LTTNG_EVENT_LOGLEVEL_SINGLE;
+ tmp[i].
loglevel_
type = LTTNG_EVENT_LOGLEVEL_SINGLE;
break;
}
i++;
break;
}
i++;
@@
-3899,17
+3905,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.024984 seconds
and
4
git commands to generate.