diff options
author | Thomas Haller <thaller@redhat.com> | 2016-01-06 22:10:00 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-01-06 22:18:25 +0100 |
commit | 1a835ad3d03ffe39a3caf4796027baaba73bf9b8 (patch) | |
tree | 7909482e6287c5e5dc41ce6113850ca75a297423 /src/devices/wifi/nm-device-olpc-mesh.c | |
parent | 044de4cea2c82d289033e75f1e12c7d346dc5537 (diff) | |
download | NetworkManager-1a835ad3d03ffe39a3caf4796027baaba73bf9b8.tar.gz |
wifi: refactor creation of NMDeviceWifi/NMDeviceOlpcMesh to initialize in constructed() method
Diffstat (limited to 'src/devices/wifi/nm-device-olpc-mesh.c')
-rw-r--r-- | src/devices/wifi/nm-device-olpc-mesh.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c index 1ac3fa97ce..23ebd9c822 100644 --- a/src/devices/wifi/nm-device-olpc-mesh.c +++ b/src/devices/wifi/nm-device-olpc-mesh.c @@ -431,22 +431,13 @@ nm_device_olpc_mesh_init (NMDeviceOlpcMesh * self) { } -static GObject* -constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params) +static void +constructed (GObject *object) { - GObject *object; - GObjectClass *klass; - NMDeviceOlpcMesh *self; - NMDeviceOlpcMeshPrivate *priv; - - klass = G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class); - object = klass->constructor (type, n_construct_params, construct_params); - g_return_val_if_fail (object, NULL); + NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (object); + NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); - self = NM_DEVICE_OLPC_MESH (object); - priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); + G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->constructed (object); priv->manager = g_object_ref (nm_manager_get ()); @@ -455,7 +446,6 @@ constructor (GType type, /* shorter timeout for mesh connectivity */ nm_device_set_dhcp_timeout (NM_DEVICE (self), 20); - return object; } static void @@ -516,7 +506,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) NM_DEVICE_CLASS_DECLARE_TYPES (klass, NM_SETTING_OLPC_MESH_SETTING_NAME, NM_LINK_TYPE_OLPC_MESH) - object_class->constructor = constructor; + object_class->constructed = constructed; object_class->get_property = get_property; object_class->set_property = set_property; object_class->dispose = dispose; |