X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=a398e34d6d7b3c825bb8e4a4e0802412ae96e83f;hp=c5aada5bec9b46af9e26ce74c606f1a74553a2bf;hb=18a720cd7bbc2eeea6d075903668e21337b5d916;hpb=6e911cad03751b6814fddd65b19a592acdc2b7b7 diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index c5aada5be..a398e34d6 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -919,10 +919,10 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle, sizeof(lsm.u.enable.channel_name)); } - if (ev->name[0] != '\0') { - lsm.cmd_type = LTTNG_ENABLE_EVENT; - } else { - lsm.cmd_type = LTTNG_ENABLE_ALL_EVENT; + lsm.cmd_type = LTTNG_ENABLE_EVENT; + if (ev->name[0] == '\0') { + /* Enable all events */ + lttng_ctl_copy_string(ev->name, "*", sizeof(ev->name)); } lttng_ctl_copy_lttng_domain(&lsm.domain, &handle->domain); @@ -1081,10 +1081,10 @@ int lttng_disable_event_ext(struct lttng_handle *handle, sizeof(lsm.u.disable.channel_name)); } - if (ev->name[0] != '\0') { - lsm.cmd_type = LTTNG_DISABLE_EVENT; - } else { - lsm.cmd_type = LTTNG_DISABLE_ALL_EVENT; + lsm.cmd_type = LTTNG_DISABLE_EVENT; + if (ev->name[0] == '\0') { + /* Disable all events */ + lttng_ctl_copy_string(ev->name, "*", sizeof(ev->name)); } lttng_ctl_copy_lttng_domain(&lsm.domain, &handle->domain);