From 5a24916aaedc144cf338542bf440e30021ef4089 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 26 May 2010 17:45:06 -0500 Subject: [PATCH] Fix: Go to online state if set_online is NULL --- src/modem.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modem.c b/src/modem.c index cb8cc4bc..a99d792a 100644 --- a/src/modem.c +++ b/src/modem.c @@ -1269,6 +1269,15 @@ static void modem_sim_ready(void *user, enum ofono_sim_state new_state) break; case OFONO_SIM_STATE_READY: modem_change_state(modem, MODEM_STATE_OFFLINE); + + /* + * If we don't have the set_online method, also proceed + * straight to the online state + */ + if (modem->driver->set_online == NULL) + modem_change_state(modem, MODEM_STATE_ONLINE); + + break; } }