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

Commit 01cb43cf authored by Dorin Drimus's avatar Dorin Drimus
Browse files

Fix HOGP issue when encryption failed

Problem:
When encryption fails with status=0x000e, reason=0x0012, this will do cancel open and memset for the control block of HOGP. "bta_hh_gattc_cback" will not be called when reconnected again and this will make the key invalid after reconnection.

Solution:
Don't call "bta_hh_le_api_disc_act" when this reason happened

Change-Id: Ie3f9b58288670eee6280838ea533aea619a5d7df
Test: Funai TV remote control reconnect OK
Bug: 211528896
parent 37a86072
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1014,7 +1014,8 @@ void bta_hh_security_cmpl(tBTA_HH_DEV_CB* p_cb,
              bta_hh_status_text(p_cb->status).c_str(),
              btm_status_text(p_cb->btm_status).c_str());
    if (!(p_cb->status == BTA_HH_ERR_SEC &&
          p_cb->btm_status == BTM_ERR_PROCESSING))
          (p_cb->btm_status == BTM_ERR_PROCESSING ||
          p_cb->btm_status == BTM_FAILED_ON_SECURITY)))
      bta_hh_le_api_disc_act(p_cb);
    }
}