Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253869
b: refs/heads/master
c: 0da67be
h: refs/heads/master
i:
  253867: 49fadeb
v: v3
  • Loading branch information
Luiz Augusto von Dentz authored and Gustavo F. Padovan committed Jun 10, 2011
1 parent e4aea7c commit 0b947dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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: 8d03e971cf403305217b8e62db3a2e5ad2d6263f
refs/heads/master: 0da67bed835fdde68ca0e924d2a2d6ac82c70833
13 changes: 12 additions & 1 deletion trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,15 @@ static void __sco_sock_close(struct sock *sk)

case BT_CONNECTED:
case BT_CONFIG:
if (sco_pi(sk)->conn) {
sk->sk_state = BT_DISCONN;
sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT);
hci_conn_put(sco_pi(sk)->conn->hcon);
sco_pi(sk)->conn->hcon = NULL;
} else
sco_chan_del(sk, ECONNRESET);
break;

case BT_CONNECT:
case BT_DISCONN:
sco_chan_del(sk, ECONNRESET);
Expand Down Expand Up @@ -819,7 +828,9 @@ static void sco_chan_del(struct sock *sk, int err)
conn->sk = NULL;
sco_pi(sk)->conn = NULL;
sco_conn_unlock(conn);
hci_conn_put(conn->hcon);

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

sk->sk_state = BT_CLOSED;
Expand Down

0 comments on commit 0b947dd

Please sign in to comment.