mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-04 09:30:36 +01:00
fixup! policy: track autoconnect retries per Device x Connection
The function is-blocked performs a series of checks, and when any of them is true, it returns is-blocked TRUE. It's a list of "if(check)return TRUE". Follow that pattern consistently throughout the function, and end with a return FALSE. Also, drop the blank line between checking "flags" for condition1 and condition2. Beside, make the code as it was previously.
This commit is contained in:
parent
617494614c
commit
a1e6c1ff49
1 changed files with 7 additions and 4 deletions
|
|
@ -2539,17 +2539,20 @@ nm_settings_connection_autoconnect_is_blocked(NMSettingsConnection *self)
|
|||
|
||||
g_return_val_if_fail(NM_IS_SETTINGS_CONNECTION(self), TRUE);
|
||||
|
||||
priv = NM_SETTINGS_CONNECTION_GET_PRIVATE(self);
|
||||
flags = nm_settings_connection_get_flags(self);
|
||||
priv = NM_SETTINGS_CONNECTION_GET_PRIVATE(self);
|
||||
|
||||
if (priv->autoconnect_blocked_reason != NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE)
|
||||
return TRUE;
|
||||
|
||||
flags = priv->flags;
|
||||
if (NM_FLAGS_ANY(flags,
|
||||
NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE
|
||||
| NM_SETTINGS_CONNECTION_INT_FLAGS_EXTERNAL))
|
||||
return TRUE;
|
||||
|
||||
if (!NM_FLAGS_HAS(flags, NM_SETTINGS_CONNECTION_INT_FLAGS_VISIBLE))
|
||||
return TRUE;
|
||||
|
||||
return priv->autoconnect_blocked_reason != NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue