mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pw-dump: destroy all objects not just those matching the pattern
`registry_event_global()` creates an `object` object for every object,
not just those matching `data::pattern`. However, previously
`registry_event_global_remove()` only destroyed those objects
that matched the given pattern. Fix that by destroying
every object.
Fixes #4001
Fixes 47e1f38f03 ("pw-dump: also dump object removal")
This commit is contained in:
parent
3a912cbbb3
commit
cc88712ea6
1 changed files with 14 additions and 14 deletions
|
|
@ -1395,20 +1395,20 @@ static void registry_event_global_remove(void *data, uint32_t id)
|
||||||
if ((o = find_object(d, id)) == NULL)
|
if ((o = find_object(d, id)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
d->state = STATE_FIRST;
|
if (!d->pattern || object_matches(o, d->pattern)) {
|
||||||
if (d->pattern != NULL && !object_matches(o, d->pattern))
|
d->state = STATE_FIRST;
|
||||||
return;
|
if (d->state == STATE_FIRST)
|
||||||
if (d->state == STATE_FIRST)
|
put_begin(d, NULL, "[", 0);
|
||||||
put_begin(d, NULL, "[", 0);
|
put_begin(d, NULL, "{", 0);
|
||||||
put_begin(d, NULL, "{", 0);
|
put_int(d, "id", o->id);
|
||||||
put_int(d, "id", o->id);
|
if (o->class && o->class->dump)
|
||||||
if (o->class && o->class->dump)
|
put_value(d, "info", NULL);
|
||||||
put_value(d, "info", NULL);
|
else if (o->props)
|
||||||
else if (o->props)
|
put_value(d, "props", NULL);
|
||||||
put_value(d, "props", NULL);
|
put_end(d, "}", 0);
|
||||||
put_end(d, "}", 0);
|
if (d->state != STATE_FIRST)
|
||||||
if (d->state != STATE_FIRST)
|
put_end(d, "]\n", 0);
|
||||||
put_end(d, "]\n", 0);
|
}
|
||||||
|
|
||||||
object_destroy(o);
|
object_destroy(o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue