diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-09-11 23:51:12 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-09-11 23:51:12 +0200 |
commit | c987482081110cc1aeaa384a51b7fed57cbbe0c8 (patch) | |
tree | 10ca7efa728d354192a108646b04db096aec4e60 | |
parent | 3d9320381dd4170ba8a2b9a2911e0bfb16facadd (diff) |
Add debug message for adapters without an address
-rw-r--r-- | src/adapter.c | 13 |
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); |