global: fix comment and use constant for core id

This commit is contained in:
Wim Taymans 2020-02-03 12:32:17 +01:00
parent ef965dfc23
commit bdad7d87f9

View file

@ -348,8 +348,8 @@ int pw_global_update_permissions(struct pw_global *global, struct pw_impl_client
if (resource->client != client)
continue;
/* don't ever destroy the context resource */
if (!PW_PERM_IS_R(new_permissions) && global->id != 0)
/* don't ever destroy the core resource */
if (!PW_PERM_IS_R(new_permissions) && global->id != PW_ID_CORE)
pw_resource_destroy(resource);
else
resource->permissions = new_permissions;