From 63dd4ad263be6bd3d38cbbccac80993fe7351b52 Mon Sep 17 00:00:00 2001 From: Raphaƫl Jakse Date: Wed, 18 Oct 2023 15:12:30 +0200 Subject: 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 Fixes #183 --- cli/mmcli-modem-location.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'cli/mmcli-modem-location.c') 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); -- cgit v1.2.3-70-g09d2