From 6014d4c610a5a6dc016f6aa49e7ee04a411fd4f4 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 17 Nov 2011 04:51:18 +0000 Subject: [PATCH] Only force modem to stop if not already stopped --- src/phone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phone.c b/src/phone.c index d666653..2c785e7 100644 --- a/src/phone.c +++ b/src/phone.c @@ -2834,8 +2834,8 @@ static void _system_on_ok(gpointer data) } _phone_config_save(phone); /* restart the phone */ - phone_event_type(phone, PHONE_EVENT_TYPE_STOPPING); /* ignore errors */ - modem_stop(phone->modem); + if(phone_event_type(phone, PHONE_EVENT_TYPE_STOPPING) != 0) + modem_stop(phone->modem); /* force modem to stop */ phone_event_type(phone, PHONE_EVENT_TYPE_STARTING); }