From 80a8fd1a6421b1364ec3f9c2de07bf1f74a304dd Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 22 Nov 2010 09:56:22 -0600 Subject: [PATCH] modem: Don't notify online watches the first time We should not notify the online watches when we enter the OFFLINE state for the first time. We should only do so when we go from ONLINE state into the OFFLINE state. --- src/modem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modem.c b/src/modem.c index e519f40e..cfc767e6 100644 --- a/src/modem.c +++ b/src/modem.c @@ -420,9 +420,9 @@ static void modem_change_state(struct ofono_modem *modem, driver->post_sim(modem); __ofono_history_probe_drivers(modem); __ofono_nettime_probe_drivers(modem); - } + } else + notify_online_watches(modem); - notify_online_watches(modem); break; case MODEM_STATE_ONLINE: