projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: notification: find_tracer_event_source returns NULL
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
notification-thread-events.c
diff --git
a/src/bin/lttng-sessiond/notification-thread-events.c
b/src/bin/lttng-sessiond/notification-thread-events.c
index c5ee4b11ed02052a77f014103b675e93336d6f71..9e5ec509135bd6d2818b6d6635ea6cdd0acf82ea 100644
(file)
--- a/
src/bin/lttng-sessiond/notification-thread-events.c
+++ b/
src/bin/lttng-sessiond/notification-thread-events.c
@@
-2125,7
+2125,7
@@
find_tracer_event_source_element(struct notification_thread_state *state,
source_element = NULL;
end:
source_element = NULL;
end:
- return
NULL
;
+ return
source_element
;
}
static
}
static
@@
-3814,9
+3814,11
@@
int client_handle_message_handshake(struct notification_client *client,
&client->communication.inbound.creds);
client->gid = LTTNG_SOCK_GET_GID_CRED(
&client->communication.inbound.creds);
&client->communication.inbound.creds);
client->gid = LTTNG_SOCK_GET_GID_CRED(
&client->communication.inbound.creds);
- DBG("Received handshake from client (uid = %u, gid = %u) with version %i.%i",
+ client->is_sessiond = LTTNG_SOCK_GET_PID_CRED(&client->communication.inbound.creds) == getpid();
+ DBG("Received handshake from client: uid = %u, gid = %u, protocol version = %i.%i, client is sessiond = %s",
client->uid, client->gid, (int) client->major,
client->uid, client->gid, (int) client->major,
- (int) client->minor);
+ (int) client->minor,
+ client->is_sessiond ? "true" : "false");
if (handshake_client->major !=
LTTNG_NOTIFICATION_CHANNEL_VERSION_MAJOR) {
if (handshake_client->major !=
LTTNG_NOTIFICATION_CHANNEL_VERSION_MAJOR) {
@@
-4414,6
+4416,14
@@
int notification_client_list_send_evaluation(
goto skip_client;
}
goto skip_client;
}
+ if (lttng_trigger_is_hidden(trigger) && !client->is_sessiond) {
+ /*
+ * Notifications resulting from an hidden trigger are
+ * only sent to the session daemon.
+ */
+ continue;
+ }
+
if (source_object_creds) {
if (client->uid != lttng_credentials_get_uid(source_object_creds) &&
client->gid != lttng_credentials_get_gid(source_object_creds) &&
if (source_object_creds) {
if (client->uid != lttng_credentials_get_uid(source_object_creds) &&
client->gid != lttng_credentials_get_gid(source_object_creds) &&
This page took
0.025811 seconds
and
4
git commands to generate.