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

Commit 6fdb9ece authored by Hansong Zhang's avatar Hansong Zhang
Browse files

SDP failure reason isn't used

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1ee477914c1f13f43f868a28f18b372e36baf752
parent 7dee7aa8
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1211,9 +1211,7 @@ void bta_dm_sdp_result(tBTA_DM_MSG* p_data) {
    }
  } else {
    /* conn failed. No need for timer */
    if (p_data->sdp_event.sdp_result == SDP_CONN_FAILED ||
        p_data->sdp_event.sdp_result == SDP_CONN_REJECTED ||
        p_data->sdp_event.sdp_result == SDP_SECURITY_ERR)
    if (p_data->sdp_event.sdp_result == SDP_CONN_FAILED)
      bta_dm_search_cb.wait_disc = false;

    /* not able to connect go to next device */
+0 −3
Original line number Diff line number Diff line
@@ -44,9 +44,6 @@
#define SDP_CFG_FAILED 0xFFF2
#define SDP_GENERIC_ERROR 0xFFF3
#define SDP_DB_FULL 0xFFF4
#define SDP_INVALID_PDU 0xFFF5
#define SDP_SECURITY_ERR 0xFFF6
#define SDP_CONN_REJECTED 0xFFF7
#define SDP_CANCEL 0xFFF8

/* Define the PSM that SDP uses */
+1 −11
Original line number Diff line number Diff line
@@ -136,17 +136,7 @@ static void sdp_on_l2cap_error(uint16_t l2cap_cid, uint16_t result) {

    /* Tell the user if there is a callback */
    if (p_ccb->p_cb || p_ccb->p_cb2) {
      uint16_t err = -1;
      if ((result == HCI_ERR_HOST_REJECT_SECURITY) ||
          (result == HCI_ERR_AUTH_FAILURE) ||
          (result == HCI_ERR_PAIRING_NOT_ALLOWED) ||
          (result == HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED) ||
          (result == HCI_ERR_KEY_MISSING))
        err = SDP_SECURITY_ERR;
      else if (result == HCI_ERR_HOST_REJECT_DEVICE)
        err = SDP_CONN_REJECTED;
      else
        err = SDP_CONN_FAILED;
      uint16_t err = SDP_CONN_FAILED;
      if (p_ccb->p_cb)
        (*p_ccb->p_cb)(err);
      else if (p_ccb->p_cb2)