core: fix setting device type during device creation
This commit is contained in:
@@ -137,7 +137,7 @@ nm_device_interface_init (gpointer g_iface)
|
|||||||
"DeviceType",
|
"DeviceType",
|
||||||
"DeviceType",
|
"DeviceType",
|
||||||
0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
|
0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
g_object_interface_install_property
|
g_object_interface_install_property
|
||||||
(g_iface, g_param_spec_boolean (NM_DEVICE_INTERFACE_MANAGED,
|
(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:
|
case NM_DEVICE_INTERFACE_PROP_MANAGED:
|
||||||
priv->managed = g_value_get_boolean (value);
|
priv->managed = g_value_get_boolean (value);
|
||||||
break;
|
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:
|
case NM_DEVICE_INTERFACE_PROP_TYPE_DESC:
|
||||||
g_free (priv->type_desc);
|
g_free (priv->type_desc);
|
||||||
priv->type_desc = g_value_dup_string (value);
|
priv->type_desc = g_value_dup_string (value);
|
||||||
|
Reference in New Issue
Block a user