diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-04-20 15:56:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-20 15:56:44 -0400 |
commit | 10e99777e926907e43fa57ec1208c3f7787fd290 (patch) | |
tree | 75fce1859c07c2671871f6d20ff93c71a0baa94a /net/bluetooth/sco.c | |
parent | 2232d31bf18ba02f5cd632bbfc3466aeca394c75 (diff) | |
parent | a429b51930e64dd355840c37251a563000d7c10b (diff) | |
download | linux-10e99777e926907e43fa57ec1208c3f7787fd290.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r-- | net/bluetooth/sco.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 42fdffd1d76c..94954c74f6ae 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -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 = NULL; + } else + sco_chan_del(sk, ECONNRESET); + break; + case BT_CONNECT: case BT_DISCONN: sco_chan_del(sk, ECONNRESET); |