diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-11-15 10:50:15 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-11-15 15:42:28 +0200 |
commit | b265aa0b0c187cc660f3b3e1714d383132821c38 (patch) | |
tree | 13da0949f4c67bb8e36f2bf50f758f1d587480b1 /plugins/ofono.c | |
parent | b44e6d2be6d402fe330cf49509ce2dd859b77b23 (diff) | |
download | connman-b265aa0b0c187cc660f3b3e1714d383132821c38.tar.gz connman-b265aa0b0c187cc660f3b3e1714d383132821c38.tar.bz2 connman-b265aa0b0c187cc660f3b3e1714d383132821c38.zip |
ofono: Remove network if GPRS context is removed
Whenever the GPRS contextext is removed we need also to remove
the network object. Following sequence was observed:
cm_update_attached() /huawei_1 Attached 1
modem_changed() /huawei_1 Interfaces 0x07
Plugin creates network object and registers it at core
cm_update_attached() /huawei_1 Attached 0
service.c:run_auto_connect()
set_property() /huawei_1 path /huawei_1/context1 org.ofono.ConnectionContext.Active
Obviously, the context is not attached at this point so we get an
Failed to change property: /huawei_1/context1 org.ofono.ConnectionContext.Active: org.ofono.Error.NotAttached GPRS is not
attached
Fixes BMC#25725
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r-- | plugins/ofono.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index 2122b85d..41954e4e 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1698,8 +1698,10 @@ static void cm_update_attached(struct modem_data *modem, DBG("%s Attached %d", modem->path, modem->attached); - if (modem->attached == FALSE) + if (modem->attached == FALSE) { + remove_network(modem); return; + } if (has_interface(modem->interfaces, OFONO_API_NETREG) == FALSE) { |