diff options
author | Slava Monich <slava.monich@jolla.com> | 2021-04-26 11:17:34 +0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2021-04-30 09:30:38 -0500 |
commit | e31ffc9891361640ea78e1abe16894daf247b337 (patch) | |
tree | 1b7a558462be1eb6b95131b91aa8657a71938810 | |
parent | 906c126009cfab13ea8eb6febabf4a28bf5217b0 (diff) | |
download | ofono-e31ffc9891361640ea78e1abe16894daf247b337.tar.gz |
sim-auth: Only close open sessions
Session has to be open in order to have a valid session_id
-rw-r--r-- | src/sim.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3805,7 +3805,8 @@ void __ofono_sim_remove_session_watch(struct ofono_sim_aid_session *session, { __ofono_watchlist_remove_item(session->watches, id); - if (g_slist_length(session->watches->items) == 0) { + if (g_slist_length(session->watches->items) == 0 && + session->state == SESSION_STATE_OPEN) { /* last watcher, close session */ session->state = SESSION_STATE_CLOSING; session->sim->driver->close_channel(session->sim, |