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

Commit 69a7a71a authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

btm: Fix result when Link Key is missing

Bug: 312691809
Test: compile and manual testing
Tag: #feature
Change-Id: I09efc4992615a413177d718571a46ce7493b7a13
parent 8fff8a98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1243,7 +1243,7 @@ tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk,
                             p_rec->ble_keys.ediv, p_rec->ble_keys.pltk);
  } else {
    LOG_ERROR("No key available to encrypt the link");
    return BTM_NO_RESOURCES;
    return BTM_ERR_KEY_MISSING;
  }

  if (p_rec->sec_state == BTM_SEC_STATE_IDLE)
+1 −0
Original line number Diff line number Diff line
@@ -279,6 +279,7 @@ tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType(const RawAddress& bd_addr);
 *                  BTM_PENDING   - command will be returned in the callback
 *                  BTM_WRONG_MODE- connection not up.
 *                  BTM_BUSY      - security procedures are currently active
 *                  BTM_ERR_KEY_MISSING  - link key is missing.
 *                  BTM_MODE_UNSUPPORTED - if security manager not linked in.
 *
 ******************************************************************************/