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

Commit 5d043fa4 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [10301183, 10301340, 10301110, 10299537, 10300908,...

Merge cherrypicks of [10301183, 10301340, 10301110, 10299537, 10300908, 10301450, 10300619, 10301451, 10301654, 10301341, 10301342, 10301343, 10301344, 10301508, 10301184, 10301185, 10301309, 10301290, 10301310, 10301345, 10301346, 10301464, 10301291, 10300931, 10301382, 10301383, 10301465, 10301384, 10301385, 10301408, 10301386, 10299538, 10301387, 10301388, 10301389, 10301390, 10301391, 10301292, 10301392, 10301393, 10301694, 10301695, 10301489, 10299807, 10299808, 10299809, 10300620, 10301491, 10301111, 10301348] into qt-qpr2-release

Change-Id: I0cfb719c6af78bb1bb752f29e2950fcf20e1ad24
parents a5777d98 20f98ab3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -362,6 +362,8 @@ tBTA_JV_STATUS bta_jv_free_l2c_cb(tBTA_JV_L2C_CB* p_cb) {
  p_cb->cong = false;
  bta_jv_free_sec_id(&p_cb->sec_id);
  p_cb->p_cback = NULL;
  p_cb->handle = 0;
  p_cb->l2cap_socket_id = 0;
  return status;
}

@@ -1121,7 +1123,7 @@ void bta_jv_l2cap_start_server(int32_t type, tBTA_SEC sec_mask,
/* stops an L2CAP server */
void bta_jv_l2cap_stop_server(uint16_t local_psm, uint32_t l2cap_socket_id) {
  for (int i = 0; i < BTA_JV_MAX_L2C_CONN; i++) {
    if (bta_jv_cb.l2c_cb[i].psm == local_psm) {
    if (bta_jv_cb.l2c_cb[i].l2cap_socket_id == l2cap_socket_id) {
      tBTA_JV_L2C_CB* p_cb = &bta_jv_cb.l2c_cb[i];
      tBTA_JV_L2CAP_CBACK* p_cback = p_cb->p_cback;
      tBTA_JV_L2CAP_CLOSE evt_data;
+8 −1
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ static void btsock_l2cap_server_listen(l2cap_socket* sock);
static std::mutex state_lock;

l2cap_socket* socks = NULL;
static uint32_t last_sock_id = 0;
static uid_set_t* uid_set = NULL;
static int pth = -1;

@@ -254,6 +255,11 @@ static void btsock_l2cap_free_l(l2cap_socket* sock) {
    }
    if ((sock->channel >= 0) && (sock->server)) {
      BTA_JvFreeChannel(sock->channel, BTA_JV_CONN_TYPE_L2CAP_LE);
      if (!sock->fixed_chan) {
        VLOG(2) << __func__ << ": stopping L2CAP LE COC server channel "
                << sock->channel;
        BTA_JvL2capStopServer(sock->channel, sock->id);
      }
    }
  } else {
    // Only call if we are non server connections
@@ -322,7 +328,7 @@ static l2cap_socket* btsock_l2cap_alloc_l(const char* name,
  sock->next = socks;
  sock->prev = NULL;
  if (socks) socks->prev = sock;
  sock->id = (socks ? socks->id : 0) + 1;
  sock->id = last_sock_id + 1;
  sock->tx_bytes = 0;
  sock->rx_bytes = 0;
  socks = sock;
@@ -340,6 +346,7 @@ static l2cap_socket* btsock_l2cap_alloc_l(const char* name,
    if (!++sock->id) /* no zero IDs allowed */
      sock->id++;
  }
  last_sock_id = sock->id;
  DVLOG(2) << __func__ << " SOCK_LIST: alloc id:" << sock->id;
  return sock;