From c3f318213eaa21eaaa86b02661a520a5af8eee18 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 21 Dec 2011 14:40:02 +0100 Subject: 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. --- plugins/ofono.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins/ofono.c') 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; } -- cgit v1.2.3