From: Daniel Wagner <daniel.wag...@bmw-carit.de>

oFono sends several ConnectionContext.PropertyChanged("Active", False)
after it was told to disconnect.

After studying the oFono part, it looks like that serveral CREGS updates
could trigger oFono to send us the same flag over and over again
(see ofono_gprs_status_notify()).

Even though oFono might missbehave, ConnMan should not crash so
easily. Luckely, the fix is very simple. We should just check if we still
have a valid network pointer before accessing it.

Fixes BMC#25026
---
 plugins/ofono.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 74c12d8..754ff6e 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -312,6 +312,9 @@ static void set_disconnected(struct modem_data *modem)
 {
        DBG("%s", modem->path);
 
+       if (modem->network == NULL)
+               return;
+
        connman_network_set_connected(modem->network, FALSE);
 }
 
-- 
1.7.10.rc3.1.gb3065

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to