diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-06-28 11:06:06 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-06-29 08:53:00 +0000 |
commit | 538ed3f24e9ec5d64abc1543476e5ee34b504455 (patch) | |
tree | 4dbc28ab32ba2706d8c54151cc34a2f6ef15f4e6 | |
parent | 77f6637750362a8c319e2debc6f781ceb217675a (diff) |
quectel,shared: don't report GPS capabilities if no GPS port found
The QGPS based implementation needs the existence of a port flagged as
GPS data; if there is no such port, we cannot provide GPS support.
-rw-r--r-- | plugins/quectel/mm-shared-quectel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/quectel/mm-shared-quectel.c b/plugins/quectel/mm-shared-quectel.c index 2d3a0d72..2bdc7d78 100644 --- a/plugins/quectel/mm-shared-quectel.c +++ b/plugins/quectel/mm-shared-quectel.c @@ -318,6 +318,14 @@ parent_load_capabilities_ready (MMIfaceModemLocation *self, return; } + /* Now our own check. If we don't have any GPS port, we're done */ + if (!mm_base_modem_peek_port_gps (MM_BASE_MODEM (self))) { + mm_obj_dbg (self, "no GPS data port found: no GPS capabilities"); + g_task_return_int (task, sources); + g_object_unref (task); + return; + } + /* Store parent supported sources in task data */ g_task_set_task_data (task, GUINT_TO_POINTER (sources), NULL); |