mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 21:40:08 +01:00
core: use NM_SETTINGS_GET for singlton instead of nm_settings_get()
We have it, so use it. Also, we use a similar macro for other singletons.
This commit is contained in:
parent
4a078d5065
commit
4aba7d4696
2 changed files with 5 additions and 5 deletions
|
|
@ -900,7 +900,7 @@ nm_iwd_manager_init (NMIwdManager *self)
|
|||
g_signal_connect (priv->manager, NM_MANAGER_DEVICE_ADDED,
|
||||
G_CALLBACK (device_added), self);
|
||||
|
||||
priv->settings = g_object_ref (nm_settings_get ());
|
||||
priv->settings = g_object_ref (NM_SETTINGS_GET);
|
||||
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_REMOVED,
|
||||
G_CALLBACK (connection_removed), self);
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ find_settings_connection (NMCheckpoint *self,
|
|||
*need_update = FALSE;
|
||||
|
||||
uuid = nm_connection_get_uuid (dev_checkpoint->settings_connection);
|
||||
sett_conn = nm_settings_get_connection_by_uuid (nm_settings_get (), uuid);
|
||||
sett_conn = nm_settings_get_connection_by_uuid (NM_SETTINGS_GET, uuid);
|
||||
|
||||
if (!sett_conn)
|
||||
return NULL;
|
||||
|
|
@ -239,7 +239,7 @@ restore_and_activate_connection (NMCheckpoint *self,
|
|||
_LOGD ("rollback: adding connection %s again",
|
||||
nm_connection_get_uuid (dev_checkpoint->settings_connection));
|
||||
|
||||
connection = nm_settings_add_connection (nm_settings_get (),
|
||||
connection = nm_settings_add_connection (NM_SETTINGS_GET,
|
||||
dev_checkpoint->settings_connection,
|
||||
TRUE,
|
||||
&local_error);
|
||||
|
|
@ -419,7 +419,7 @@ next_dev:
|
|||
gs_free NMSettingsConnection **list = NULL;
|
||||
|
||||
g_return_val_if_fail (priv->connection_uuids, NULL);
|
||||
list = nm_settings_get_connections_clone (nm_settings_get (), NULL,
|
||||
list = nm_settings_get_connections_clone (NM_SETTINGS_GET, NULL,
|
||||
NULL, NULL,
|
||||
nm_settings_connection_cmp_autoconnect_priority_p_with_data, NULL);
|
||||
|
||||
|
|
@ -687,7 +687,7 @@ nm_checkpoint_new (NMManager *manager, GPtrArray *devices, guint32 rollback_time
|
|||
|
||||
if (NM_FLAGS_HAS (flags, NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS)) {
|
||||
priv->connection_uuids = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL);
|
||||
for (con = nm_settings_get_connections (nm_settings_get (), NULL); *con; con++) {
|
||||
for (con = nm_settings_get_connections (NM_SETTINGS_GET, NULL); *con; con++) {
|
||||
g_hash_table_add (priv->connection_uuids,
|
||||
g_strdup (nm_settings_connection_get_uuid (*con)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue