Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255719
b: refs/heads/master
c: 4a77708
h: refs/heads/master
i:
  255717: 7bfaeac
  255715: 25b60db
  255711: 8764de6
v: v3
  • Loading branch information
Luiz Augusto von Dentz authored and Gustavo F. Padovan committed Jun 9, 2011
1 parent e471a88 commit 1c44050
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: d0fad89da9801b3945d2ee7243ecbc75b3da6f09
refs/heads/master: 4a77708b055a71bf769a917283a9eba3dcedb017
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 1c44050

Please sign in to comment.