X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-registry.c;h=5d2487cd2eca63f8de2d5bd08ea752daaea851a4;hb=0e7b45661dabc88c533f4f322615217410ce68db;hp=205eef6aa625eccdde4426898e72d4f95c31d02c;hpb=3fd9c5c21dc94a9182065664e19fc0d4dd5ead71;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c index 205eef6aa..5d2487cd2 100644 --- a/src/bin/lttng-sessiond/ust-registry.c +++ b/src/bin/lttng-sessiond/ust-registry.c @@ -20,7 +20,6 @@ #include "lttng-sessiond.h" #include "notification-thread-commands.h" - /* * Hash table match function for event in the registry. */ @@ -28,7 +27,6 @@ static int ht_match_event(struct cds_lfht_node *node, const void *_key) { const struct ust_registry_event *key; struct ust_registry_event *event; - int i; assert(node); assert(_key); @@ -47,18 +45,12 @@ static int ht_match_event(struct cds_lfht_node *node, const void *_key) goto no_match; } - /* Compare the number of fields. */ - if (event->nr_fields != key->nr_fields) { + /* Compare the arrays of fields. */ + if (!match_lttng_ust_ctl_field_array(event->fields, event->nr_fields, + key->fields, key->nr_fields)) { goto no_match; } - /* Compare each field individually. */ - for (i = 0; i < event->nr_fields; i++) { - if (!match_ustctl_field(&event->fields[i], &key->fields[i])) { - goto no_match; - } - } - /* Compare model URI. */ if (event->model_emf_uri != NULL && key->model_emf_uri == NULL) { goto no_match;