mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
metadata: handle removed globals as well
When we remove a global, we set NULL,NULL,NULL as its metadata. This then results in the implementor of the metadata to emit the property change event for the subject. When we decide to propagate this event to the listeners we not only need to check if the client can see the global but also if the global was removed and this is a remove metadata event. Fixes metadata remove events when a global is removed.
This commit is contained in:
parent
acf9b67067
commit
c972405cfe
1 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,9 @@ static int metadata_property(void *data,
|
|||
struct impl *impl = d->impl;
|
||||
|
||||
if (impl->pending == 0 || d->pong_seq != 0) {
|
||||
if (pw_impl_client_check_permissions(client, subject, PW_PERM_R) >= 0)
|
||||
int res = pw_impl_client_check_permissions(client, subject, PW_PERM_R);
|
||||
if (res >= 0 ||
|
||||
(res == -ENOENT && key == NULL && type == NULL && value == NULL))
|
||||
pw_metadata_resource_property(d->resource, subject, key, type, value);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue