summaryrefslogtreecommitdiff
path: root/tui
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2014-01-30 18:21:56 +0100
committerJiří Klimeš <jklimes@redhat.com>2014-02-13 18:28:30 +0100
commitde15dafd1b89603db424c9e5547689b1f5655bbe (patch)
tree9c6de0c29d75e1f6bfb09ad061d33e9a06afe3fd /tui
parent3b76ae18a52b44dbe577557e038fdc263edc5715 (diff)
downloadNetworkManager-de15dafd1b89603db424c9e5547689b1f5655bbe.tar.gz
tui: properly initialize InfiniBand transport-mode
We need to initialize transport-mode because default value is NULL, which is not a valid mode.
Diffstat (limited to 'tui')
-rw-r--r--tui/nmt-page-infiniband.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tui/nmt-page-infiniband.c b/tui/nmt-page-infiniband.c
index c1238ab678..59fa68000f 100644
--- a/tui/nmt-page-infiniband.c
+++ b/tui/nmt-page-infiniband.c
@@ -69,6 +69,12 @@ nmt_page_infiniband_constructed (GObject *object)
nm_connection_add_setting (conn, nm_setting_infiniband_new ());
s_ib = nm_connection_get_setting_infiniband (conn);
}
+ /* initialize 'transport-mode' if it is NULL */
+ if (!nm_setting_infiniband_get_transport_mode (s_ib)) {
+ g_object_set (G_OBJECT (s_ib),
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE, "datagram",
+ NULL);
+ }
deventry = nmt_page_device_get_device_entry (NMT_PAGE_DEVICE (object));
g_object_bind_property (s_ib, NM_SETTING_INFINIBAND_MAC_ADDRESS,