X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=61a762803668af2ffbbc330303b5034010bc6b87;hb=3f2c5fcc29e125fd43d1c63e422a389e82a3379f;hp=8304de8be394ca034f0726f622fdebe865c7c5df;hpb=69892bbba677a6695b216046d586e58bfa0f82c9;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 8304de8be..61a762803 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2031,8 +2031,17 @@ 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; + } + tmp[i].loglevel = uevent->attr.loglevel; + switch (uevent->attr.loglevel_type) { + case LTTNG_UST_LOGLEVEL_ALL: + tmp[i].type = LTTNG_EVENT_LOGLEVEL_ALL; + break; + case LTTNG_UST_LOGLEVEL_RANGE: + tmp[i].type = LTTNG_EVENT_LOGLEVEL_RANGE; + break; + case LTTNG_UST_LOGLEVEL_SINGLE: + tmp[i].type = LTTNG_EVENT_LOGLEVEL_SINGLE; break; } i++; @@ -2419,12 +2428,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) @@ -3301,7 +3304,6 @@ static int process_client_msg(struct command_ctx *cmd_ctx) ret = cmd_disable_event(cmd_ctx->session, cmd_ctx->lsm->domain.type, cmd_ctx->lsm->u.disable.channel_name, cmd_ctx->lsm->u.disable.name); - ret = LTTCOMM_OK; break; } case LTTNG_DISABLE_ALL_EVENT: