diff options
author | Florian Eckert <fe@dev.tdt.de> | 2024-03-18 13:55:30 +0100 |
---|---|---|
committer | Dan Williams <dan@bigw.org> | 2024-04-07 01:43:34 +0000 |
commit | b1aaa4c6b9f76d2cf856c245b76845a8bc215475 (patch) | |
tree | 207cef0df5700e4a4b7ac9c483ee6334e163f914 /src | |
parent | 17ab07c05ac994a433c5809671feb0247deeb541 (diff) |
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 <fe@dev.tdt.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 8 |
1 files changed, 2 insertions, 6 deletions
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 */ |