136 |
136 |
137 MPMLOGSTRING( "CMPMServerSession::HandleServerApplicationConnectionEnds -\ |
137 MPMLOGSTRING( "CMPMServerSession::HandleServerApplicationConnectionEnds -\ |
138 User connection deactivated" ) |
138 User connection deactivated" ) |
139 } |
139 } |
140 |
140 |
|
141 // Clean up the blacklist table |
|
142 iMyServer.HandleServerUnblackListIap( iConnId, 0 ); |
|
143 |
141 // Make sure the connection is removed from server's information array. |
144 // Make sure the connection is removed from server's information array. |
142 iMyServer.RemoveBMConnection( iConnId, *this ); |
145 iMyServer.RemoveBMConnection( iConnId, *this ); |
143 } |
146 } |
144 |
147 |
145 |
148 |
704 MPMLOGSTRING3( "CMPMServerSession::HandleServerIapConnectionStarted\ |
707 MPMLOGSTRING3( "CMPMServerSession::HandleServerIapConnectionStarted\ |
705 - IAP Id = %i, Connection Id = 0x%x", startedIap, startedId ) |
708 - IAP Id = %i, Connection Id = 0x%x", startedIap, startedId ) |
706 |
709 |
707 iMyServer.AppendBMIAPConnectionL( startedIap, startedId, *this ); |
710 iMyServer.AppendBMIAPConnectionL( startedIap, startedId, *this ); |
708 |
711 |
709 // Unblacklist all IAPs related to the connection error |
|
710 // when connection has started. |
|
711 // |
|
712 iMyServer.HandleServerUnblackListIap( startedId, ETemporary ); |
|
713 |
|
714 // Complete the message as soon as possible to avoid latency in BM |
712 // Complete the message as soon as possible to avoid latency in BM |
715 // |
713 // |
716 aMessage.Complete( KErrNone ); |
714 aMessage.Complete( KErrNone ); |
717 |
715 |
718 IapSelectionL()->ConnectionStarted(); |
716 IapSelectionL()->ConnectionStarted(); |
719 } |
717 } |
720 |
|
721 |
718 |
722 // ----------------------------------------------------------------------------- |
719 // ----------------------------------------------------------------------------- |
723 // CMPMServerSession::HandleServerIapConnectionStopped |
720 // CMPMServerSession::HandleServerIapConnectionStopped |
724 // ----------------------------------------------------------------------------- |
721 // ----------------------------------------------------------------------------- |
725 // |
722 // |
823 iConnId ) |
820 iConnId ) |
824 |
821 |
825 // check whether a started connection exists which already |
822 // check whether a started connection exists which already |
826 // uses this IAP. If so, it won't need to be confirmed again |
823 // uses this IAP. If so, it won't need to be confirmed again |
827 // |
824 // |
828 if( iMyServer.CheckIfStarted( aIapId ) ) |
825 if( iMyServer.CheckIfStarted( aIapId, iConnId ) ) |
829 { |
826 { |
830 MPMLOGSTRING( |
827 MPMLOGSTRING( |
831 "CMPMServerSession::IsConfirmFirstL - IAP already started, \ |
828 "CMPMServerSession::IsConfirmFirstL - IAP already started, \ |
832 confirm not necesary - False" ) |
829 confirm not necesary - False" ) |
833 return EFalse; |
830 return EFalse; |
2656 // If session is roaming, notification must be delayed. |
2653 // If session is roaming, notification must be delayed. |
2657 // But, only ConnMon initiated notifications need to be delayed. |
2654 // But, only ConnMon initiated notifications need to be delayed. |
2658 // Required notifications must go through whenever MPM decides |
2655 // Required notifications must go through whenever MPM decides |
2659 // to initiate them. |
2656 // to initiate them. |
2660 // |
2657 // |
2661 if( ( iStoredIapInfo.HoldPrefIapNotif() && aCaller == EConnMon ) || |
2658 if( ( aCaller == EConnMon || aCaller == EConnMonEvent ) && |
2662 ( state == ERoaming && aCaller == EConnMon ) ) |
2659 ( iStoredIapInfo.HoldPrefIapNotif() || state == ERoaming) ) |
2663 { |
2660 { |
2664 MPMLOGSTRING( "CMPMServerSession::PrefIAPNotificationL - \ |
2661 MPMLOGSTRING( "CMPMServerSession::PrefIAPNotificationL - \ |
2665 Mobility ongoing, notification will be handled later" ) |
2662 Mobility ongoing, notification will be handled later" ) |
2666 iStoredIapInfo.SetStoredIapInfo( aIapInfo ); |
2663 iStoredIapInfo.SetStoredIapInfo( aIapInfo ); |
2667 return; |
2664 return; |
2699 TMpmConnPref tempMpmConnPref; |
2696 TMpmConnPref tempMpmConnPref; |
2700 tempMpmConnPref.SetIapId( 0 ); |
2697 tempMpmConnPref.SetIapId( 0 ); |
2701 tempMpmConnPref.SetSnapId( snap ); |
2698 tempMpmConnPref.SetSnapId( snap ); |
2702 IapSelectionL()->ChooseBestIAPL( tempMpmConnPref, availableIAPList ); |
2699 IapSelectionL()->ChooseBestIAPL( tempMpmConnPref, availableIAPList ); |
2703 validateIapId = tempMpmConnPref.IapId(); |
2700 validateIapId = tempMpmConnPref.IapId(); |
2704 if ( ( validateIapId == 0 ) && ( aCaller == EConnMon ) ) |
2701 if ( ( validateIapId == 0 ) |
|
2702 && ( aCaller == EConnMon || aCaller == EConnMonEvent ) ) |
2705 { |
2703 { |
2706 // Since Connection Monitor is the only component which |
2704 // Since Connection Monitor is the only component which |
2707 // is unaware of Connection Id and SNAP, it can't send |
2705 // is unaware of Connection Id and SNAP, it can't send |
2708 // the error notification in case ChooseBestIAPL could |
2706 // the error notification in case ChooseBestIAPL could |
2709 // not find any available IAP for this SNAP. |
2707 // not find any available IAP for this SNAP. |
2710 // |
2708 // |
2711 // All the other components take responsibility of |
2709 // All the other components take responsibility of |
2712 // sending the error notification. |
2710 // sending the error notification. |
2713 // |
2711 // |
2714 TRAP_IGNORE( ErrorNotificationL( KErrNotFound, |
2712 // Do not send the error if this call came from ConnMon Event. |
2715 EMPMMobilityErrorNotification ) ) |
2713 // This will prevent unnecessary mobility errors. |
|
2714 // For example if there is two WLAN networks in Internet destination |
|
2715 // and we get weak indication for the one to which we are connected. |
|
2716 // Then connmon signals us with IAPAvailabilityChange which results |
|
2717 // to no available IAPs. We should not report error in that case. |
|
2718 if ( aCaller == EConnMon ) |
|
2719 { |
|
2720 TRAP_IGNORE( ErrorNotificationL( KErrNotFound, |
|
2721 EMPMMobilityErrorNotification ) ); |
|
2722 } |
|
2723 CleanupStack::PopAndDestroy( &availableIAPList ); |
|
2724 return; |
2716 } |
2725 } |
2717 |
2726 |
2718 TUint32 retNetId = 0; |
2727 TUint32 retNetId = 0; |
2719 iMyServer.CommsDatAccess()->ValidateIapL( iConnId, |
2728 iMyServer.CommsDatAccess()->ValidateIapL( iConnId, |
2720 validateIapId, |
2729 validateIapId, |
2824 |
2833 |
2825 // Show the connecting discreet popup to the user when migrating to another iap |
2834 // Show the connecting discreet popup to the user when migrating to another iap |
2826 if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & |
2835 if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & |
2827 TExtendedConnPref::ENoteBehaviourConnDisableNotes) ) |
2836 TExtendedConnPref::ENoteBehaviourConnDisableNotes) ) |
2828 { |
2837 { |
2829 TBool connectionAlreadyActive = iMyServer.CheckIfStarted( aIapId ); |
2838 TBool connectionAlreadyActive = iMyServer.CheckIfStarted( aIapId, iConnId ); |
2830 CConnectionUiUtilities* connUiUtils = NULL; |
2839 CConnectionUiUtilities* connUiUtils = NULL; |
2831 if (!connectionAlreadyActive ) |
2840 if (!connectionAlreadyActive ) |
2832 { |
2841 { |
2833 TRAPD( popupError, |
2842 TRAPD( popupError, |
2834 connUiUtils = CConnectionUiUtilities::NewL(); |
2843 connUiUtils = CConnectionUiUtilities::NewL(); |