mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
bluetooth: fix device creation after 9ce458256d
The initialization of priv->bdaddr (the string representation of the device hardware address) got removed in the named commit.
This commit is contained in:
parent
cf8b338b27
commit
6fee19b17b
1 changed files with 16 additions and 0 deletions
|
|
@ -1167,6 +1167,21 @@ nm_device_bt_init (NMDeviceBt *self)
|
|||
set_mm_running (self, mm_running);
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue