aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-05-09 12:36:08 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-05-09 14:45:13 +0200
commitf96bb04c001d637a43989961a57ddaa553aa7a27 (patch)
treeb0da1409339da8552f1b9b8f560e5652bada894b
parentcba3f7db657d53db910e725f95c258f4faabcbbd (diff)
huawei: ignore ^NDISSTAT unsolicited messages
These messages give us information about the current connection status in the NDIS interface. We already have other means to know this status, so we just ignore the unsolicited message for now. E.g.: ^NDISSTAT: 1,,,"IPV4"
-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 4a964d87..d9895246 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -86,6 +86,7 @@ struct _MMBroadbandModemHuaweiPrivate {
GRegex *srvst_regex;
GRegex *stin_regex;
GRegex *hcsq_regex;
+ GRegex *ndisstat_regex;
NdisdupSupport ndisdup_support;
};
@@ -2173,6 +2174,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
ports[i],
self->priv->hcsq_regex,
NULL, NULL, NULL);
+ mm_at_serial_port_add_unsolicited_msg_handler (
+ ports[i],
+ self->priv->ndisstat_regex,
+ NULL, NULL, NULL);
}
}
@@ -2242,6 +2247,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->hcsq_regex = g_regex_new ("\\r\\n\\^HCSQ:.+\\r+\\n",
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->ndisdup_support = NDISDUP_SUPPORT_UNKNOWN;
}
@@ -2262,6 +2269,7 @@ finalize (GObject *object)
g_regex_unref (self->priv->srvst_regex);
g_regex_unref (self->priv->stin_regex);
g_regex_unref (self->priv->hcsq_regex);
+ g_regex_unref (self->priv->ndisstat_regex);
G_OBJECT_CLASS (mm_broadband_modem_huawei_parent_class)->finalize (object);
}