[PATCH] altair-lte: handle optional quotes around sim refresh

Thieu Le thieule at chromium.org
Mon Jun 2 18:48:09 PDT 2014


Some firmware version sends quotes around SIMREFRESH, this patch adds support
for those versions.

---
 plugins/altair/mm-broadband-modem-altair-lte.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/altair/mm-broadband-modem-altair-lte.c b/plugins/altair/mm-broadband-modem-altair-lte.c
index d313a51..b71884b 100644
--- a/plugins/altair/mm-broadband-modem-altair-lte.c
+++ b/plugins/altair/mm-broadband-modem-altair-lte.c
@@ -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;
-- 
1.8.3.2



More information about the ModemManager-devel mailing list