diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-08-21 11:16:15 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-08-21 11:16:15 +0200 |
commit | b61827f474af19302ff66621ef152419d75f0ef0 (patch) | |
tree | c25207e0f5a27f5a7029bc010d12a43c552c23dc | |
parent | ef5aae51254cd2336f09c87e84dfa9f496fc88dc (diff) |
huawei: ignore ^NDISEND unsolicited messages
-rw-r--r-- | plugins/huawei/mm-broadband-modem-huawei.c | 8 |
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 f356102d..453fbbdd 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -94,6 +94,7 @@ struct _MMBroadbandModemHuaweiPrivate { GRegex *hcsq_regex; GRegex *ndisstat_regex; GRegex *pdpdeact_regex; + GRegex *ndisend_regex; NdisdupSupport ndisdup_support; RfswitchSupport rfswitch_support; @@ -2878,6 +2879,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self) ports[i], self->priv->pdpdeact_regex, NULL, NULL, NULL); + mm_at_serial_port_add_unsolicited_msg_handler ( + ports[i], + self->priv->ndisend_regex, + NULL, NULL, NULL); } } @@ -2951,6 +2956,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self) 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->ndisend_regex = g_regex_new ("\\r\\n\\^NDISEND:.+\\r+\\n", + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); self->priv->ndisdup_support = NDISDUP_SUPPORT_UNKNOWN; self->priv->rfswitch_support = RFSWITCH_SUPPORT_UNKNOWN; @@ -2977,6 +2984,7 @@ finalize (GObject *object) g_regex_unref (self->priv->hcsq_regex); g_regex_unref (self->priv->ndisstat_regex); g_regex_unref (self->priv->pdpdeact_regex); + g_regex_unref (self->priv->ndisend_regex); G_OBJECT_CLASS (mm_broadband_modem_huawei_parent_class)->finalize (object); } |