mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 04:50:11 +01:00
device: minor refactoring of condition in nm_device_autoconnect_allowed()
Makes it clearer what is happening (to me).
This commit is contained in:
parent
7074b88a6a
commit
45da11f370
1 changed files with 6 additions and 3 deletions
|
|
@ -4307,9 +4307,12 @@ nm_device_autoconnect_allowed (NMDevice *self)
|
|||
if (!nm_device_get_enabled (self))
|
||||
return FALSE;
|
||||
|
||||
/* Unrealized devices can always autoconnect. */
|
||||
if (nm_device_is_real (self) && priv->state < NM_DEVICE_STATE_DISCONNECTED)
|
||||
return FALSE;
|
||||
if (nm_device_is_real (self)) {
|
||||
if (priv->state < NM_DEVICE_STATE_DISCONNECTED)
|
||||
return FALSE;
|
||||
} else {
|
||||
/* Unrealized devices can always autoconnect. */
|
||||
}
|
||||
|
||||
/* The 'autoconnect-allowed' signal is emitted on a device to allow
|
||||
* other listeners to block autoconnect on the device if they wish.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue