altair-lte: handle optional quotes around sim refresh

Some firmware version sends quotes around SIMREFRESH, this patch adds support
for those versions.
This commit is contained in:
Thieu Le
2014-06-02 18:48:09 -07:00
committed by Aleksander Morgado
parent 8680e066b5
commit a038ff172b

View File

@@ -1402,7 +1402,7 @@ mm_broadband_modem_altair_lte_init (MMBroadbandModemAltairLte *self)
MM_TYPE_BROADBAND_MODEM_ALTAIR_LTE,
MMBroadbandModemAltairLtePrivate);
self->priv->sim_refresh_regex = g_regex_new ("\\r\\n\\%NOTIFYEV:\\s*SIMREFRESH,?(\\d*)\\r+\\n",
self->priv->sim_refresh_regex = g_regex_new ("\\r\\n\\%NOTIFYEV:\\s*\"?SIMREFRESH\"?,?(\\d*)\\r+\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->sim_refresh_detach_in_progress = FALSE;
self->priv->sim_refresh_timer_id = 0;