diff options
author | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2024-01-24 12:40:44 +0100 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2024-01-31 11:29:07 +0100 |
commit | 8a08a74abf4d01ce587f493f2346aa66bdd3cda3 (patch) | |
tree | c00d2ea3c6a38ce40c6b5a0159b6bf7b67cdad0e | |
parent | 194455660d15bfa6bb9fb291205edda17c519f93 (diff) |
all: use the new NMSettingConnection autoconnect-ports propertyff/conscious_language_autoconnect_slaves
-rw-r--r-- | src/core/devices/nm-device.c | 1 | ||||
-rw-r--r-- | src/core/nm-manager.c | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 16f8e1f261..74c57b6e40 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -13369,6 +13369,7 @@ can_reapply_change(NMDevice *self, NM_SETTING_CONNECTION_STABLE_ID, NM_SETTING_CONNECTION_AUTOCONNECT, NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES, + NM_SETTING_CONNECTION_AUTOCONNECT_PORTS, NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY, NM_SETTING_CONNECTION_ZONE, NM_SETTING_CONNECTION_METERED, diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c index 9c58a47d07..2cf9cb1ddf 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -5333,14 +5333,14 @@ find_slaves(NMManager *manager, static gboolean should_connect_slaves(NMConnection *connection, NMDevice *device) { - NMSettingConnection *s_con; - NMSettingConnectionAutoconnectSlaves val; + NMSettingConnection *s_con; + NMTernary val; s_con = nm_connection_get_setting_connection(connection); g_assert(s_con); - val = nm_setting_connection_get_autoconnect_slaves(s_con); - if (val != NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT) + val = nm_setting_connection_get_autoconnect_ports(s_con); + if (val != NM_TERNARY_DEFAULT) goto out; val = @@ -5352,9 +5352,9 @@ should_connect_slaves(NMConnection *connection, NMDevice *device) -1); out: - if (val == NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_NO) + if (val == NM_TERNARY_FALSE) return FALSE; - if (val == NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES) + if (val == NM_TERNARY_TRUE) return TRUE; return FALSE; } |