From: Daniel Wagner <[email protected]>
connman_inet_ifname can return a NULL pointer. For example this
happens when all wifi interfaces are being removed because the wifi
dongle has been unplugged. The service is still valid at this point
but there is no device anymore. The kernel will then correctly return
NULL.
---
src/session.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/session.c b/src/session.c
index 4047102..5cc85c4 100644
--- a/src/session.c
+++ b/src/session.c
@@ -676,7 +676,8 @@ static void update_info(struct session_info *info)
idx = __connman_service_get_index(info->service);
info->ifname = connman_inet_ifname(idx);
-
+ if (info->ifname == NULL)
+ info->ifname = "";
} else {
info->bearer = "";
info->online = FALSE;
--
1.7.4.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman