Commit be9bc944 authored by Dan Williams's avatar Dan Williams

core: fix setting device type during device creation

parent b62ff36e
......@@ -137,7 +137,7 @@ nm_device_interface_init (gpointer g_iface)
"DeviceType",
"DeviceType",
0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
G_PARAM_READABLE));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_interface_install_property
(g_iface, g_param_spec_boolean (NM_DEVICE_INTERFACE_MANAGED,
......
......@@ -2248,6 +2248,10 @@ set_property (GObject *object, guint prop_id,
case NM_DEVICE_INTERFACE_PROP_MANAGED:
priv->managed = g_value_get_boolean (value);
break;
case NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE:
g_return_if_fail (priv->type == NM_DEVICE_TYPE_UNKNOWN);
priv->type = g_value_get_uint (value);
break;
case NM_DEVICE_INTERFACE_PROP_TYPE_DESC:
g_free (priv->type_desc);
priv->type_desc = g_value_dup_string (value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment