diff -r 8c9c07ad8b6b -r 65a3ef1d5bd0 voipplugins/sipconnectionprovider/src/scpservicemanager.cpp --- a/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp Mon Jun 21 15:29:21 2010 +0300 +++ b/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp Thu Aug 19 09:45:22 2010 +0300 @@ -36,6 +36,8 @@ const TInt KDomainMaxLength = 255; const TInt KTempBufMaxLength = 255; +const TUint32 KBearerWlanOnly = 1; + #ifdef _DEBUG const TInt KDebugInfoMaxLength = 255; #endif @@ -1022,21 +1024,25 @@ // void CScpServiceManager::CheckRestrictedConnectionsL( TUint aServiceId ) { - if ( !iSettingHandler->IsVoIPOverWcdmaAllowedL( aServiceId ) ) - { - SCPLOGSTRING( "CScpServiceManager::CheckRestrictedConnectionsL WCDMA not allowed" ); - - TBool sipConnectionCreated( EFalse ); - CScpSipConnection* sipConnection = GetSipConnectionL( + TBool sipConnectionCreated( EFalse ); + CScpSipConnection* sipConnection = GetSipConnectionL( aServiceId, ECCHVoIPSub, sipConnectionCreated ); - if( sipConnectionCreated ) - { - CleanupStack::PushL( sipConnection ); - } + if( sipConnectionCreated ) + { + CleanupStack::PushL( sipConnection ); + } + // Check bearer filttering setting from sip + TUint32 bearerFilttering( 0 ); + TInt err = sipConnection->BearerFiltteringSetting( bearerFilttering ); + SCPLOGSTRING2( "CScpServiceManager::CheckAvailableConnectionsL bearerFilttering = %d", bearerFilttering ); + + if ( ( KErrNone == err ) && ( KBearerWlanOnly == bearerFilttering ) ) + { + SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN only" ); TUint32 snapId( KErrNone ); sipConnection->GetSnap( snapId ); @@ -1089,10 +1095,7 @@ CleanupStack::PopAndDestroy( &cmm ); CleanupStack::PopAndDestroy( &iaps ); - if( sipConnectionCreated ) - { - CleanupStack::PopAndDestroy( sipConnection ); - } + if ( !available && wlanIapFound ) { @@ -1103,6 +1106,11 @@ { User::Leave( KCCHErrorAccessPointNotDefined ); } + } + + if( sipConnectionCreated ) + { + CleanupStack::PopAndDestroy( sipConnection ); } }