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
This commit is contained in:
committed by
Aleksander Morgado
parent
224c04065d
commit
63dd4ad263
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user