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.
This commit is contained in:
Aleksander Morgado
2012-03-16 15:37:12 +01:00
parent 1dbe4a12cf
commit 29b955afa2

View File

@@ -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,