diff options
author | Denis Kenzior <denkenz@gmail.com> | 2015-12-15 15:11:28 -0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2015-12-15 17:17:00 -0600 |
commit | 68e4007d7b6d45941852e8c20cc9a02901b2c5b1 (patch) | |
tree | 162322840f8d0c1755909ff5b0ba41801b35fa8d | |
parent | 544651cdfe9051a74d47940b4cc1f9cc9cea1927 (diff) | |
download | ofono-68e4007d7b6d45941852e8c20cc9a02901b2c5b1.tar.bz2 |
modem: Don't move to pre-sim state in case of failure
In ofono_modem_reset, if the enable() callback fails, do not
proceed to the pre-sim state
-rw-r--r-- | src/modem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modem.c b/src/modem.c index 01b0e356..2de8d982 100644 --- a/src/modem.c +++ b/src/modem.c @@ -2132,6 +2132,9 @@ void ofono_modem_reset(struct ofono_modem *modem) if (err == -EINPROGRESS) return; + if (err < 0) + return; + modem_change_state(modem, MODEM_STATE_PRE_SIM); } |