broadband-modem: do not release SIM swap port contexts on disable
Currently when the modem is disabled, it releases SIM hot swap ports context, and is not able to receive any notification about the SIM status. This patch keeps these ports opened when Modem is disabled and released them only when SIM swap is detected or when modem is released.
This commit is contained in:
committed by
Aleksander Morgado
parent
a1210af7d5
commit
5014cf3976
@@ -8640,10 +8640,6 @@ disabling_stopped (MMBroadbandModem *self,
|
||||
self->priv->enabled_ports_ctx = NULL;
|
||||
}
|
||||
|
||||
if (self->priv->sim_hot_swap_ports_ctx) {
|
||||
ports_context_unref (self->priv->sim_hot_swap_ports_ctx);
|
||||
self->priv->sim_hot_swap_ports_ctx = NULL;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -10661,6 +10657,9 @@ finalize (GObject *object)
|
||||
if (self->priv->enabled_ports_ctx)
|
||||
ports_context_unref (self->priv->enabled_ports_ctx);
|
||||
|
||||
if (self->priv->sim_hot_swap_ports_ctx)
|
||||
ports_context_unref (self->priv->sim_hot_swap_ports_ctx);
|
||||
|
||||
if (self->priv->modem_3gpp_registration_regex)
|
||||
mm_3gpp_creg_regex_destroy (self->priv->modem_3gpp_registration_regex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user