diff options
author | Jack Song <jinjian.song@fibocom.com> | 2022-07-06 11:07:06 +0800 |
---|---|---|
committer | Jack Song <jinjian.song@fibocom.com> | 2022-07-06 11:07:06 +0800 |
commit | 71a3942b3fe712b95becab5159639ec6aecc0a7c (patch) | |
tree | a8b8fa9f559da4ce441dc660fc73e20942d8537b | |
parent | 1f2bea91849dffe424c4f779dd85b7fdf06af16c (diff) |
mm-bearer-mbim: ignore mbim status error 'SIM not inserted' while disconnecting
Ignore the error SIM_NOT_INSERTED when ModemManager disable modem after SIM card removed
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/578
-rw-r--r-- | src/mm-bearer-mbim.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c index 542881e3..057f006a 100644 --- a/src/mm-bearer-mbim.c +++ b/src/mm-bearer-mbim.c @@ -1584,6 +1584,14 @@ disconnect_set_ready (MbimDevice *device, goto out; } + if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_SIM_NOT_INSERTED)) { + g_clear_error (&error); + g_clear_error (&inner_error); + mm_obj_dbg (self, "SIM card not inserted: already disconnected"); + /* success */ + goto out; + } + if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_FAILURE) && parsed_result && nw_error != 0) { g_assert (!inner_error); g_error_free (error); |