--- a/bluetoothengine/bteng/src/btengsrvpluginmgr.cpp Wed Apr 14 16:09:00 2010 +0300
+++ b/bluetoothengine/bteng/src/btengsrvpluginmgr.cpp Tue Apr 27 16:49:44 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;