diff mbox series

[BlueZ] device: Clear pending_wake_allowed on error

Message ID 20250110173146.309964-1-ludovico.denittis@collabora.com
State New
Headers show
Series [BlueZ] device: Clear pending_wake_allowed on error | expand

Commit Message

Ludovico de Nittis Jan. 10, 2025, 5:31 p.m. UTC
If setting WakeAllowed fails, we should unset the `pending_wake_allowed`
property, or subsequent requests will be rejected due to another
"Property change in progress".

Fixes: https://github.com/bluez/bluez/issues/1047
---
 src/device.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index 24ef3d779..e8bff718c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1574,6 +1574,7 @@  static void set_wake_allowed_complete(uint8_t status, uint16_t length,
 						      mgmt_errstr(status));
 			dev->wake_id = -1U;
 		}
+		dev->pending_wake_allowed = FALSE;
 		return;
 	}