From b1aaa4c6b9f76d2cf856c245b76845a8bc215475 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 18 Mar 2024 13:55:30 +0100 Subject: mm-broadband-modem-qmi: always reload current operator description When using a modem with the qmi plugin, the operator description is only set once for the current modem object. This is the operator description of the mobile network to which the modem has first established a connection. The operator description will no longer be updated even though on a reconnection with a different mobile network. Normally this is not a problem, as the SIM card usually dials into the home network and stays there. But if an IoT SIM card is used, then this is a problem because the operator description is no longer updated. To fix this, the 'current_operator_description' is always loaded on 'modem_3gpp_load_operator_name' regardless of whether an operator description has ever been set. Signed-off-by: Florian Eckert --- src/mm-broadband-modem-qmi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 1043f6bf..dd0d624c 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -3578,12 +3578,6 @@ modem_3gpp_load_operator_name (MMIfaceModem3gpp *_self, task = g_task_new (self, NULL, callback, user_data); - if (self->priv->current_operator_description) { - g_task_return_pointer (task, g_strdup (self->priv->current_operator_description), g_free); - g_object_unref (task); - return; - } - /* Check if operator id is set */ if (!self->priv->current_operator_id) { g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, @@ -3961,6 +3955,8 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self, if (operator_id) { g_free (self->priv->current_operator_id); self->priv->current_operator_id = operator_id; + g_free (self->priv->current_operator_description); + self->priv->current_operator_description = NULL; } /* Update registration states */ -- cgit v1.2.3-70-g09d2