aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/emulator
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2023-05-21 15:27:37 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-05-22 11:56:28 -0700
commit0c32cfdf94624fcfc3ac329f313d9e48311b52a7 (patch)
tree7955cf1274fc8e8ade5ac25eede16d24c2b9b86d /emulator
parent678265f37c2800b73c1ff354fb1ef860c24b041f (diff)
btdev: report right reason for local Disconnect complete
Disconnect initiated by local host should get Connection Terminated by Local Host (0x16) as termination reason.
Diffstat (limited to 'emulator')
-rw-r--r--emulator/btdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 0eec1d9f2b..f9260511ab 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -749,7 +749,9 @@ static int cmd_disconnect_complete(struct btdev *dev, const void *data,
return 0;
}
- disconnect_complete(dev, conn->handle, BT_HCI_ERR_SUCCESS, cmd->reason);
+ /* Local host has different reason (Core v5.3 Vol 4 Part E Sec 7.1.6) */
+ disconnect_complete(dev, conn->handle, BT_HCI_ERR_SUCCESS,
+ BT_HCI_ERR_LOCAL_HOST_TERM);
if (conn->link)
disconnect_complete(conn->link->dev, conn->link->handle,