From 906c126009cfab13ea8eb6febabf4a28bf5217b0 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Mon, 26 Apr 2021 11:17:33 +0300 Subject: sim-auth: Remove watch if open_channel fails Otherwise open_channel won't be called again after a failure. --- src/sim-auth.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/sim-auth.c b/src/sim-auth.c index 0e13b533..3c3f35e7 100644 --- a/src/sim-auth.c +++ b/src/sim-auth.c @@ -367,6 +367,8 @@ static void get_session_cb(ofono_bool_t active, int session_id, error: __ofono_dbus_pending_reply(&sa->pending->msg, __ofono_error_failed(sa->pending->msg)); + __ofono_sim_remove_session_watch(sa->pending->session, + sa->pending->watch_id); g_free(sa->pending); sa->pending = NULL; } -- cgit v1.2.1