← Back to team overview

desktop-packages team mailing list archive

[Bug 1440917] [NEW] ofono read_contexts code needs some re-work

 

Public bug reported:

This bug is bring reported as of network-manager version
0.9.10.0-4ubuntu13 ( latest in vivid at bug filing time ).

The code in src/devices/wwan/nm-modem-ofono.c needs some optimization.

Currently, the function ofono_read_contexts() is triggered when the
modem becoming enabled, which happens when the three private boolean
flags modem_online, gprs_powered, and gprs_attached are all TRUE, or
when a new context is detected via a 'ContextAdded' signal sent by
ofono's ConnectionManager interface.

This function in turn, synchronously reads ( with a 2s timeout ) the
ConnectionManager's 'SubscriberIdentity' property ( aka 'IMSI' ), and
then calls the DBus method com.canonical.NMOfono.ReadImsiContexts, which
triggers the ofono plugin to re-read the contexts directly from ofono's
gprs settings file ( found in /var/lib/ofono/<IMSI>/ ).

This could be optimized by instead having NM read the IMSI whenever the
ConnectionManager's 'Powered' property is set, caching the value, and
watching for changes to the 'SubscriberIdentity'.

Also it's curious that the contexts aren't re-read when a
'ContextRemoved' signal is received.

** Affects: network-manager (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1440917

Title:
  ofono read_contexts code needs some re-work

Status in network-manager package in Ubuntu:
  New

Bug description:
  This bug is bring reported as of network-manager version
  0.9.10.0-4ubuntu13 ( latest in vivid at bug filing time ).

  The code in src/devices/wwan/nm-modem-ofono.c needs some optimization.

  Currently, the function ofono_read_contexts() is triggered when the
  modem becoming enabled, which happens when the three private boolean
  flags modem_online, gprs_powered, and gprs_attached are all TRUE, or
  when a new context is detected via a 'ContextAdded' signal sent by
  ofono's ConnectionManager interface.

  This function in turn, synchronously reads ( with a 2s timeout ) the
  ConnectionManager's 'SubscriberIdentity' property ( aka 'IMSI' ), and
  then calls the DBus method com.canonical.NMOfono.ReadImsiContexts,
  which triggers the ofono plugin to re-read the contexts directly from
  ofono's gprs settings file ( found in /var/lib/ofono/<IMSI>/ ).

  This could be optimized by instead having NM read the IMSI whenever
  the ConnectionManager's 'Powered' property is set, caching the value,
  and watching for changes to the 'SubscriberIdentity'.

  Also it's curious that the contexts aren't re-read when a
  'ContextRemoved' signal is received.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1440917/+subscriptions


Follow ups

References