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

Commit 4a984602 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "LE-COC: Free LE-COC server resource when BluetoothServerSocket is closed" am: 8aeba435

Change-Id: Ib8e62df817c00e9eeb36c7a79851fc54b6584a1e
parents a07f24ed 8aeba435
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -254,6 +254,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