From: Jérémie Galarneau Date: Sun, 23 Aug 2015 03:43:21 +0000 (-0400) Subject: Hide internal events from session daemon clients X-Git-Tag: v2.7.0-rc2~134 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8040687e45b884e53e0bbe35d504495929c9705d;p=lttng-tools.git Hide internal events from session daemon clients Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 5aff25d2a..c15e508b0 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -267,8 +267,7 @@ static int list_lttng_ust_global_events(char *channel_name, uchan = caa_container_of(&node->node, struct ltt_ust_channel, node.node); - nb_event += lttng_ht_get_count(uchan->events); - + nb_event = lttng_ht_get_count(uchan->events); if (nb_event == 0) { ret = nb_event; goto error; @@ -283,6 +282,11 @@ static int list_lttng_ust_global_events(char *channel_name, } cds_lfht_for_each_entry(uchan->events->ht, &iter.iter, uevent, node.node) { + if (uevent->internal) { + /* This event should remain hidden from clients */ + nb_event--; + continue; + } strncpy(tmp[i].name, uevent->attr.name, LTTNG_SYMBOL_NAME_LEN); tmp[i].name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; tmp[i].enabled = uevent->enabled;