X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fchannel.c;h=073965ac67bd708e6184915d62431f5342312675;hb=fbee89873ae51fa4e025455b19a8ebccd0e2d8a4;hp=049c784b379102b36e2b362cc5ab69e05b47f78b;hpb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/channel.c b/src/bin/lttng-sessiond/channel.c index 049c784b3..073965ac6 100644 --- a/src/bin/lttng-sessiond/channel.c +++ b/src/bin/lttng-sessiond/channel.c @@ -397,7 +397,7 @@ int channel_ust_create(struct ltt_ust_session *usess, /* * Invalid subbuffer size if it's lower then the page size. */ - if (attr->attr.subbuf_size < page_size) { + if (attr->attr.subbuf_size < the_page_size) { ret = LTTNG_ERR_INVALID; goto error; } @@ -522,6 +522,13 @@ int channel_ust_disable(struct ltt_ust_session *usess, DBG2("Channel UST %s already disabled", uchan->name); goto end; } + + uchan->enabled = 0; + + /* + * If session is inactive we don't notify the tracer right away. We + * wait for the next synchronization. + */ if (!usess->active) { goto end; } @@ -534,8 +541,6 @@ int channel_ust_disable(struct ltt_ust_session *usess, goto error; } - uchan->enabled = 0; - DBG2("Channel %s disabled successfully", uchan->name); return LTTNG_OK;