X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-filter.c;h=62a745f197c4ddc377a57bcd4eb7404bab21a614;hb=21af05a99efabef4da5db10dfb41139873eb9692;hp=4714dad2ad50c1d7d09e0cc3450ee7366c06bbc7;hpb=e695af517bcaa72a426cbb15d3b5b578e46eb320;p=lttng-ust.git diff --git a/liblttng-ust/lttng-filter.c b/liblttng-ust/lttng-filter.c index 4714dad2..62a745f1 100644 --- a/liblttng-ust/lttng-filter.c +++ b/liblttng-ust/lttng-filter.c @@ -289,12 +289,14 @@ int _lttng_filter_event_link_bytecode(struct lttng_event *event, goto link_error; } runtime->p.filter = lttng_filter_interpret_bytecode; + runtime->p.link_failed = 0; cds_list_add_rcu(&runtime->p.node, insert_loc); dbg_printf("Linking successful.\n"); return 0; link_error: runtime->p.filter = lttng_filter_false; + runtime->p.link_failed = 1; cds_list_add_rcu(&runtime->p.node, insert_loc); dbg_printf("Linking failed.\n"); return ret; @@ -304,10 +306,10 @@ void lttng_filter_sync_state(struct lttng_bytecode_runtime *runtime) { struct lttng_ust_filter_bytecode_node *bc = runtime->bc; - if (bc->enabler->enabled) - runtime->filter = lttng_filter_interpret_bytecode; - else + if (!bc->enabler->enabled || runtime->link_failed) runtime->filter = lttng_filter_false; + else + runtime->filter = lttng_filter_interpret_bytecode; } /*