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>
Sun, 23 Aug 2015 04:31:27 +0000 (00:31 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index e6c172ca51b6b30c880cb94376fab59f94d74118..67948252dc44708f59e0150ba3e9ff2b2b28c7a3 100644 (file)
@@ -268,8 +268,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;
@@ -284,6 +283,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.047007 seconds and 4 git commands to generate.