mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-21 07:00:08 -05:00
client: update permission before calling global_update
first update the permission and then call the global update method. This ensures that any query of the permissions will have the new permissions.
This commit is contained in:
parent
04c153d410
commit
79fe89412a
1 changed files with 3 additions and 2 deletions
|
|
@ -491,13 +491,14 @@ int pw_client_update_permissions(struct pw_client *client,
|
|||
pw_log_debug("client %p: set default permissions %08x -> %08x",
|
||||
client, old_perm, new_perm);
|
||||
|
||||
def->permissions = new_perm;
|
||||
|
||||
spa_list_for_each(global, &core->global_list, link) {
|
||||
p = find_permission(client, global->id);
|
||||
if (p->id != SPA_ID_INVALID)
|
||||
continue;
|
||||
pw_global_update_permissions(global, client, old_perm, new_perm);
|
||||
}
|
||||
def->permissions = new_perm;
|
||||
}
|
||||
else {
|
||||
struct pw_global *global;
|
||||
|
|
@ -517,8 +518,8 @@ int pw_client_update_permissions(struct pw_client *client,
|
|||
pw_log_debug("client %p: set global %d permissions %08x -> %08x",
|
||||
client, global->id, old_perm, new_perm);
|
||||
|
||||
pw_global_update_permissions(global, client, old_perm, new_perm);
|
||||
p->permissions = new_perm;
|
||||
pw_global_update_permissions(global, client, old_perm, new_perm);
|
||||
}
|
||||
}
|
||||
if (n_permissions > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue