diff options
| author | Michael Biebl <biebl@debian.org> | 2023-03-09 20:01:53 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-03-09 20:01:53 +0100 |
| commit | cffb548b401e2cd3fad166aa92e0f634bbb1d4d6 (patch) | |
| tree | 6d803d8f7d0d92a1c5e5705974fff8975472af95 /src/libnm-core-impl/nm-simple-connection.c | |
| parent | 647d6b95d5475e0a1bf3d6f299d1cb8c9041a7a4 (diff) | |
| parent | 12e1ee797bbf0b10d1fd5afd4b947484769f2b9f (diff) | |
Merge tag 'debian/1.42.4-1' into debian/bullseye-backports
network-manager Debian release 1.42.4-1
Diffstat (limited to 'src/libnm-core-impl/nm-simple-connection.c')
| -rw-r--r-- | src/libnm-core-impl/nm-simple-connection.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/libnm-core-impl/nm-simple-connection.c b/src/libnm-core-impl/nm-simple-connection.c index 6252dc2c..a9c66dc7 100644 --- a/src/libnm-core-impl/nm-simple-connection.c +++ b/src/libnm-core-impl/nm-simple-connection.c @@ -47,9 +47,6 @@ G_DEFINE_TYPE_WITH_CODE(NMSimpleConnection, G_IMPLEMENT_INTERFACE(NM_TYPE_CONNECTION, nm_simple_connection_interface_init);) -#define _GET_PRIVATE(self) \ - G_TYPE_INSTANCE_GET_PRIVATE(self, NM_TYPE_SIMPLE_CONNECTION, NMConnectionPrivate) - /*****************************************************************************/ static void @@ -57,7 +54,7 @@ nm_simple_connection_init(NMSimpleConnection *self) { NMConnectionPrivate *priv; - priv = _GET_PRIVATE(self); + priv = _NM_SIMPLE_CONNECTION_GET_CONNECTION_PRIVATE(self); priv->self = (NMConnection *) self; } @@ -139,15 +136,12 @@ 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(); - path = nm_connection_get_path(connection); - if (path) - nm_connection_set_path(clone, path); + _nm_connection_set_path_rstr(clone, _nm_connection_get_path_rstr(connection)); nm_connection_replace_settings_from_connection(clone, connection); @@ -157,14 +151,12 @@ nm_simple_connection_new_clone(NMConnection *connection) static void dispose(GObject *object) { - NMConnection *connection = NM_CONNECTION(object); - #if NM_MORE_ASSERTS g_signal_handlers_disconnect_by_data(object, (gpointer) &_nm_assert_connection_unchanging_user_data); #endif - _nm_connection_private_clear(_GET_PRIVATE(connection)); + _nm_connection_private_clear(_NM_SIMPLE_CONNECTION_GET_CONNECTION_PRIVATE(object)); G_OBJECT_CLASS(nm_simple_connection_parent_class)->dispose(object); } |