X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=8e794bdf4365be1779c2f0bb94c5e99dae5b03ee;hb=b09c7c76bc6f409ed9c303c81cba168234700568;hp=8e4afb00ba0827295d86f53ed728763eb5ebe463;hpb=0cda4f28041a221757fa2dfa8e91706e7a548090;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 8e4afb00b..8e794bdf4 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2032,14 +2032,16 @@ static int list_lttng_ust_global_events(char *channel_name, tmp[i].type = LTTNG_EVENT_FUNCTION; break; } - strncpy(tmp[i].loglevel, uevent->attr.loglevel, LTTNG_SYMBOL_NAME_LEN); - tmp[i].loglevel[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; + tmp[i].loglevel = uevent->attr.loglevel; switch (uevent->attr.loglevel_type) { - case LTTNG_UST_LOGLEVEL: - tmp[i].type = LTTNG_EVENT_LOGLEVEL; + case LTTNG_UST_LOGLEVEL_ALL: + tmp[i].loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL; break; - case LTTNG_UST_LOGLEVEL_ONLY: - tmp[i].type = LTTNG_EVENT_LOGLEVEL_ONLY; + case LTTNG_UST_LOGLEVEL_RANGE: + tmp[i].loglevel_type = LTTNG_EVENT_LOGLEVEL_RANGE; + break; + case LTTNG_UST_LOGLEVEL_SINGLE: + tmp[i].loglevel_type = LTTNG_EVENT_LOGLEVEL_SINGLE; break; } i++; @@ -2426,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) @@ -3308,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: @@ -3904,17 +3899,12 @@ end: */ static int check_existing_daemon(void) { - if (access(client_unix_sock_path, F_OK) < 0 && - access(apps_unix_sock_path, F_OK) < 0) { - return 0; - } - /* Is there anybody out there ? */ if (lttng_session_daemon_alive()) { return -EEXIST; - } else { - return 0; } + + return 0; } /*