From: Alok Barsode <[email protected]>
If a technology was rfkilled before connman ran, we need to register
it. Otherwise connman is not able to enable that technology. Also
if tech was rfkilled, technology->device_list will be empty. Added
a check for that.
---
src/technology.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/technology.c b/src/technology.c
index 8214617..5dddaa1 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -859,6 +859,9 @@ int __connman_technology_enable(enum connman_service_type
type, DBusMessage *msg
__connman_rfkill_block(technology->type, FALSE);
+ if (technology->device_list == NULL)
+ return 0;
+
for (list = technology->device_list; list; list = list->next) {
struct connman_device *device = list->data;
@@ -1031,6 +1034,8 @@ int __connman_technology_add_rfkill(unsigned int index,
if (rfkill == NULL)
return -ENOMEM;
+ __connman_notifier_register(type);
+
rfkill->index = index;
rfkill->type = type;
rfkill->softblock = softblock;
--
1.7.4.1
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman