diff options
| author | Iain Lane <iain@orangesquash.org.uk> | 2018-09-24 09:29:55 +0100 |
|---|---|---|
| committer | Iain Lane <iain@orangesquash.org.uk> | 2018-09-24 09:29:55 +0100 |
| commit | e152ec7bf4ba252ff9d3eb13eabd417b931dac9a (patch) | |
| tree | c323cf856ee0bb8e44590670dd54c19653a55748 /libnm-core/nm-simple-connection.c | |
| parent | ee9c73a923909e23a649407be77e25235d769e25 (diff) | |
Import Upstream version 1.12.2
Diffstat (limited to 'libnm-core/nm-simple-connection.c')
| -rw-r--r-- | libnm-core/nm-simple-connection.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libnm-core/nm-simple-connection.c b/libnm-core/nm-simple-connection.c index 11700666..9ccdbb21 100644 --- a/libnm-core/nm-simple-connection.c +++ b/libnm-core/nm-simple-connection.c @@ -24,6 +24,14 @@ #include "nm-simple-connection.h" #include "nm-setting-private.h" +/** + * SECTION:nm-simple-connection + * @short_description: An unmanaged connection + * + * An #NMSimpleConnection does not directly represent a D-Bus-exported connection, + * but might be used in the process of creating a new one. + **/ + static void nm_simple_connection_interface_init (NMConnectionInterface *iface); G_DEFINE_TYPE_WITH_CODE (NMSimpleConnection, nm_simple_connection, G_TYPE_OBJECT, @@ -38,9 +46,7 @@ nm_simple_connection_init (NMSimpleConnection *self) /** * nm_simple_connection_new: * - * Creates a new #NMSimpleConnection object with no #NMSetting objects. An - * #NMSimpleConnection does not directly represent a D-Bus-exported connection, - * but might be used in the process of creating a new one. + * Creates a new #NMSimpleConnection object with no #NMSetting objects. * * Returns: (transfer full): the new empty #NMConnection object **/ @@ -113,11 +119,16 @@ NMConnection * nm_simple_connection_new_clone (NMConnection *connection) { NMConnection *clone; + const char *path; g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); clone = nm_simple_connection_new (); - nm_connection_set_path (clone, nm_connection_get_path (connection)); + + path = nm_connection_get_path (connection); + if (path) + nm_connection_set_path (clone, path); + nm_connection_replace_settings_from_connection (clone, connection); return clone; |