summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-11 23:51:12 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-11 23:51:12 +0200
commitc987482081110cc1aeaa384a51b7fed57cbbe0c8 (patch)
tree10ca7efa728d354192a108646b04db096aec4e60
parent3d9320381dd4170ba8a2b9a2911e0bfb16facadd (diff)
Add debug message for adapters without an address
-rw-r--r--src/adapter.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/adapter.c b/src/adapter.c
index d620d3a6..9316718f 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2341,13 +2341,18 @@ int adapter_start(struct btd_adapter *adapter)
return -1;
}
- if (bacmp(&di.bdaddr, BDADDR_ANY))
- ba2str(&di.bdaddr, adapter->address);
- else {
- int err = device_read_bdaddr(adapter->dev_id, adapter->address);
+ ba2str(&di.bdaddr, adapter->address);
+
+ if (!bacmp(&di.bdaddr, BDADDR_ANY)) {
+ int err;
+
+ debug("Adapter %s without an address", adapter->path);
+
+ err = device_read_bdaddr(adapter->dev_id, adapter->address);
if (err < 0)
return err;
}
+
memcpy(dev->features, di.features, 8);
dd = hci_open_dev(adapter->dev_id);