Bluetooth: tester: Ignore error -EBUSY of bt_conn_set_security
The error code `-EBUSY` of `bt_conn_set_security` means the pairing/encryption procedure is ongoing. Ignore the error code. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit is contained in:
parent
81b8f8d265
commit
ba55e9d7c0
1 changed files with 5 additions and 1 deletions
|
@ -1567,7 +1567,11 @@ static uint8_t pair(const void *cmd, uint16_t cmd_len,
|
|||
}
|
||||
|
||||
err = bt_conn_set_security(conn, BT_SECURITY_L2);
|
||||
if (err < 0) {
|
||||
/*
|
||||
* If the error code is `-EBUSY`, it means the pairing/enryption is ongoing.
|
||||
* Just ignore the error.
|
||||
*/
|
||||
if ((err < 0) && (err != -EBUSY)) {
|
||||
LOG_ERR("Failed to set security: %d", err);
|
||||
bt_conn_unref(conn);
|
||||
return BTP_STATUS_FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue