X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=2536dc72da28051f9edb6204c834a3b179a5c8fd;hb=33fbd46910b681a74b2493cff8c86979ec35ccc9;hp=ea25a5e470a690182a2e0daed6f4777d511e4f47;hpb=14fb1ebe1000da2c3ccca45e7e97ad6637947cfe;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index ea25a5e47..2536dc72d 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -166,6 +166,8 @@ static void list_lttng_channels(int domain, struct ltt_session *session, channels[i].attr.read_timer_interval = uchan->attr.read_timer_interval; channels[i].enabled = uchan->enabled; + channels[i].attr.tracefile_size = uchan->tracefile_size; + channels[i].attr.tracefile_count = uchan->tracefile_count; switch (uchan->attr.output) { case LTTNG_UST_MMAP: default: @@ -931,6 +933,16 @@ int cmd_enable_channel(struct ltt_session *session, attr->attr.switch_timer_interval = 0; } + /* + * The ringbuffer (both in user space and kernel) behave badly in overwrite + * mode and with less than 2 subbuf so block it right away and send back an + * invalid attribute error. + */ + if (attr->attr.overwrite && attr->attr.num_subbuf < 2) { + ret = LTTNG_ERR_INVALID; + goto error; + } + switch (domain->type) { case LTTNG_DOMAIN_KERNEL: { @@ -1445,7 +1457,7 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain, tmp_dom.type = LTTNG_DOMAIN_UST; ret = cmd_enable_event(session, &tmp_dom, DEFAULT_JUL_CHANNEL_NAME, - &uevent, NULL, NULL, NULL, wpipe); + &uevent, filter_expression, filter, NULL, wpipe); if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) { goto error; }