mmcli,ussd: don't rely on lock status to allow actions

Commit 001f35234e fixed this very same thing in
all the other interface actions, but 3GPP USSD actions were not fixed.

https://bugs.freedesktop.org/show_bug.cgi?id=97954
This commit is contained in:
Aleksander Morgado
2016-09-28 09:27:17 +02:00
parent dd98454a7d
commit e5fa0233bb
+2 -2
View File
@@ -178,8 +178,8 @@ ensure_modem_3gpp (void)
static void
ensure_modem_3gpp_ussd (void)
{
if (mm_modem_get_unlock_required (mm_object_peek_modem (ctx->object)) != MM_MODEM_LOCK_NONE) {
g_printerr ("error: modem not unlocked yet\n");
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);
}