X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-registry.cpp;h=088e8d64fedfd36e6aa7cba44ecdc74e68df553a;hb=fb2772932d3207bd9d340f34f41d822d9c0ff0a9;hp=17346520380b1d67673fd0dfc10c1fc7cf50e704;hpb=ce9dbd47eea9fe023691518ef46b58c03b89c236;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-registry.cpp b/src/bin/lttng-sessiond/ust-registry.cpp index 173465203..088e8d64f 100644 --- a/src/bin/lttng-sessiond/ust-registry.cpp +++ b/src/bin/lttng-sessiond/ust-registry.cpp @@ -19,7 +19,6 @@ #include "lttng-sessiond.h" #include "notification-thread-commands.h" - /* * Hash table match function for event in the registry. */ @@ -27,7 +26,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; LTTNG_ASSERT(node); LTTNG_ASSERT(_key); @@ -46,18 +44,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_lttng_ust_ctl_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;