From 90cb7c5884b147288220314d8fdd276f7d068ac4 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 7 Mar 2013 18:30:59 +0200 Subject: [PATCH] emulator: Fix unique bdaddr creation for multiple vhci_open() calls --- emulator/vhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emulator/vhci.c b/emulator/vhci.c index 8fddef7ab..106a8e214 100644 --- a/emulator/vhci.c +++ b/emulator/vhci.c @@ -86,6 +86,7 @@ struct vhci *vhci_open(enum vhci_type type) { struct vhci *vhci; enum btdev_type uninitialized_var(btdev_type); + static uint8_t id = 0x23; switch (type) { case VHCI_TYPE_BREDRLE: @@ -114,7 +115,7 @@ struct vhci *vhci_open(enum vhci_type type) return NULL; } - vhci->btdev = btdev_create(btdev_type, 0x23); + vhci->btdev = btdev_create(btdev_type, id++); if (!vhci->btdev) { close(vhci->fd); free(vhci); -- 2.47.3