From 750c41cbb535fcd12493f18e94f775df4cb42e53 Mon Sep 17 00:00:00 2001 From: ArenM Date: Tue, 7 Sep 2021 19:44:14 -0400 Subject: [PATCH] gnss: rearrange enable_mm_gnss so it doesn't noop --- src/gnss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gnss.c b/src/gnss.c index 2116c18..64fcbcf 100644 --- a/src/gnss.c +++ b/src/gnss.c @@ -372,9 +372,9 @@ static void finish_assistance_data_upload(struct EG25Manager *manager) #ifdef HAVE_MMGLIB static void enable_mm_gnss(struct EG25Manager *manager) { - MMModemLocationSource sources; - gboolean signal_location; g_autoptr (GError) error = NULL; + MMModemLocationSource sources = mm_modem_location_get_enabled(manager->mm_location); + gboolean signal_location = mm_modem_location_signals_location(manager->mm_location); if (manager->gnss_sources & EG25_GNSS_SOURCE_UNMANAGED) sources |= MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED; @@ -383,8 +383,6 @@ static void enable_mm_gnss(struct EG25Manager *manager) if (manager->gnss_sources & EG25_GNSS_SOURCE_RAW) sources |= MM_MODEM_LOCATION_SOURCE_GPS_RAW; - sources = mm_modem_location_get_enabled(manager->mm_location); - signal_location = mm_modem_location_signals_location(manager->mm_location); mm_modem_location_setup_sync(manager->mm_location, sources, signal_location, NULL, &error); if (error != NULL)