summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeemu Ikonen <tpikonen@mailbox.org>2021-08-24 18:33:51 +0300
committerTeemu Ikonen <tpikonen@gmail.com>2021-08-30 06:49:59 +0000
commitd6dafe5cb4096cb2d664d3b6dcfcd7bd2269d79e (patch)
treed4172c13d8c93c1d97dac623e839f27a4f12ac4b
parent5af93dbfeeb7336934f9713243ebf0ec28c2fd32 (diff)
downloadModemManager-d6dafe5cb4096cb2d664d3b6dcfcd7bd2269d79e.tar.gz
location-gps-nmea: Fix handling of multi-sentence NMEA messages
Fixes the regexp in check_append_or_replace() to accept 1. more multi-sentence NMEA messages (ALM, GSV, RTE, SFI) 2. multi-sentence NMEA messages from all talkers, not just GPS (i.e. GPGSV, GLGSV, GAGSV etc.)
-rw-r--r--libmm-glib/mm-location-gps-nmea.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmm-glib/mm-location-gps-nmea.c b/libmm-glib/mm-location-gps-nmea.c
index f1a33bf75..396e24fc1 100644
--- a/libmm-glib/mm-location-gps-nmea.c
+++ b/libmm-glib/mm-location-gps-nmea.c
@@ -52,7 +52,7 @@ check_append_or_replace (MMLocationGpsNmea *self,
GMatchInfo *match_info = NULL;
if (G_UNLIKELY (!self->priv->sequence_regex))
- self->priv->sequence_regex = g_regex_new ("\\$GPGSV,(\\d),(\\d).*",
+ self->priv->sequence_regex = g_regex_new ("\\$..(?:ALM|GSV|RTE|SFI),(\\d),(\\d).*",
G_REGEX_RAW | G_REGEX_OPTIMIZE,
0,
NULL);