iface-modem: remove redundant logic to update failed state

When the MMIfaceModem initialization returns with the SIM_NOT_INSERTED
error, the base logic is already updating the modem failed reason to
SIM_MISSING. There is no need to do that explicitly for the case where
SIM hot swap is supported.
This commit is contained in:
Aleksander Morgado
2018-12-07 16:23:52 +00:00
committed by Dan Williams
parent f4941ede66
commit 27276bf862
+1 -15
View File
@@ -4984,21 +4984,7 @@ interface_initialization_step (GTask *task)
G_CALLBACK (handle_factory_reset),
self);
if (ctx->fatal_error) {
if (g_error_matches (ctx->fatal_error,
MM_MOBILE_EQUIPMENT_ERROR,
MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED)) {
gboolean is_sim_hot_swap_supported = FALSE;
g_object_get (self,
MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, &is_sim_hot_swap_supported,
NULL);
if (is_sim_hot_swap_supported) {
mm_iface_modem_update_failed_state (self, MM_MODEM_STATE_FAILED_REASON_SIM_MISSING);
}
}
} else {
if (!ctx->fatal_error) {
/* We are done without errors!
* Handle method invocations */
g_signal_connect (ctx->skeleton,