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"
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user