quectel: ignore QLWURC
QLWURCs are not ignored and causes calls to be rejected in some cases
This commit is contained in:

committed by
Dylan Van Assche

parent
e25a585c9f
commit
c00eff43ac
@@ -50,12 +50,14 @@ typedef struct {
|
|||||||
MMModemLocationSource enabled_sources;
|
MMModemLocationSource enabled_sources;
|
||||||
FeatureSupport qgps_supported;
|
FeatureSupport qgps_supported;
|
||||||
GRegex *qgpsurc_regex;
|
GRegex *qgpsurc_regex;
|
||||||
|
GRegex *qlwurc_regex;
|
||||||
} Private;
|
} Private;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
private_free (Private *priv)
|
private_free (Private *priv)
|
||||||
{
|
{
|
||||||
g_regex_unref (priv->qgpsurc_regex);
|
g_regex_unref (priv->qgpsurc_regex);
|
||||||
|
g_regex_unref (priv->qlwurc_regex);
|
||||||
g_slice_free (Private, priv);
|
g_slice_free (Private, priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,6 +77,7 @@ get_private (MMSharedQuectel *self)
|
|||||||
priv->enabled_sources = MM_MODEM_LOCATION_SOURCE_NONE;
|
priv->enabled_sources = MM_MODEM_LOCATION_SOURCE_NONE;
|
||||||
priv->qgps_supported = FEATURE_SUPPORT_UNKNOWN;
|
priv->qgps_supported = FEATURE_SUPPORT_UNKNOWN;
|
||||||
priv->qgpsurc_regex = g_regex_new ("\\r\\n\\+QGPSURC:.*", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
|
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);
|
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);
|
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],
|
ports[i],
|
||||||
priv->qgpsurc_regex,
|
priv->qgpsurc_regex,
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
|
/* Ignore +QLWURC */
|
||||||
|
mm_port_serial_at_add_unsolicited_msg_handler (
|
||||||
|
ports[i],
|
||||||
|
priv->qlwurc_regex,
|
||||||
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user