filter: bytecode already in the list should go before
[lttng-ust.git] / liblttng-ust / lttng-filter.c
index 1967d540bd99b4f9f46f8140042d35e004d10667..bbc212892342f988041b025577de506eeaf0e029 100644 (file)
@@ -536,11 +536,12 @@ void lttng_enabler_event_link_bytecode(struct lttng_event *event,
 
                /*
                 * Insert at specified priority (seqnum) in increasing
-                * order.
+                * order. If there already is a bytecode of the same priority,
+                * insert the new bytecode right after it.
                 */
                cds_list_for_each_entry_reverse(runtime,
                                &event->bytecode_runtime_head, node) {
-                       if (runtime->bc->bc.seqnum < bc->bc.seqnum) {
+                       if (runtime->bc->bc.seqnum <= bc->bc.seqnum) {
                                /* insert here */
                                insert_loc = &runtime->node;
                                goto add_within;
This page took 0.022808 seconds and 4 git commands to generate.