Bluetooth: host: Return error code if disconnect has invalid parameters
Return the error code from the disconnect command to the application when an invalid disconnect reason has been provided. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
068af16e18
commit
9205fe0a3a
1 changed files with 1 additions and 1 deletions
|
@ -1539,7 +1539,7 @@ int bt_hci_disconnect(uint16_t handle, uint8_t reason)
|
|||
disconn->handle = sys_cpu_to_le16(handle);
|
||||
disconn->reason = reason;
|
||||
|
||||
return bt_hci_cmd_send(BT_HCI_OP_DISCONNECT, buf);
|
||||
return bt_hci_cmd_send_sync(BT_HCI_OP_DISCONNECT, buf, NULL);
|
||||
}
|
||||
|
||||
static void hci_disconn_complete_prio(struct net_buf *buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue