X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent.c;h=33559c89a9423ea13b322d90c5db9995269d9f21;hp=0b8bc0251ce2f8976de7a93a62b6ed8c194605e3;hb=19a97244f801504a7985eee1b4ecca933f660b4a;hpb=a93196248ad6f88aacce3d265da09c99321376ca diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 0b8bc0251..33559c89a 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -103,6 +103,7 @@ static int ht_match_event(struct cds_lfht_node *node, { struct agent_event *event; const struct agent_ht_key *key; + int ll_match; assert(node); assert(_key); @@ -118,19 +119,11 @@ static int ht_match_event(struct cds_lfht_node *node, } /* Event loglevel value and type. */ - if (event->loglevel_type == key->loglevel_type) { - /* Same loglevel type. */ - if (key->loglevel_type != LTTNG_EVENT_LOGLEVEL_ALL) { - /* - * Loglevel value must also match since the loglevel - * type is not all. - */ - if (event->loglevel_value != key->loglevel_value) { - goto no_match; - } - } - } else { - /* Loglevel type is different: no match. */ + ll_match = loglevels_match(event->loglevel_type, + event->loglevel_value, key->loglevel_type, + key->loglevel_value, LTTNG_EVENT_LOGLEVEL_ALL); + + if (!ll_match) { goto no_match; }