diff options
Diffstat (limited to 'plugins/quectel/mm-shared-quectel.c')
-rw-r--r-- | plugins/quectel/mm-shared-quectel.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/quectel/mm-shared-quectel.c b/plugins/quectel/mm-shared-quectel.c index c485f6f5..aaeca95f 100644 --- a/plugins/quectel/mm-shared-quectel.c +++ b/plugins/quectel/mm-shared-quectel.c @@ -346,6 +346,9 @@ gps_startup_ready (MMBaseModem *self, { MMModemLocationSource source; GError *error = NULL; + Private *priv; + + priv = get_private (MM_SHARED_QUECTEL (self)); mm_base_modem_at_sequence_finish (self, res, NULL, &error); if (error) { @@ -369,10 +372,16 @@ gps_startup_ready (MMBaseModem *self, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Couldn't open raw GPS serial port"); - } else + } else { + /* GPS port was successfully opened */ + priv->enabled_sources |= source; g_task_return_boolean (task, TRUE); - } else + } + } else { + /* No need to open GPS port */ + priv->enabled_sources |= source; g_task_return_boolean (task, TRUE); + } g_object_unref (task); } @@ -428,8 +437,6 @@ mm_shared_quectel_enable_location_gathering (MMIfaceModemLocation *self, MM_MODEM_LOCATION_SOURCE_GPS_RAW | MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED))); - priv->enabled_sources |= source; - if (start_gps) { mm_base_modem_at_sequence ( MM_BASE_MODEM (self), @@ -442,6 +449,7 @@ mm_shared_quectel_enable_location_gathering (MMIfaceModemLocation *self, } /* If the GPS is already running just return */ + priv->enabled_sources |= source; g_task_return_boolean (task, TRUE); g_object_unref (task); } |