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:
a41a27b
)
core: Fix passing timeout when disabling discoverable mode
author
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 20 Sep 2013 16:17:34 +0000
(11:17 -0500)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 20 Sep 2013 16:17:59 +0000
(11:17 -0500)
We should only pass a timeout value when enabling discoverable mode.
When disabling passing something non-zero would yield a "invalid
parameters" error.
src/adapter.c
patch
|
blob
|
history
diff --git
a/src/adapter.c
b/src/adapter.c
index
17f5508
..
5434a07
100644
(file)
--- a/
src/adapter.c
+++ b/
src/adapter.c
@@
-1890,7
+1890,8
@@
static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
case MGMT_SETTING_DISCOVERABLE:
memset(&cp, 0, sizeof(cp));
cp.val = mode;
- cp.timeout = htobs(adapter->discoverable_timeout);
+ if (cp.val)
+ cp.timeout = htobs(adapter->discoverable_timeout);
opcode = MGMT_OP_SET_DISCOVERABLE;
param = &cp;