diff options
author | Carlo Lobrano <c.lobrano@gmail.com> | 2017-08-29 09:15:52 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-08-29 11:17:47 +0200 |
commit | 5014cf39767a24109de945d99c6b9f4bb1b07274 (patch) | |
tree | 8bf77ac8340b627a31a7e5d543bcef74641b459b /src | |
parent | a1210af7d5ce9986ffd8c30229ef0ca40dbf452a (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 552bdc5f..3d96372a 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -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); |