aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorRaphaƫl Jakse <raphael.freedesktop@jakse.fr>2023-10-18 15:12:30 +0200
committerAleksander Morgado <aleksandermj@chromium.org>2023-12-11 12:37:42 +0000
commit63dd4ad263be6bd3d38cbbccac80993fe7351b52 (patch)
tree913a1c9b4d04b33fa159b41867ace0652571d3b8 /cli
parent224c04065d459356e98ce0e3bb32425ce344ad14 (diff)
iface-location: allow enabling without SIM
When the modem is in a failed state because of a SIM-related error, like a missing SIM, or if the modem is SIM-locked, allow the Location interface to initialize and be enabled anyway. This allows someone without a SIM to use the GPS, which does not particularly require a phone subscription. It also allows someone with a SIM to use the GPS even if the SIM is still locked. This patch was reworked, while keeping the original idea, by: Aleksander Morgado <aleksander@aleksander.es> Fixes #183
Diffstat (limited to 'cli')
-rw-r--r--cli/mmcli-modem-location.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/cli/mmcli-modem-location.c b/cli/mmcli-modem-location.c
index 936ff425..a081f91c 100644
--- a/cli/mmcli-modem-location.c
+++ b/cli/mmcli-modem-location.c
@@ -254,11 +254,6 @@ context_free (void)
static void
ensure_modem_location (void)
{
- if (mm_modem_get_state (mm_object_peek_modem (ctx->object)) < MM_MODEM_STATE_ENABLED) {
- g_printerr ("error: modem not enabled yet\n");
- exit (EXIT_FAILURE);
- }
-
if (!ctx->modem_location) {
g_printerr ("error: modem has no location capabilities\n");
exit (EXIT_FAILURE);