diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 15:37:12 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 15:37:12 +0100 |
commit | 29b955afa29396cb51636ba58193d6ba5d87436c (patch) | |
tree | 69a8ec83ffbb98739faa0b2da554bd90b8eceacd | |
parent | 1dbe4a12cf88bf4e5bd1dab4aab170040747362b (diff) | |
download | ModemManager-29b955afa29396cb51636ba58193d6ba5d87436c.tar.gz |
iface-modem: if we are already unlocked, don't try to check it again
We're assuming here we are never getting locked without us knowing it.
-rw-r--r-- | src/mm-iface-modem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index a55b36bfe..f655cca17 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -2159,7 +2159,9 @@ mm_iface_modem_unlock_check (MMIfaceModem *self, ctx = unlock_check_context_new (self, callback, user_data); - if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_required && + /* If we're already unlocked, we're done */ + if (mm_gdbus_modem_get_unlock_required (ctx->skeleton) != MM_MODEM_LOCK_NONE && + MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_required && MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_required_finish) { MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_required ( self, |