[PATCH] huawei: ignore ^DSDORMANT unsolicited messages
Aleksander Morgado
aleksander at lanedo.com
Mon Sep 2 00:14:14 PDT 2013
On 27/08/13 09:44, Ben Chan wrote:
> ---
> plugins/huawei/mm-broadband-modem-huawei.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Pushed, thanks. Will see how we can update the API to introduce the
dormant state indications.
> diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
> index 7f760f3..fffbc9b 100644
> --- a/plugins/huawei/mm-broadband-modem-huawei.c
> +++ b/plugins/huawei/mm-broadband-modem-huawei.c
> @@ -90,6 +90,7 @@ struct _MMBroadbandModemHuaweiPrivate {
> GRegex *csnr_regex;
> GRegex *cusatp_regex;
> GRegex *cusatend_regex;
> + GRegex *dsdormant_regex;
> GRegex *simst_regex;
> GRegex *srvst_regex;
> GRegex *stin_regex;
> @@ -2939,6 +2940,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
> NULL, NULL, NULL);
> mm_at_serial_port_add_unsolicited_msg_handler (
> ports[i],
> + self->priv->dsdormant_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 (
> @@ -3034,6 +3039,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
> 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->dsdormant_regex = g_regex_new ("\\r\\n\\^DSDORMANT:.+\\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",
> @@ -3072,6 +3079,7 @@ finalize (GObject *object)
> 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->dsdormant_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