From 91d343520fec5c5905a4cc3ce898f75025f3f2a8 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 13 Mar 2016 13:21:05 +0100 Subject: [PATCH] huawei: ignore ^LTERSRP unsolicited message Based on a previous patch from Dan Williams --- plugins/huawei/mm-broadband-modem-huawei.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index 56b5bf09..c6509011 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -118,6 +118,7 @@ struct _MMBroadbandModemHuaweiPrivate { GRegex *position_regex; GRegex *posend_regex; GRegex *ecclist_regex; + GRegex *ltersrp_regex; FeatureSupport ndisdup_support; FeatureSupport rfswitch_support; @@ -4043,6 +4044,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self) port, self->priv->ecclist_regex, NULL, NULL, NULL); + mm_port_serial_at_add_unsolicited_msg_handler ( + port, + self->priv->ltersrp_regex, + NULL, NULL, NULL); } g_list_free_full (ports, (GDestroyNotify)g_object_unref); @@ -4161,6 +4166,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self) G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); self->priv->ecclist_regex = g_regex_new ("\\r\\n\\^ECCLIST:.+\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); + self->priv->ltersrp_regex = g_regex_new ("\\r\\n\\^LTERSRP:.+\\r\\n", + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); /* Voice related regex * ^ORIG: , @@ -4229,6 +4236,7 @@ finalize (GObject *object) g_regex_unref (self->priv->position_regex); g_regex_unref (self->priv->posend_regex); g_regex_unref (self->priv->ecclist_regex); + g_regex_unref (self->priv->ltersrp_regex); g_regex_unref (self->priv->orig_regex); g_regex_unref (self->priv->conf_regex); g_regex_unref (self->priv->conn_regex);