This fixes the case of cascading rfkill switches: if enabled, hard rfkilling
such technology might generate contradictory events.
1 - first all switches are hardblocked
2 - then one of these switch (usually: device's switch) gets fully unblocked
3 - then this same switch gets removed
Step 2 is in contradiction with step 1, so we need to care about such switch
getting removed: recomputing the hardblocked state.
---
src/technology.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/technology.c b/src/technology.c
index ff0e134..61634e8 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -1344,6 +1344,10 @@ static connman_bool_t
technology_apply_rfkill_change(struct connman_technology *
gboolean apply = TRUE;
GList *start, *list;
+ DBG("technology %p --> %d/%d vs %d/%d",
+ technology, softblock, hardblock,
+ technology->softblocked, technology->hardblocked);
+
if (technology->hardblocked == hardblock)
goto softblock_change;
@@ -1517,6 +1521,9 @@ int __connman_technology_remove_rfkill(unsigned int index,
if (technology == NULL)
return -ENXIO;
+ technology_apply_rfkill_change(technology,
+ technology->softblocked, !technology->hardblocked);
+
technology_put(technology);
return 0;
--
1.7.12
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman