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:
989c60c
)
Fix mode restoration when remember_powered is false
author
Johan Hedberg
<johan.hedberg@nokia.com>
Wed, 3 Feb 2010 21:40:28 +0000
(13:40 -0800)
committer
Johan Hedberg
<johan.hedberg@nokia.com>
Wed, 3 Feb 2010 21:40:28 +0000
(13:40 -0800)
src/adapter.c
patch
|
blob
|
history
diff --git
a/src/adapter.c
b/src/adapter.c
index
c72cc9a
..
fe1fe6d
100644
(file)
--- a/
src/adapter.c
+++ b/
src/adapter.c
@@
-2146,8
+2146,9
@@
int adapter_start(struct btd_adapter *adapter)
memcpy(dev->features, di.features, 8);
ba2str(&adapter->bdaddr, address);
- if (!main_opts.remember_powered ||
- read_device_mode(address, mode, sizeof(mode)) < 0) {
+ err = read_device_mode(address, mode, sizeof(mode));
+
+ if ((!adapter->initialized && !main_opts.remember_powered) || err < 0) {
if (!adapter->initialized && main_opts.mode == MODE_OFF)
strcpy(mode, "off");
else