Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341955
b: refs/heads/master
c: 0b27a4b
h: refs/heads/master
i:
  341953: 962ad88
  341951: b92d3ee
v: v3
  • Loading branch information
Gustavo Padovan committed Dec 3, 2012
1 parent b8582a0 commit c33ad6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: f2592d3ee3c5817981f343b90bfb9c5612f38d23
refs/heads/master: 0b27a4b97cb1874503c78453c0903df53c0c86b2
19 changes: 10 additions & 9 deletions trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,6 @@ 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 @@ -885,6 +876,16 @@ 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 c33ad6f

Please sign in to comment.