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

Commit 1527afff authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove BTM_ALLOW_CONN_IF_NONDISCOVER"

parents fd7355d4 1ce635ef
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -299,11 +299,6 @@
#define BTM_INQ_DB_SIZE 40
#endif

/* Should connections to unknown devices be allowed when not discoverable? */
#ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
#define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
#endif

/* Sets the Page_Scan_Window:  the length of time that the device is performing
 * a page scan. */
#ifndef BTM_DEFAULT_CONN_WINDOW
+0 −12
Original line number Diff line number Diff line
@@ -2264,18 +2264,6 @@ void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
    }
  }

#if (BTM_ALLOW_CONN_IF_NONDISCOVER == FALSE)
  /* If non-discoverable, only allow known devices to connect */
  if (btm_cb.btm_inq_vars.discoverable_mode == BTM_NON_DISCOVERABLE) {
    if (!p_dev_rec) {
      BTM_TRACE_EVENT(
          "Security Manager: connect request from not paired device");
      btsnd_hcic_reject_conn(bda, HCI_ERR_HOST_REJECT_DEVICE);
      return;
    }
  }
#endif

  if ((btm_cb.pairing_state != BTM_PAIR_STATE_IDLE) &&
      (btm_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD) &&
      (btm_cb.pairing_bda == bda)) {