summaryrefslogtreecommitdiff
path: root/emulator/vhci.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-03-07 18:30:59 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-03-07 18:32:59 +0200
commit90cb7c5884b147288220314d8fdd276f7d068ac4 (patch)
tree757f4fba002482c081f62c325a31fedbdea5207e /emulator/vhci.c
parent4e2f84dd9e689cfbd206f5c250164e3fec997538 (diff)
downloadbluez-90cb7c5884b147288220314d8fdd276f7d068ac4.tar.gz
emulator: Fix unique bdaddr creation for multiple vhci_open() calls
Diffstat (limited to 'emulator/vhci.c')
-rw-r--r--emulator/vhci.c3
1 files changed, 2 insertions, 1 deletions
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);