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:
5616bb9
)
emulator: Disallow LE set scan params command when scan is enabled
author
Jefferson Delfes
<jefferson.delfes@openbossa.org>
Wed, 3 Jul 2013 20:54:54 +0000
(16:54 -0400)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 5 Jul 2013 08:56:13 +0000
(11:56 +0300)
When LE scan is enabled, the command LE set scan parameters should
return a command disallowed in status of command complete event.
emulator/btdev.c
patch
|
blob
|
history
diff --git
a/emulator/btdev.c
b/emulator/btdev.c
index
925eaf7
..
f3de1a5
100644
(file)
--- a/
emulator/btdev.c
+++ b/
emulator/btdev.c
@@
-1475,7
+1475,10
@@
static void default_cmd(struct btdev *btdev, uint16_t opcode,
case BT_HCI_CMD_LE_SET_SCAN_PARAMETERS:
if (btdev->type == BTDEV_TYPE_BREDR)
goto unsupported;
- status = BT_HCI_ERR_SUCCESS;
+ if (btdev->le_scan_enable)
+ status = BT_HCI_ERR_COMMAND_DISALLOWED;
+ else
+ status = BT_HCI_ERR_SUCCESS;
cmd_complete(btdev, opcode, &status, sizeof(status));
break;