summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2022-06-18 22:13:49 +0200
committerMaciej S. Szmigiero <mail@maciej.szmigiero.name>2022-07-10 02:01:47 +0200
commit2e6fd0e6293df7ee71a0a0c881f86bb8df23fe68 (patch)
tree4a8875b88cc81bb5e1416927cf78e78109760c97 /src
parentae8bd98df2121996fd1074d5ad523a70bfdf19e2 (diff)
downloadgeoclue-2e6fd0e6293df7ee71a0a0c881f86bb8df23fe68.tar.gz
locator: consider also Network NMEA as a MLS submit source
Currently, only Modem-GPS is supported as a provider of a location to submit to MLS. Let's also allow Network NMEA as such source if Modem-GPS is disabled in the config - it's very unlikely that both are going to be actually present on the same system and submission is disabled by default anyway.
Diffstat (limited to 'src')
-rw-r--r--src/gclue-locator.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gclue-locator.c b/src/gclue-locator.c
index 150d829..5820f99 100644
--- a/src/gclue-locator.c
+++ b/src/gclue-locator.c
@@ -387,7 +387,9 @@ gclue_locator_constructed (GObject *object)
GClueModemGPS *gps = gclue_modem_gps_get_singleton ();
locator->priv->sources = g_list_append (locator->priv->sources,
gps);
- submit_source = GCLUE_LOCATION_SOURCE (gps);
+ if (!submit_source) {
+ submit_source = GCLUE_LOCATION_SOURCE (gps);
+ }
}
#endif
#if GCLUE_USE_NMEA_SOURCE
@@ -395,6 +397,10 @@ gclue_locator_constructed (GObject *object)
GClueNMEASource *nmea = gclue_nmea_source_get_singleton ();
locator->priv->sources = g_list_append (locator->priv->sources,
nmea);
+ if (!submit_source) {
+ submit_source = GCLUE_LOCATION_SOURCE (nmea);
+ }
+
}
#endif