diff options
author | Thomas Haller <thaller@redhat.com> | 2017-12-05 12:10:16 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-12-05 19:57:25 +0100 |
commit | 545e3111c89c4dc13a69d5cdfdd381d2be3cc971 (patch) | |
tree | 41a42bf82a24f916cfd1a1e77e8aa7d8b9c2621d /src/nm-manager.c | |
parent | 4549bd07a1c62d9d063cf7fd3ae3b6854890fc9a (diff) |
settings: remove accessor functions to connection flags
The accessor functions just look whether a certain flag is set. As these
functions have a different name then the flags, this is more confusing
then helpful. For example, if you want to know where the NM_GENERATED
flag matters, you had to know to grep for nm_settings_connection_get_nm_generated()
in addition to NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED.
The accessor function hid that the property was implemented as
a connection flag. For example, it was not immediately obvious
that nm_settings_connection_get_nm_generated() is the same
as having the NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED flag
set.
Drop them.
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r-- | src/nm-manager.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 178fbfa71..b665047a0 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -329,7 +329,8 @@ active_connection_remove (NMManager *self, NMActiveConnection *active) g_signal_handlers_disconnect_by_func (active, active_connection_parent_active, self); if ( (connection = nm_active_connection_get_settings_connection (active)) - && nm_settings_connection_get_volatile (connection)) + && NM_FLAGS_HAS (nm_settings_connection_get_flags (connection), + NM_SETTINGS_CONNECTION_FLAGS_VOLATILE)) g_object_ref (connection); else connection = NULL; @@ -498,7 +499,8 @@ _get_activatable_connections_filter (NMSettings *settings, NMSettingsConnection *connection, gpointer user_data) { - if (nm_settings_connection_get_volatile (connection)) + if (NM_FLAGS_HAS (nm_settings_connection_get_flags (connection), + NM_SETTINGS_CONNECTION_FLAGS_VOLATILE)) return FALSE; return !active_connection_find_first (user_data, connection, NULL, NM_ACTIVE_CONNECTION_STATE_DEACTIVATING); } |