Loading system/btif/src/btif_sock_l2cap.cc +3 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -327,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; Loading @@ -345,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; Loading Loading
system/btif/src/btif_sock_l2cap.cc +3 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -327,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; Loading @@ -345,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; Loading