aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-iface-modem-simple.c')
-rw-r--r--src/mm-iface-modem-simple.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c
index 3e3a9153..ef66c88b 100644
--- a/src/mm-iface-modem-simple.c
+++ b/src/mm-iface-modem-simple.c
@@ -683,18 +683,12 @@ unlock_check_ready (MMIfaceModem *self,
/* During simple connect we are only allowed to use SIM PIN */
if (lock != MM_MODEM_LOCK_SIM_PIN ||
!mm_common_connect_properties_get_pin (ctx->properties)) {
- GEnumClass *enum_class;
- GEnumValue *value;
-
- enum_class = G_ENUM_CLASS (g_type_class_ref (MM_TYPE_MODEM_LOCK));
- value = g_enum_get_value (enum_class, lock);
g_dbus_method_invocation_return_error (
ctx->invocation,
MM_CORE_ERROR,
MM_CORE_ERROR_UNAUTHORIZED,
"Modem is locked with '%s' code; cannot unlock it",
- value->value_nick);
- g_type_class_unref (enum_class);
+ mm_modem_lock_get_string (lock));
connection_context_free (ctx);
return;
}