tui: properly initialize InfiniBand transport-mode

We need to initialize transport-mode because default value is NULL,
which is not a valid mode.
This commit is contained in:
Jiří Klimeš
2014-01-30 18:21:56 +01:00
parent 3b76ae18a5
commit de15dafd1b

View File

@@ -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,