diff options
| author | Michael Biebl <biebl@debian.org> | 2022-01-13 22:30:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-01-13 22:30:39 +0100 |
| commit | 88c227d90a6b7b388c5c85d72802a0ca8f05ed5c (patch) | |
| tree | 71f32df6617802270e8a78574bd8e1637dc532f4 /src/nmtui/nmt-page-ethernet.c | |
| parent | e74c568b07b50b97873fb4ee1d776dedefbd54d6 (diff) | |
New upstream version 1.34.0 upstream/1.34.0
Diffstat (limited to 'src/nmtui/nmt-page-ethernet.c')
| -rw-r--r-- | src/nmtui/nmt-page-ethernet.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nmtui/nmt-page-ethernet.c b/src/nmtui/nmt-page-ethernet.c index f5dc9119..addbd3f3 100644 --- a/src/nmtui/nmt-page-ethernet.c +++ b/src/nmtui/nmt-page-ethernet.c @@ -15,6 +15,7 @@ #include <linux/if_ether.h> #include <linux/if_infiniband.h> +#include "libnm-core-aux-intern/nm-libnm-core-utils.h" #include "nmt-mac-entry.h" #include "nmt-mtu-entry.h" @@ -42,11 +43,7 @@ nmt_page_ethernet_constructed(GObject *object) NMConnection * conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(ethernet)); - s_wired = nm_connection_get_setting_wired(conn); - if (!s_wired) { - nm_connection_add_setting(conn, nm_setting_wired_new()); - s_wired = nm_connection_get_setting_wired(conn); - } + s_wired = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_WIRED); deventry = nmt_editor_page_device_get_device_entry(NMT_EDITOR_PAGE_DEVICE(object)); g_object_bind_property(s_wired, |