X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ffilter.c;h=688dfca4a889cf95eecb7107053dcb9d28386c45;hp=f0acffdc1dfc3287f6892253f59bc862711cd80c;hb=f3f0db50cf3fbc658bb4ffaf79a7fb694ab05e1d;hpb=f73fabfda365d22e7dd180fb1614e37c446fbd9e diff --git a/src/bin/lttng-sessiond/filter.c b/src/bin/lttng-sessiond/filter.c index f0acffdc1..688dfca4a 100644 --- a/src/bin/lttng-sessiond/filter.c +++ b/src/bin/lttng-sessiond/filter.c @@ -46,6 +46,7 @@ static int add_ufilter_to_event(struct ltt_ust_session *usess, int domain, } /* Same layout. */ uevent->filter = (struct lttng_ust_filter_bytecode *) bytecode; + uevent->filter->seqnum = usess->filter_seq_num; switch (domain) { case LTTNG_DOMAIN_UST: @@ -54,6 +55,7 @@ static int add_ufilter_to_event(struct ltt_ust_session *usess, int domain, if (ret < 0) { goto error; } + usess->filter_seq_num++; break; default: ret = -ENOSYS; @@ -155,17 +157,21 @@ int filter_ust_set(struct ltt_ust_session *usess, int domain, } end: + /* Must handle both local internal error and UST code. */ switch (ret) { case -EEXIST: + case -LTTNG_UST_ERR_EXIST: ret = LTTNG_ERR_FILTER_EXIST; break; case -ENOMEM: ret = LTTNG_ERR_FATAL; break; case -EINVAL: + case -LTTNG_UST_ERR_INVAL: ret = LTTNG_ERR_FILTER_INVAL; break; case -ENOSYS: + case -LTTNG_UST_ERR_NOSYS: ret = LTTNG_ERR_UNKNOWN_DOMAIN; break; default: