OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a89fd1
)
adapter: Fix registering adapter with no address
author
Szymon Janc
<szymon.janc@tieto.com>
Fri, 8 Feb 2013 10:03:13 +0000
(11:03 +0100)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 15 Feb 2013 12:21:58 +0000
(14:21 +0200)
adapter->bdaddr is set later in read_info_complete and current check
always returns false. Check against bdaddr received in command response
instead and fail if it is all zeros.
src/adapter.c
patch
|
blob
|
history
diff --git
a/src/adapter.c
b/src/adapter.c
index
038efc2
..
e553626
100644
(file)
--- a/
src/adapter.c
+++ b/
src/adapter.c
@@
-5745,7
+5745,7
@@
static void read_info_complete(uint8_t status, uint16_t length,
goto failed;
}
- if (bacmp(&
adapter->bdaddr, BDADDR_ANY)
) {
+ if (bacmp(&
rp->bdaddr, BDADDR_ANY) == 0
) {
error("No Bluetooth address for index %u", adapter->dev_id);
goto failed;
}