summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-05-06 11:14:11 -0500
committerDan Williams <dcbw@redhat.com>2013-05-06 11:17:37 -0500
commit6fee19b17b41a2118eea230d1029b08606824e52 (patch)
treeb4597beb46a1795a4729cdadbfc40b8b60b12d94
parentcf8b338b27c4d773a080ed4e43ee12279cc19d53 (diff)
downloadNetworkManager-6fee19b17b41a2118eea230d1029b08606824e52.tar.gz
bluetooth: fix device creation after 9ce458256da896f2dcfd2c0bb6624014f83ddae8
The initialization of priv->bdaddr (the string representation of the device hardware address) got removed in the named commit.
-rw-r--r--src/nm-device-bt.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c
index a0b4a3375b..ecf82a3038 100644
--- a/src/nm-device-bt.c
+++ b/src/nm-device-bt.c
@@ -1168,6 +1168,21 @@ nm_device_bt_init (NMDeviceBt *self)
}
static void
+constructed (GObject *object)
+{
+ NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object);
+ const guint8 *my_hwaddr;
+ guint my_hwaddr_len = 0;
+
+ G_OBJECT_CLASS (nm_device_bt_parent_class)->constructed (object);
+
+ my_hwaddr = nm_device_get_hw_address (NM_DEVICE (object), &my_hwaddr_len);
+ g_assert (my_hwaddr);
+ g_assert_cmpint (my_hwaddr_len, ==, ETH_ALEN);
+ priv->bdaddr = nm_utils_hwaddr_ntoa (my_hwaddr, ARPHRD_ETHER);
+}
+
+static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
@@ -1250,6 +1265,7 @@ nm_device_bt_class_init (NMDeviceBtClass *klass)
g_type_class_add_private (object_class, sizeof (NMDeviceBtPrivate));
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->set_property = set_property;
object_class->dispose = dispose;