huawei: ignore ^CONNECT unsolicited messages
This commit is contained in:

committed by
Aleksander Morgado

parent
0755beff07
commit
9aced8311b
@@ -88,6 +88,7 @@ struct _MMBroadbandModemHuaweiPrivate {
|
||||
|
||||
/* Regex to ignore */
|
||||
GRegex *boot_regex;
|
||||
GRegex *connect_regex;
|
||||
GRegex *csnr_regex;
|
||||
GRegex *cusatp_regex;
|
||||
GRegex *cusatend_regex;
|
||||
@@ -2953,6 +2954,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
|
||||
ports[i],
|
||||
self->priv->boot_regex,
|
||||
NULL, NULL, NULL);
|
||||
mm_at_serial_port_add_unsolicited_msg_handler (
|
||||
ports[i],
|
||||
self->priv->connect_regex,
|
||||
NULL, NULL, NULL);
|
||||
mm_at_serial_port_add_unsolicited_msg_handler (
|
||||
ports[i],
|
||||
self->priv->csnr_regex,
|
||||
@@ -3060,6 +3065,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->connect_regex = g_regex_new ("\\r\\n\\^CONNECT .+\\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);
|
||||
self->priv->cusatp_regex = g_regex_new ("\\r\\n\\+CUSATP:.+\\r\\n",
|
||||
@@ -3103,6 +3110,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->connect_regex);
|
||||
g_regex_unref (self->priv->csnr_regex);
|
||||
g_regex_unref (self->priv->cusatp_regex);
|
||||
g_regex_unref (self->priv->cusatend_regex);
|
||||
|
Reference in New Issue
Block a user