aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-07-29 16:57:30 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-07-31 23:12:55 +0200
commit13d82c1de205e9eaafc21c17858ff6ed03543b03 (patch)
tree0c2f583e5a9a919f5fe51bbb0265c221965a9152 /plugins
parentb0248e471ced05dfd5fa1cebe732722d10738add (diff)
huawei: ignore ^LWURC URCs
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/412
Diffstat (limited to 'plugins')
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 018cbd1e..866707d6 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -131,6 +131,7 @@ struct _MMBroadbandModemHuaweiPrivate {
GRegex *cschannelinfo_regex;
GRegex *ccallstate_regex;
GRegex *eons_regex;
+ GRegex *lwurc_regex;
FeatureSupport ndisdup_support;
FeatureSupport rfswitch_support;
@@ -4374,6 +4375,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
port,
self->priv->eons_regex,
NULL, NULL, NULL);
+ mm_port_serial_at_add_unsolicited_msg_handler (
+ port,
+ self->priv->lwurc_regex,
+ NULL, NULL, NULL);
}
g_list_free_full (ports, g_object_unref);
@@ -4514,6 +4519,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->eons_regex = g_regex_new ("\\r\\n\\^EONS:.+\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
+ self->priv->lwurc_regex = g_regex_new ("\\r\\n\\^LWURC:.+\\r\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->ndisdup_support = FEATURE_SUPPORT_UNKNOWN;
self->priv->rfswitch_support = FEATURE_SUPPORT_UNKNOWN;
@@ -4573,6 +4580,7 @@ finalize (GObject *object)
g_regex_unref (self->priv->cschannelinfo_regex);
g_regex_unref (self->priv->ccallstate_regex);
g_regex_unref (self->priv->eons_regex);
+ g_regex_unref (self->priv->lwurc_regex);
if (self->priv->syscfg_supported_modes)
g_array_unref (self->priv->syscfg_supported_modes);