When setting the 'Powered' property, don't report an -EALREADY result
from the device as an error condition. Being asynchronous, the powered
property is being changed while this happens, and 'Powered' being a
property the caller cannot be queued until the property has changed.
---
src/technology.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/technology.c b/src/technology.c
index 8b26af0..e5ce8fc 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -739,6 +739,9 @@ static int technology_enable(struct connman_technology
*technology)
if (!technology->rfkill_driven)
err = err_dev;
+ if (err == -EALREADY)
+ err = 0;
+
return err;
}
@@ -790,6 +793,9 @@ static int technology_disable(struct connman_technology
*technology)
if (technology->rfkill_driven)
err = __connman_rfkill_block(technology->type, true);
+ if (err == -EALREADY)
+ err = 0;
+
return err;
}
--
2.1.4
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman