mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 07:27:35 +00:00
genode_c_api/usb: correct interface setting
Remove regression in Session_component::set_interface by always iterating over all interfaces to potentially change each alternate setting (from passive to active and vice versa). Ref genodelabs/genode#5349 Fix genodelabs/genode#5467
This commit is contained in:
parent
472112fe0d
commit
62b44f2fbf
@ -1185,10 +1185,11 @@ void Session_component::set_interface(genode_usb_device::Label label,
|
||||
[&] (genode_usb_configuration & c) {
|
||||
return c.active; },
|
||||
[&] (genode_usb_configuration & c) {
|
||||
c.interfaces.apply(
|
||||
[&] (genode_usb_interface & i) {
|
||||
return i.desc.number == num; },
|
||||
c.interfaces.for_each(
|
||||
[&] (genode_usb_interface & i) {
|
||||
if (i.desc.number != num)
|
||||
return;
|
||||
|
||||
if (i.active != (i.desc.alt_settings == alt)) {
|
||||
i.active = (i.desc.alt_settings == alt);
|
||||
changed = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user