From c00eff43ac6eda070645d77edc8da71facd972a3 Mon Sep 17 00:00:00 2001 From: Dylan Van Assche Date: Mon, 31 May 2021 16:56:30 +0200 Subject: quectel: ignore QLWURC QLWURCs are not ignored and causes calls to be rejected in some cases --- plugins/quectel/mm-shared-quectel.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins/quectel/mm-shared-quectel.c') diff --git a/plugins/quectel/mm-shared-quectel.c b/plugins/quectel/mm-shared-quectel.c index 2e72adc7..a332ed47 100644 --- a/plugins/quectel/mm-shared-quectel.c +++ b/plugins/quectel/mm-shared-quectel.c @@ -50,12 +50,14 @@ typedef struct { MMModemLocationSource enabled_sources; FeatureSupport qgps_supported; GRegex *qgpsurc_regex; + GRegex *qlwurc_regex; } Private; static void private_free (Private *priv) { g_regex_unref (priv->qgpsurc_regex); + g_regex_unref (priv->qlwurc_regex); g_slice_free (Private, priv); } @@ -75,6 +77,7 @@ get_private (MMSharedQuectel *self) priv->enabled_sources = MM_MODEM_LOCATION_SOURCE_NONE; priv->qgps_supported = FEATURE_SUPPORT_UNKNOWN; priv->qgpsurc_regex = g_regex_new ("\\r\\n\\+QGPSURC:.*", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); + priv->qlwurc_regex = g_regex_new ("\\r\\n\\+QLWURC:.*", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); g_assert (MM_SHARED_QUECTEL_GET_INTERFACE (self)->peek_parent_broadband_modem_class); priv->broadband_modem_class_parent = MM_SHARED_QUECTEL_GET_INTERFACE (self)->peek_parent_broadband_modem_class (self); @@ -120,6 +123,12 @@ mm_shared_quectel_setup_ports (MMBroadbandModem *self) ports[i], priv->qgpsurc_regex, NULL, NULL, NULL); + + /* Ignore +QLWURC */ + mm_port_serial_at_add_unsolicited_msg_handler ( + ports[i], + priv->qlwurc_regex, + NULL, NULL, NULL); } } -- cgit v1.2.3-70-g09d2