[PATCH v2] huawei: ignore +CUSATP and +CUSATEND unsolicited messages
Aleksander Morgado
aleksander at lanedo.com
Mon Aug 26 07:29:02 PDT 2013
On 22/08/13 08:00, Ben Chan wrote:
> ---
> plugins/huawei/mm-broadband-modem-huawei.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
Pushed, thanks.
> diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
> index 453fbbd..2e41563 100644
> --- a/plugins/huawei/mm-broadband-modem-huawei.c
> +++ b/plugins/huawei/mm-broadband-modem-huawei.c
> @@ -88,6 +88,8 @@ struct _MMBroadbandModemHuaweiPrivate {
> /* Regex to ignore */
> GRegex *boot_regex;
> GRegex *csnr_regex;
> + GRegex *cusatp_regex;
> + GRegex *cusatend_regex;
> GRegex *simst_regex;
> GRegex *srvst_regex;
> GRegex *stin_regex;
> @@ -2857,6 +2859,14 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
> NULL, NULL, NULL);
> mm_at_serial_port_add_unsolicited_msg_handler (
> ports[i],
> + self->priv->cusatp_regex,
> + NULL, NULL, NULL);
> + mm_at_serial_port_add_unsolicited_msg_handler (
> + ports[i],
> + self->priv->cusatend_regex,
> + NULL, NULL, NULL);
> + mm_at_serial_port_add_unsolicited_msg_handler (
> + ports[i],
> self->priv->simst_regex,
> NULL, NULL, NULL);
> mm_at_serial_port_add_unsolicited_msg_handler (
> @@ -2944,6 +2954,10 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
> 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",
> + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> + self->priv->cusatend_regex = g_regex_new ("\\r\\n\\+CUSATEND\\r\\n",
> + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> self->priv->simst_regex = g_regex_new ("\\r\\n\\^SIMST:.+\\r\\n",
> G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> self->priv->srvst_regex = g_regex_new ("\\r\\n\\^SRVST:.+\\r\\n",
> @@ -2978,6 +2992,8 @@ finalize (GObject *object)
> g_regex_unref (self->priv->dsflowrpt_regex);
> g_regex_unref (self->priv->boot_regex);
> g_regex_unref (self->priv->csnr_regex);
> + g_regex_unref (self->priv->cusatp_regex);
> + g_regex_unref (self->priv->cusatend_regex);
> g_regex_unref (self->priv->simst_regex);
> g_regex_unref (self->priv->srvst_regex);
> g_regex_unref (self->priv->stin_regex);
>
--
Aleksander
More information about the ModemManager-devel
mailing list