- /* It has to be a perfect match. */
- if (strncmp(event->signature, key->signature,
- strlen(event->signature))) {
+ /* Compare log levels. */
+ if (event->loglevel_value != key->loglevel_value) {
+ goto no_match;
+ }
+
+ /* Compare the number of fields. */
+ if (event->nr_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;
+ } else if(event->model_emf_uri == NULL && key->model_emf_uri != NULL) {