--- a/bluetoothengine/btui/Ecom/src/BTUIPairedDevicesView.cpp Fri Feb 19 22:59:18 2010 +0200
+++ b/bluetoothengine/btui/Ecom/src/BTUIPairedDevicesView.cpp Fri Mar 12 15:43:23 2010 +0200
@@ -289,6 +289,11 @@
TBTDevice device;
device.iIndex = iContainer->CurrentItemIndex();
iModel->GetDevice(device);
+ if ( device.iStatus & EStatusBtuiConnected )
+ {
+ // If device is already connected, we do nothing here.
+ break;
+ }
device.iOperation = EOpConnect;
ConnectL( device, ETrue );
break;
@@ -1069,6 +1074,13 @@
TBTDevice device;
device.iIndex = index;
iModel->GetDevice(device);
+
+ if ( !( device.iStatus & EStatusBtuiConnected) )
+ {
+ // If device is already disconnected, return immediately.
+ return;
+ }
+
iDisconnectQueryDevice = device;//remember device related with query dialog
// Create confirmation query