[PATCH] huawei: ignore ^PDPDEACT unsolicited messages
Ben Chan
benchan at chromium.org
Tue Aug 6 10:10:09 PDT 2013
---
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 15f3524..b393f31 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -93,6 +93,7 @@ struct _MMBroadbandModemHuaweiPrivate {
GRegex *stin_regex;
GRegex *hcsq_regex;
GRegex *ndisstat_regex;
+ GRegex *pdpdeact_regex;
NdisdupSupport ndisdup_support;
RfswitchSupport rfswitch_support;
@@ -2838,6 +2839,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
ports[i],
self->priv->ndisstat_regex,
NULL, NULL, NULL);
+ mm_at_serial_port_add_unsolicited_msg_handler (
+ ports[i],
+ self->priv->pdpdeact_regex,
+ NULL, NULL, NULL);
}
}
@@ -2909,6 +2914,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->ndisstat_regex = g_regex_new ("\\r\\n\\^NDISSTAT:.+\\r+\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
+ self->priv->pdpdeact_regex = g_regex_new ("\\r\\n\\^PDPDEACT:.+\\r+\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->ndisdup_support = NDISDUP_SUPPORT_UNKNOWN;
self->priv->rfswitch_support = RFSWITCH_SUPPORT_UNKNOWN;
@@ -2934,6 +2941,7 @@ finalize (GObject *object)
g_regex_unref (self->priv->stin_regex);
g_regex_unref (self->priv->hcsq_regex);
g_regex_unref (self->priv->ndisstat_regex);
+ g_regex_unref (self->priv->pdpdeact_regex);
G_OBJECT_CLASS (mm_broadband_modem_huawei_parent_class)->finalize (object);
}
--
1.8.3
More information about the ModemManager-devel
mailing list