Hide internal events from session daemon clients
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 23 Aug 2015 03:43:21 +0000 (23:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Sep 2015 12:52:19 +0000 (08:52 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index 5aff25d2ab937371e547b2bc50ecfa95738d6d0f..c15e508b061bdbfdd9b5c5fdaa167cf162ff1289 100644 (file)
@@ -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;
This page took 0.027721 seconds and 4 git commands to generate.