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>
This commit is contained in:
committed by
Dan Williams
parent
17ab07c05a
commit
b1aaa4c6b9
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user