broadband-modem-qmi: since 1.24.6 all strings are valid UTF-8

This commit is contained in:
Aleksander Morgado
2020-04-09 11:15:30 +02:00
parent 4758e49d87
commit 9c0a937cf3

View File

@@ -2726,10 +2726,8 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self,
if (!self->priv->current_operator_description || !g_str_equal (self->priv->current_operator_description, description)) { if (!self->priv->current_operator_description || !g_str_equal (self->priv->current_operator_description, description)) {
operator_updated = TRUE; operator_updated = TRUE;
g_clear_pointer (&self->priv->current_operator_description, g_free); g_free (self->priv->current_operator_description);
/* Some Telit modems apparently sometimes report non-UTF8 characters */ self->priv->current_operator_description = g_strdup (description);
if (g_utf8_validate (description, -1, NULL))
self->priv->current_operator_description = g_strdup (description);
} }
} }