mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-01 13:57:57 +02:00
scripts: access-portal: Fix incorrect bitmask checking for media roles
In Lua, `0` is a truthy value, which means `not 0` is `false`. Compare the resulting value from bitwise AND with 0 instead of checking it with `if not` to ensure correctness.
This commit is contained in:
parent
018ccb9ce6
commit
a2472542a9
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ function updateClientPermissions (client, permissions)
|
|||
return
|
||||
end
|
||||
media_roles = parseMediaRoles (str_prop)
|
||||
if not (media_roles & MEDIA_ROLE_CAMERA) then
|
||||
if (media_roles & MEDIA_ROLE_CAMERA) == 0 then
|
||||
Log.info (client, "Ignoring portal check for clients without camera role")
|
||||
return
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue