diff -r 9c3798b88e30 -r b78e66e88238 bluetoothengine/bteng/src/btengsrvpluginmgr.cpp --- a/bluetoothengine/bteng/src/btengsrvpluginmgr.cpp Sat Apr 24 00:12:05 2010 +0300 +++ b/bluetoothengine/bteng/src/btengsrvpluginmgr.cpp Sat Apr 24 00:30:17 2010 +0300 @@ -485,9 +485,17 @@ TInt err = KErrNotFound; for( TInt i = 0; i < iPluginArray.Count(); i++ ) { - // Should be ignored if the plug-in does not have - // a connection to the address. - err = iPluginArray[ i ]->Disconnect( aAddr, aDiscType ); + // Should be ignored if the plug-in does not have + // a connection to the address. + TBTEngConnectionStatus status = iPluginArray[ i ]->IsConnected( aAddr ); + if( status == EBTEngConnecting || status == EBTEngConnected ) + { + err = iPluginArray[ i ]->Disconnect( aAddr, aDiscType ); + if( err ) + { + TRACE_INFO( ( _L( "[BTENG] ERR! Disconnect failed, plugin index %d with err %d" ), i, err ) ) + } + } } TRACE_FUNC_RES( ( _L( "result: %d" ), err ) ) return err;