diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-12-21 14:40:02 +0100 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-12-22 11:10:15 +0100 |
commit | c3f318213eaa21eaaa86b02661a520a5af8eee18 (patch) | |
tree | 29462c9d0dbb5fc42ba267370d16caa6b38a3966 /plugins | |
parent | ef87a4f96d63ca66cde962d62af45e633144ca51 (diff) | |
download | connman-c3f318213eaa21eaaa86b02661a520a5af8eee18.tar.gz connman-c3f318213eaa21eaaa86b02661a520a5af8eee18.tar.bz2 connman-c3f318213eaa21eaaa86b02661a520a5af8eee18.zip |
ofono: Discover already online modems
If a modem is already online there will be no updates
on the interfaces and therefore no triggers to do the
complete discovering.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ofono.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index bdb9b155..4906dc5b 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1846,6 +1846,20 @@ static void sim_properties_reply(struct modem_data *modem, * modem_enable() callback. */ create_device(modem); + + if (modem->online == FALSE) + return; + + /* + * The modem is already online and we have the CM interface. + * There will be no interface update and therefore our + * state machine will not go to next step. We have to + * trigger it from here. + */ + if (has_interface(modem->interfaces, OFONO_API_CM) == TRUE) { + cm_get_properties(modem); + cm_get_contexts(modem); + } return; } |