mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 06:28:05 +02:00
Revert "wwan/device-modem: don't enter available state until registered"
This is wrong -- we may want to start activating before device is
registered if it the SIM needs unlocking with a PIN code that's included
in the connection.
This reverts commit 2e8f43e379.
This commit is contained in:
parent
d66a1ace23
commit
32e0bf1421
1 changed files with 6 additions and 7 deletions
|
|
@ -473,6 +473,11 @@ check_connection_available (NMDevice *device,
|
|||
}
|
||||
|
||||
state = nm_modem_get_state (priv->modem);
|
||||
if (state <= NM_MODEM_STATE_INITIALIZING) {
|
||||
nm_utils_error_set_literal (error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
|
||||
"modem not initialized");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (state == NM_MODEM_STATE_LOCKED) {
|
||||
if (!nm_connection_get_setting_gsm (connection)) {
|
||||
|
|
@ -482,12 +487,6 @@ check_connection_available (NMDevice *device,
|
|||
}
|
||||
}
|
||||
|
||||
if (state < NM_MODEM_STATE_REGISTERED) {
|
||||
nm_utils_error_set_literal (error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
|
||||
"modem not registered");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -659,7 +658,7 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|||
|
||||
g_assert (priv->modem);
|
||||
modem_state = nm_modem_get_state (priv->modem);
|
||||
if (modem_state < NM_MODEM_STATE_REGISTERED)
|
||||
if (modem_state <= NM_MODEM_STATE_INITIALIZING)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue