ofono: Remove network if GPRS context is removed
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 15 Nov 2012 09:50:15 +0000 (10:50 +0100)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 15 Nov 2012 13:42:28 +0000 (15:42 +0200)
commitb265aa0b0c187cc660f3b3e1714d383132821c38
tree13da0949f4c67bb8e36f2bf50f758f1d587480b1
parentb44e6d2be6d402fe330cf49509ce2dd859b77b23
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
plugins/ofono.c