equal
deleted
inserted
replaced
483 TRACE_FUNC_ENTRY |
483 TRACE_FUNC_ENTRY |
484 TRACE_BDADDR(aAddr); |
484 TRACE_BDADDR(aAddr); |
485 TInt err = KErrNotFound; |
485 TInt err = KErrNotFound; |
486 for( TInt i = 0; i < iPluginArray.Count(); i++ ) |
486 for( TInt i = 0; i < iPluginArray.Count(); i++ ) |
487 { |
487 { |
488 // Should be ignored if the plug-in does not have |
488 // Should be ignored if the plug-in does not have |
489 // a connection to the address. |
489 // a connection to the address. |
490 err = iPluginArray[ i ]->Disconnect( aAddr, aDiscType ); |
490 TBTEngConnectionStatus status = iPluginArray[ i ]->IsConnected( aAddr ); |
|
491 if( status == EBTEngConnecting || status == EBTEngConnected ) |
|
492 { |
|
493 err = iPluginArray[ i ]->Disconnect( aAddr, aDiscType ); |
|
494 if( err ) |
|
495 { |
|
496 TRACE_INFO( ( _L( "[BTENG] ERR! Disconnect failed, plugin index %d with err %d" ), i, err ) ) |
|
497 } |
|
498 } |
491 } |
499 } |
492 TRACE_FUNC_RES( ( _L( "result: %d" ), err ) ) |
500 TRACE_FUNC_RES( ( _L( "result: %d" ), err ) ) |
493 return err; |
501 return err; |
494 } |
502 } |
495 |
503 |