Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f20ae49 authored by Emil Lenngren's avatar Emil Lenngren Committed by Andre Eisenbach
Browse files

Fix maximum connections reached for BLE

There was a patch some time ago:
https://android.googlesource.com/platform/system/bt/+/3c7bb20d104919837cc32e1e8c214003f583ddc0



But that patch assumes the error code sent is Connection Rejected Due
To Limited Resources. Most controllers however send Connection Limit
Exceeded, which is more correct. This patch accept both error codes.

Change-Id: Ifead1718cfecb4d6f73c668b5ea743cc68fdaf73
Signed-off-by: default avatarEmil Lenngren <emil.lenngren@gmail.com>
parent 1fc7abfe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2662,6 +2662,7 @@ void btm_ble_update_mode_operation(uint8_t link_role, BD_ADDR bd_addr,
     now in order */
  if (btm_ble_get_conn_st() == BLE_CONN_IDLE &&
      status != HCI_ERR_HOST_REJECT_RESOURCES &&
      status != HCI_ERR_MAX_NUM_OF_CONNECTIONS &&
      !btm_send_pending_direct_conn()) {
    btm_ble_resume_bg_conn();
  }