diff -r dd6aaa97e7b1 -r 2709c04a4af5 bearermanagement/mpm/src/mpmserver.cpp --- a/bearermanagement/mpm/src/mpmserver.cpp Mon Aug 23 13:40:12 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserver.cpp Fri Sep 03 09:38:26 2010 +0300 @@ -732,7 +732,9 @@ if ( iActiveBMConns[i].iConnInfo.iState == EStarting || iActiveBMConns[i].iConnInfo.iState == EStarted ) { - if ( aCdbAccess->CheckWlanL( iActiveBMConns[i].iConnInfo.iIapId ) != ENotWlanIap ) + TWlanIapType iapType( ENotWlanIap ); + TRAPD ( leave, iapType = aCdbAccess->CheckWlanL( iActiveBMConns[i].iConnInfo.iIapId ) ) + if ( ( leave == KErrNone ) && ( iapType != ENotWlanIap ) ) { stopLoop = ETrue; iapId = iActiveBMConns[i].iConnInfo.iIapId; @@ -1493,7 +1495,9 @@ for ( TUint index = 0; index < aIapInfo.iCount; index++ ) { - if ( CommsDatAccess()->CheckWlanL( aIapInfo.iIap[index].iIapId ) != ENotWlanIap ) + TWlanIapType iapType ( ENotWlanIap ); + TRAPD (leave, iapType = CommsDatAccess()->CheckWlanL( aIapInfo.iIap[index].iIapId ) ); + if ( ( iapType != ENotWlanIap ) && ( leave == KErrNone ) ) { // Accept only wlan iaps in internet snap if ( iCommsDatAccess->IsInternetSnapL( aIapInfo.iIap[index].iIapId, 0 ) ) @@ -1550,13 +1554,24 @@ TInt CMPMServer::StartForcedRoamingToConnectedWlanL( TAny* aUpdater ) { MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedWlanL" ); - static_cast( aUpdater )->StartForcedRoamingToWlanL( - static_cast( aUpdater )->iConnMonIapInfo ); + TRAPD( error, static_cast( aUpdater )->StartForcedRoamingToWlanL( + static_cast( aUpdater )->iConnMonIapInfo ) ) + if ( error ) + { + MPMLOGSTRING2("CMPMServer::StartForcedRoamingToConnectedWlan error1 = %d, ", error ) + return 0; + } + // Added also execution of policy based roaming logic because // connections that are in EStarting state, when WLAN signal // gets weak, would remain in WLAN as long as signal is weak. - static_cast( aUpdater )->StartForcedRoamingFromWlanL( - static_cast( aUpdater )->iConnMonIapInfo ); + TRAP( error, static_cast( aUpdater )->StartForcedRoamingFromWlanL( + static_cast( aUpdater )->iConnMonIapInfo ) ) + if ( error ) + { + MPMLOGSTRING2("CMPMServer::StartForcedRoamingToConnectedWlan error2 = %d, ", error ) + } + return 0; } @@ -1597,8 +1612,9 @@ // to a wlan not anymore listed in available iaps and not using mobility api for ( TInt index = 0; index < iActiveBMConns.Count(); index++ ) { - if ( iCommsDatAccess->CheckWlanL( iActiveBMConns[index].iConnInfo.iIapId ) - == EWlanIap ) + TWlanIapType iapType( ENotWlanIap ); + TRAPD( leave, iapType = iCommsDatAccess->CheckWlanL( iActiveBMConns[index].iConnInfo.iIapId ) ) + if ( ( leave == KErrNone ) && ( iapType == EWlanIap ) ) { // Check if used WLAN is still available TBool currentWlanIapAvailable = EFalse;