mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 06:38:11 +02:00
device: move nm_device_get_enabled() from schedule_activate_check() to nm_device_autoconnect_allowed()
This commit is contained in:
parent
9a7e668dbb
commit
fc18ff30cf
2 changed files with 3 additions and 3 deletions
|
|
@ -4304,6 +4304,9 @@ nm_device_autoconnect_allowed (NMDevice *self)
|
||||||
&& !klass->get_autoconnect_allowed (self))
|
&& !klass->get_autoconnect_allowed (self))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!nm_device_get_enabled (self))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* Unrealized devices can always autoconnect. */
|
/* Unrealized devices can always autoconnect. */
|
||||||
if (nm_device_is_real (self) && priv->state < NM_DEVICE_STATE_DISCONNECTED)
|
if (nm_device_is_real (self) && priv->state < NM_DEVICE_STATE_DISCONNECTED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
|
|
@ -1517,9 +1517,6 @@ schedule_activate_check (NMPolicy *self, NMDevice *device)
|
||||||
if (nm_manager_get_state (priv->manager) == NM_STATE_ASLEEP)
|
if (nm_manager_get_state (priv->manager) == NM_STATE_ASLEEP)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!nm_device_get_enabled (device))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!nm_device_autoconnect_allowed (device))
|
if (!nm_device_autoconnect_allowed (device))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue