settings: publish add_new_connection() as nm_settings_add_connection_internal()
This commit is contained in:
@@ -876,8 +876,8 @@ remove_default_wired_connection (NMSettings *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static NMSettingsConnection *
|
NMSettingsConnection *
|
||||||
add_new_connection (NMSettings *self,
|
nm_settings_add_connection_internal (NMSettings *self,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
gboolean save_to_disk,
|
gboolean save_to_disk,
|
||||||
GError **error)
|
GError **error)
|
||||||
@@ -1007,7 +1007,7 @@ pk_add_cb (NMAuthChain *chain,
|
|||||||
connection = nm_auth_chain_get_data (chain, "connection");
|
connection = nm_auth_chain_get_data (chain, "connection");
|
||||||
g_assert (connection);
|
g_assert (connection);
|
||||||
save_to_disk = GPOINTER_TO_UINT (nm_auth_chain_get_data (chain, "save-to-disk"));
|
save_to_disk = GPOINTER_TO_UINT (nm_auth_chain_get_data (chain, "save-to-disk"));
|
||||||
added = add_new_connection (self, connection, save_to_disk, &error);
|
added = nm_settings_add_connection_internal (self, connection, save_to_disk, &error);
|
||||||
}
|
}
|
||||||
|
|
||||||
callback = nm_auth_chain_get_data (chain, "callback");
|
callback = nm_auth_chain_get_data (chain, "callback");
|
||||||
@@ -1456,7 +1456,7 @@ default_wired_try_update (NMDefaultWiredConnection *wired,
|
|||||||
g_assert (id);
|
g_assert (id);
|
||||||
|
|
||||||
remove_default_wired_connection (self, NM_SETTINGS_CONNECTION (wired), FALSE);
|
remove_default_wired_connection (self, NM_SETTINGS_CONNECTION (wired), FALSE);
|
||||||
added = add_new_connection (self, NM_CONNECTION (wired), TRUE, &error);
|
added = nm_settings_add_connection_internal (self, NM_CONNECTION (wired), TRUE, &error);
|
||||||
if (added) {
|
if (added) {
|
||||||
nm_settings_connection_delete (NM_SETTINGS_CONNECTION (wired), delete_cb, NULL);
|
nm_settings_connection_delete (NM_SETTINGS_CONNECTION (wired), delete_cb, NULL);
|
||||||
|
|
||||||
|
@@ -104,6 +104,10 @@ void nm_settings_add_connection (NMSettings *self,
|
|||||||
*/
|
*/
|
||||||
GSList *nm_settings_get_connections (NMSettings *settings);
|
GSList *nm_settings_get_connections (NMSettings *settings);
|
||||||
|
|
||||||
|
NMSettingsConnection *nm_settings_add_connection_internal (NMSettings *settings,
|
||||||
|
NMConnection *connection,
|
||||||
|
gboolean save_to_disk,
|
||||||
|
GError **error);
|
||||||
NMSettingsConnection *nm_settings_get_connection_by_path (NMSettings *settings,
|
NMSettingsConnection *nm_settings_get_connection_by_path (NMSettings *settings,
|
||||||
const char *path);
|
const char *path);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user