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

Commit faabc10c authored by Hansong Zhang's avatar Hansong Zhang
Browse files

BTM_SEC minor clean up

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4d5743de037d1f5f84802050d630bc8bd23b6d8d
parent 6b3c34a1
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -249,7 +249,6 @@ typedef struct {
  uint32_t dev_rec_count; /* Counter used for device record timestamp */
  uint8_t security_mode;
  bool pairing_disabled;
  bool connect_only_paired;
  bool security_mode_changed; /* mode changed during bonding */
  bool pin_type_changed;      /* pin type changed during bonding */
  bool sec_req_pending;       /*   true if a request is pending */
+0 −12
Original line number Diff line number Diff line
@@ -1890,18 +1890,6 @@ void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
    return;
  }

  /* Security guys wants us not to allow connection from not paired devices */

  /* Check if connection is allowed for only paired devices */
  if (btm_cb.connect_only_paired) {
    if (!p_dev_rec || !(p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_AUTHED)) {
      BTM_TRACE_EVENT(
          "Security Manager: connect request from non-paired device");
      btsnd_hcic_reject_conn(bda, HCI_ERR_HOST_REJECT_DEVICE);
      return;
    }
  }

  if ((btm_cb.pairing_state != BTM_PAIR_STATE_IDLE) &&
      (btm_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD) &&
      (btm_cb.pairing_bda == bda)) {
+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@
#include "rfcdefs.h"
#include "sdp_api.h"

#include "btm_sec.h"
#include "stack/include/btm_api_types.h"

#define error(fmt, ...) \