mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-08 06:58:08 +02:00
conf: fix equal matches
This commit is contained in:
parent
575030aaf3
commit
542e56d9f7
1 changed files with 6 additions and 3 deletions
|
|
@ -607,6 +607,7 @@ matches_properties (WpSpaJson *match, WpProperties *props)
|
|||
WpSpaJson *p;
|
||||
g_autofree gchar *key = NULL;
|
||||
g_autofree gchar *val = NULL;
|
||||
const gchar *value = NULL;
|
||||
WpConstraintVerb verb = WP_CONSTRAINT_VERB_EQUALS;
|
||||
|
||||
p = g_value_get_boxed (&item_match);
|
||||
|
|
@ -615,14 +616,16 @@ matches_properties (WpSpaJson *match, WpProperties *props)
|
|||
g_value_unset (&item_match);
|
||||
g_return_val_if_fail (wp_iterator_next (it_match, &item_match), FALSE);
|
||||
p = g_value_get_boxed (&item_match);
|
||||
val = wp_spa_json_parse_string (p);
|
||||
value = val = wp_spa_json_parse_string (p);
|
||||
|
||||
if (val[0] == '~')
|
||||
if (value[0] == '~') {
|
||||
verb = WP_CONSTRAINT_VERB_MATCHES;
|
||||
value++;
|
||||
}
|
||||
|
||||
wp_object_interest_add_constraint (interest,
|
||||
WP_CONSTRAINT_TYPE_PW_PROPERTY, key, verb,
|
||||
g_variant_new_string (val + 1));
|
||||
g_variant_new_string (value));
|
||||
}
|
||||
|
||||
if (wp_object_interest_matches (interest, props))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue