From 156307ce2f8e41f1a9cffe9dd8789b85d947c803 Mon Sep 17 00:00:00 2001 From: Eric Chou Date: Thu, 3 Oct 2013 10:12:46 +0800 Subject: [PATCH] Bug 912376 - SCO wouldn't be dropped after SLC was disconnected, r=btian --- dom/bluetooth/BluetoothHfpManager.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dom/bluetooth/BluetoothHfpManager.cpp b/dom/bluetooth/BluetoothHfpManager.cpp index 481dfe760bb..6838becdb8f 100644 --- a/dom/bluetooth/BluetoothHfpManager.cpp +++ b/dom/bluetooth/BluetoothHfpManager.cpp @@ -1653,14 +1653,8 @@ BluetoothHfpManager::ConnectSco(BluetoothReplyRunnable* aRunnable) bool BluetoothHfpManager::DisconnectSco() { - if (!IsConnected()) { - BT_WARNING("BluetoothHfpManager is not connected"); - return false; - } - - SocketConnectionStatus status = mScoSocket->GetConnectionStatus(); - if (status != SOCKET_CONNECTED && status != SOCKET_CONNECTING) { - BT_WARNING("No SCO exists"); + if (!IsScoConnected()) { + BT_WARNING("SCO has been already disconnected."); return false; }