From ff04d53e32e94a7a158415e37ff19b4edf3bd42c Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 4 Apr 2011 23:48:41 -0500 Subject: modem: Tweak online logic if set_online is missing In case set_online is missing, we should set online mode directly. If we're already online then set our state to Online, otherwise check if we should get Online. --- src/modem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modem.c b/src/modem.c index 4ec5988d..a8b8744d 100644 --- a/src/modem.c +++ b/src/modem.c @@ -671,7 +671,10 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *user) * If we don't have the set_online method, also proceed * straight to the online state */ - if (modem->driver->set_online == NULL || modem->online == TRUE) + if (modem->driver->set_online == NULL) + set_online(modem, TRUE); + + if (modem->online == TRUE) modem_change_state(modem, MODEM_STATE_ONLINE); else if (modem->get_online) modem->driver->set_online(modem, 1, common_online_cb, -- cgit v1.2.3