X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=2aa93e63e915d8e0b03357f815ad7c3f3d13f766;hb=ca1c3607d2f5654163875cda874f43971df0f696;hp=8304de8be394ca034f0726f622fdebe865c7c5df;hpb=99bab54fa13c66d7237f03d899650ad73e49c230;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 8304de8be..2aa93e63e 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2031,8 +2031,15 @@ static int list_lttng_ust_global_events(char *channel_name, case LTTNG_UST_FUNCTION: tmp[i].type = LTTNG_EVENT_FUNCTION; break; - case LTTNG_UST_TRACEPOINT_LOGLEVEL: - tmp[i].type = LTTNG_EVENT_TRACEPOINT_LOGLEVEL; + } + strncpy(tmp[i].loglevel, uevent->attr.loglevel, LTTNG_SYMBOL_NAME_LEN); + tmp[i].loglevel[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; + switch (uevent->attr.loglevel_type) { + case LTTNG_UST_LOGLEVEL: + tmp[i].type = LTTNG_EVENT_LOGLEVEL; + break; + case LTTNG_UST_LOGLEVEL_ONLY: + tmp[i].type = LTTNG_EVENT_LOGLEVEL_ONLY; break; } i++; @@ -2419,12 +2426,6 @@ error: /* * Command LTTNG_ENABLE_EVENT processed by the client thread. - * - * TODO: currently, both events and loglevels are kept within the same - * namespace for UST global registry/app registery, so if an event - * happen to have the same name as the loglevel (very unlikely though), - * and an attempt is made to enable/disable both in the same session, - * the first to be created will be the only one allowed to exist. */ static int cmd_enable_event(struct ltt_session *session, int domain, char *channel_name, struct lttng_event *event)