• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisão2f320d60bcc8ab32971eed163df3fca79c792fd1 (tree)
Hora2020-02-12 10:26:40
Autorandroid-build-team Robot <android-build-team-robot@goog...>
Commiterandroid-build-team Robot

Mensagem de Log

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

Mudança Sumário

Diff

--- a/bta/jv/bta_jv_act.cc
+++ b/bta/jv/bta_jv_act.cc
@@ -362,6 +362,8 @@ tBTA_JV_STATUS bta_jv_free_l2c_cb(tBTA_JV_L2C_CB* p_cb) {
362362 p_cb->cong = false;
363363 bta_jv_free_sec_id(&p_cb->sec_id);
364364 p_cb->p_cback = NULL;
365+ p_cb->handle = 0;
366+ p_cb->l2cap_socket_id = 0;
365367 return status;
366368 }
367369
@@ -1121,7 +1123,7 @@ void bta_jv_l2cap_start_server(int32_t type, tBTA_SEC sec_mask,
11211123 /* stops an L2CAP server */
11221124 void bta_jv_l2cap_stop_server(uint16_t local_psm, uint32_t l2cap_socket_id) {
11231125 for (int i = 0; i < BTA_JV_MAX_L2C_CONN; i++) {
1124- if (bta_jv_cb.l2c_cb[i].psm == local_psm) {
1126+ if (bta_jv_cb.l2c_cb[i].l2cap_socket_id == l2cap_socket_id) {
11251127 tBTA_JV_L2C_CB* p_cb = &bta_jv_cb.l2c_cb[i];
11261128 tBTA_JV_L2CAP_CBACK* p_cback = p_cb->p_cback;
11271129 tBTA_JV_L2CAP_CLOSE evt_data;
--- a/btif/src/btif_sock_l2cap.cc
+++ b/btif/src/btif_sock_l2cap.cc
@@ -97,6 +97,7 @@ static void btsock_l2cap_server_listen(l2cap_socket* sock);
9797 static std::mutex state_lock;
9898
9999 l2cap_socket* socks = NULL;
100+static uint32_t last_sock_id = 0;
100101 static uid_set_t* uid_set = NULL;
101102 static int pth = -1;
102103
@@ -254,6 +255,11 @@ static void btsock_l2cap_free_l(l2cap_socket* sock) {
254255 }
255256 if ((sock->channel >= 0) && (sock->server)) {
256257 BTA_JvFreeChannel(sock->channel, BTA_JV_CONN_TYPE_L2CAP_LE);
258+ if (!sock->fixed_chan) {
259+ VLOG(2) << __func__ << ": stopping L2CAP LE COC server channel "
260+ << sock->channel;
261+ BTA_JvL2capStopServer(sock->channel, sock->id);
262+ }
257263 }
258264 } else {
259265 // Only call if we are non server connections
@@ -322,7 +328,7 @@ static l2cap_socket* btsock_l2cap_alloc_l(const char* name,
322328 sock->next = socks;
323329 sock->prev = NULL;
324330 if (socks) socks->prev = sock;
325- sock->id = (socks ? socks->id : 0) + 1;
331+ sock->id = last_sock_id + 1;
326332 sock->tx_bytes = 0;
327333 sock->rx_bytes = 0;
328334 socks = sock;
@@ -340,6 +346,7 @@ static l2cap_socket* btsock_l2cap_alloc_l(const char* name,
340346 if (!++sock->id) /* no zero IDs allowed */
341347 sock->id++;
342348 }
349+ last_sock_id = sock->id;
343350 DVLOG(2) << __func__ << " SOCK_LIST: alloc id:" << sock->id;
344351 return sock;
345352