diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-12 12:13:24 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-06 20:07:23 +0200 |
commit | 5d38983d66234144ed56a1a3def10dd882120322 (patch) | |
tree | 8abb147553a053c7df37d901a198ac825bcb6c8b | |
parent | 1c3644e4775696b5b68aa2b22fe51560751e9a40 (diff) |
huawei: ignore unsolicited ^CSNR notifications
-rw-r--r-- | plugins/huawei/mm-broadband-modem-huawei.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index 95f0489d..71435654 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -57,6 +57,7 @@ struct _MMBroadbandModemHuaweiPrivate { /* Regex to ignore */ GRegex *boot_regex; + GRegex *csnr_regex; }; /*****************************************************************************/ @@ -804,11 +805,16 @@ set_3gpp_unsolicited_events_handlers (MMBroadbandModemHuawei *self, NULL); /* Other unsolicited events to always ignore */ - if (!enable) + if (!enable) { mm_at_serial_port_add_unsolicited_msg_handler ( ports[i], self->priv->boot_regex, NULL, NULL, NULL); + mm_at_serial_port_add_unsolicited_msg_handler ( + ports[i], + self->priv->csnr_regex, + NULL, NULL, NULL); + } } } @@ -1148,6 +1154,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self) G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); self->priv->boot_regex = g_regex_new ("\\r\\n\\^BOOT:.+\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); + self->priv->csnr_regex = g_regex_new ("\\r\\n\\^CSNR:.+\\r\\n", + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); } static void @@ -1159,6 +1167,7 @@ finalize (GObject *object) g_regex_unref (self->priv->mode_regex); g_regex_unref (self->priv->dsflowrpt_regex); g_regex_unref (self->priv->boot_regex); + g_regex_unref (self->priv->csnr_regex); G_OBJECT_CLASS (mm_broadband_modem_huawei_parent_class)->finalize (object); } |