Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321991
b: refs/heads/master
c: 269c484
h: refs/heads/master
i:
  321989: b34045f
  321987: 8cd40f3
  321983: a97139e
v: v3
  • Loading branch information
Gustavo Padovan committed Aug 6, 2012
1 parent 9b996cc commit 04ab1a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61c964ba1748e984cb232b431582815899bf10fe
refs/heads/master: 269c4845d5b3627b95b1934107251bacbe99bb68
19 changes: 9 additions & 10 deletions trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ static int sco_conn_del(struct hci_conn *hcon, int err)
sco_sock_clear_timer(sk);
sco_chan_del(sk, err);
bh_unlock_sock(sk);

sco_conn_lock(conn);
conn->sk = NULL;
sco_pi(sk)->conn = NULL;
sco_conn_unlock(conn);

if (conn->hcon)
hci_conn_put(conn->hcon);

sco_sock_kill(sk);
}

Expand Down Expand Up @@ -821,16 +830,6 @@ static void sco_chan_del(struct sock *sk, int err)

BT_DBG("sk %p, conn %p, err %d", sk, conn, err);

if (conn) {
sco_conn_lock(conn);
conn->sk = NULL;
sco_pi(sk)->conn = NULL;
sco_conn_unlock(conn);

if (conn->hcon)
hci_conn_put(conn->hcon);
}

sk->sk_state = BT_CLOSED;
sk->sk_err = err;
sk->sk_state_change(sk);
Expand Down

0 comments on commit 04ab1a3

Please sign in to comment.