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
This commit is contained in:
Jack Song
2022-07-06 11:07:06 +08:00
parent 1f2bea9184
commit 71a3942b3f

View File

@@ -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);