X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttngctl%2Fliblttngctl.c;fp=liblttngctl%2Fliblttngctl.c;h=f57201ab186be26ffe0106589325be5db42fe0a1;hp=aca8374a2ebc7f55a22ce0ddceafa15eca8788eb;hb=0b97ec540cc2e4561ddbef4d4542b6dfb59b0a43;hpb=b579acd98eabe5875e3ee7975abe10d7ccf23e5c diff --git a/liblttngctl/liblttngctl.c b/liblttngctl/liblttngctl.c index aca8374a2..f57201ab1 100644 --- a/liblttngctl/liblttngctl.c +++ b/liblttngctl/liblttngctl.c @@ -450,29 +450,16 @@ int lttng_enable_channel(struct lttng_domain *domain, } /* - * Disable recording for the channel for the kernel tracer. + * Disable channel. + * + * All tracing will be stopped for registered events of the channel. */ int lttng_disable_channel(struct lttng_domain *domain, const char *name) { - int ret = -1; - copy_string(lsm.u.disable.channel_name, name, NAME_MAX); + copy_lttng_domain(domain); - if (domain) { - switch (domain->type) { - case LTTNG_DOMAIN_KERNEL: - ret = ask_sessiond(LTTNG_KERNEL_DISABLE_CHANNEL, NULL); - break; - case LTTNG_DOMAIN_UST: - ret = LTTCOMM_NOT_IMPLEMENTED; - break; - default: - ret = LTTCOMM_UNKNOWN_DOMAIN; - break; - }; - } - - return ret; + return ask_sessiond(LTTNG_DISABLE_CHANNEL, NULL); } /*