mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
platform_drv: fix update_policy()
The method did not handle device changes properly. When a new policy does not contain an owned device any more, we must consider this device as changed and release it. Moreover, the warning messages were interchanged. genodelabs/genode#4761
This commit is contained in:
parent
475bcfc2b9
commit
3520492f09
@ -84,13 +84,13 @@ void Session_component::update_policy(bool info, Policy_version version)
|
||||
_devices.for_each([&] (Device const & dev) {
|
||||
if (dev.name() != dc.device())
|
||||
return;
|
||||
state = (dev.owner() == _owner_id) ? UNCHANGED : CHANGED;
|
||||
state = (dev.owner() == _owner_id && matches(dev)) ? UNCHANGED : CHANGED;
|
||||
});
|
||||
|
||||
if (state == UNCHANGED)
|
||||
return;
|
||||
|
||||
if (state == AWAY)
|
||||
if (state == CHANGED)
|
||||
warning("Device ", dc.device(),
|
||||
" has changed, will close device session");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user