Revision: 201013 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 16:22:04 +0300
branchRCL_3
changeset 17 c14618f9de99
parent 15 4dc3bb0099b0
child 19 22c3c67e5001
Revision: 201013 Kit: 201015
accesspointcontrol/apcontrollistplugin/data/apcontrollistpluginrsc.rss
accesspointcontrol/apcontrollistplugin/src/apcontrollistapiwrapper.cpp
apengine/apeng/group/APEngine.MMP
apengine/apeng/src/APNetworks.cpp
apengine/apeng/src/APSelect.cpp
apengine/apeng/src/ApProtHandler.cpp
bearermanagement/mpm/group/mpmserver.mmp
bearermanagement/mpm/inc/mpmcommsdataccess.h
bearermanagement/mpm/inc/mpmcsidwatcher.h
bearermanagement/mpm/inc/mpmdatausagewatcher.h
bearermanagement/mpm/inc/mpmiapselection.h
bearermanagement/mpm/inc/mpmofflinewatcher.h
bearermanagement/mpm/inc/mpmserver.h
bearermanagement/mpm/inc/mpmserversession.h
bearermanagement/mpm/inc/mpmwlanquerydialog.h
bearermanagement/mpm/src/mpmcommsdataccess.cpp
bearermanagement/mpm/src/mpmcsidwatcher.cpp
bearermanagement/mpm/src/mpmdatausagewatcher.cpp
bearermanagement/mpm/src/mpmiapselection.cpp
bearermanagement/mpm/src/mpmofflinewatcher.cpp
bearermanagement/mpm/src/mpmserver.cpp
bearermanagement/mpm/src/mpmserversession.cpp
bearermanagement/mpm/src/mpmwlanquerydialog.cpp
cmmanager/cmmgr/Framework/Src/cmdlg.cpp
cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp
cmmanager/cmmgr/Framework/Src/cmwizard.cpp
cmmanager/cmmgr/Framework/Src/destdlg.cpp
cmmanager/cmmgr/Framework/SrcData/cmmanager.rss
cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h
connectionmonitoring/connmon/connectionmonitor/inc/CWlanSupport.h
connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp
connectionmonitoring/connmon/connectionmonitor/src/ConnMonWLANNetwork.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc
connectionutilities/ConnectionDialogs/DisconnectDlg/data/DisconnectDlg.rss
connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp
connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgDialog.cpp
--- a/accesspointcontrol/apcontrollistplugin/data/apcontrollistpluginrsc.rss	Wed Mar 31 22:15:10 2010 +0300
+++ b/accesspointcontrol/apcontrollistplugin/data/apcontrollistpluginrsc.rss	Wed Apr 14 16:22:04 2010 +0300
@@ -130,34 +130,6 @@
     }
 
 //----------------------------------------------------
-//
-//    r_qtn_acl_conf_nwp_apn_added
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_nwp_apn_added                         
-    { 
-    buf = qtn_acl_conf_nw_provided_apn_added; 
-    }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_conf_apn_added 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_apn_added { buf = qtn_acl_conf_apn_added ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_conf_apn_removed 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_apn_removed { buf = qtn_acl_conf_apn_removed ; }
-
-//----------------------------------------------------
 //   
 //    r_qtn_acl_conf_control_activated 
 //
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistapiwrapper.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/accesspointcontrol/apcontrollistplugin/src/apcontrollistapiwrapper.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -267,7 +267,6 @@
 		if (tptrc.Length())
 			{
 	    	iPlugin.Container()->AddToListBoxL(tptrc);        
-			iPlugin.ShowConfirmNoteAPNL(R_QTN_ACL_CONF_APN_ADDED, tptrc);
 			}
 		else
 			{
@@ -276,7 +275,6 @@
 			TPtrC itemPtr(buf->Des());
 			iPlugin.Container()->AddToListBoxL(itemPtr);			
 			CleanupStack::PopAndDestroy( buf );
-			iPlugin.ShowConfirmNoteL(R_QTN_ACL_CONF_NWP_APN_ADDED);
 			}
 	    break; 	        
 	    } 
@@ -287,8 +285,7 @@
 	    break; 
 	case ERemoveAPN: 
 		iRequest = ENoRequest;	
-		CLOG( ( ESelector, 0, _L( "ERemoveAPN OK" ) ) );
-		iPlugin.ShowConfirmNoteL(R_QTN_ACL_CONF_APN_REMOVED);	
+		CLOG( ( ESelector, 0, _L( "ERemoveAPN OK" ) ) );		
 		iPlugin.Container()->RemoveFromListBoxL();    			
 	    break; 
 	case EActivateACLSecurity:
--- a/apengine/apeng/group/APEngine.MMP	Wed Mar 31 22:15:10 2010 +0300
+++ b/apengine/apeng/group/APEngine.MMP	Wed Apr 14 16:22:04 2010 +0300
@@ -63,10 +63,6 @@
 //Macro to /epoc32 headers
 MW_LAYER_SYSTEMINCLUDE
 
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-SYSTEMINCLUDE ../../../../../os/commsfw/commsconfig/commsdatabaseshim/commdbshim/ProtectedDB
-#endif
-
 LIBRARY     commdb.lib 
 LIBRARY     euser.lib
 LIBRARY     efsrv.lib
--- a/apengine/apeng/src/APNetworks.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/apengine/apeng/src/APNetworks.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -25,11 +25,7 @@
 #include <ApNetworkItemList.h>
 #include <ApEngineConsts.h>
 
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <ProtectDB.h>
-#else
 #include <comms-infras/commdb/protection/protectdb.h>
-#endif
 
 #include "ApNetworks.h"
 #include "ApEngineLogger.h"
--- a/apengine/apeng/src/APSelect.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/apengine/apeng/src/APSelect.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -22,12 +22,7 @@
 #include <eikdef.h>
 #include <d32dbms.h>
 #include <featmgr.h>
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <ProtectDB.h>
-#else
 #include <comms-infras/commdb/protection/protectdb.h>
-#endif
 
 #include <etelpckt.h>
 #ifdef __TEST_USE_SHARED_DATA
--- a/apengine/apeng/src/ApProtHandler.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/apengine/apeng/src/ApProtHandler.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -21,13 +21,8 @@
 #include <commdb.h>
 #include <ApEngineConsts.h>
 
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <ProtectDB.h>
-#include <protectcpdb.h>
-#else
 #include <comms-infras/commdb/protection/protectdb.h>
 #include <comms-infras/commdb/protection/protectcpdb.h>
-#endif
 
 #include <ApProtHandler.h>
 #include <ApListItem.h>
--- a/bearermanagement/mpm/group/mpmserver.mmp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/group/mpmserver.mmp	Wed Apr 14 16:22:04 2010 +0300
@@ -55,6 +55,7 @@
 SOURCE            mpmcsidwatcher.cpp
 SOURCE            mpmdialogbase.cpp
 SOURCE            mpmdatausagewatcher.cpp
+SOURCE            mpmofflinewatcher.cpp
 
 USERINCLUDE       ../inc
 
--- a/bearermanagement/mpm/inc/mpmcommsdataccess.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmcommsdataccess.h	Wed Apr 14 16:22:04 2010 +0300
@@ -359,10 +359,12 @@
         * @param aActiveBMConns Array of active connections.
         * @param aSnapId Destination where connections are located is returned
         *                to this parameter.
+        * @param aServer Handle to server class.
         * @return ETrue if all active connections are in same snap.
         */
         TBool AreActiveIapsInSameSnapL ( RArray<TActiveBMConn>& aActiveBMConns,
-                                         TUint32& aSnapId );
+                                         TUint32& aSnapId,
+                                         CMPMServer& aServer );
 
        /**
         * Select active connection according to snap priorities.
--- a/bearermanagement/mpm/inc/mpmcsidwatcher.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmcsidwatcher.h	Wed Apr 14 16:22:04 2010 +0300
@@ -23,6 +23,9 @@
 
 class CRepository;
 
+// Stop after this many consecutive central repository errors.
+const TInt KMpmCsIdWatcherCenRepErrorThreshold = 80;
+
 /**
  *  Class for accessing central repository
  *  Follows KMpmConnectScreenId key in central repository.
@@ -57,8 +60,6 @@
 
     void RunL();
 
-    TInt RunError( TInt aError );
-
     void DoCancel();
 
 private:
@@ -66,6 +67,16 @@
     CMpmCsIdWatcher();
 
     void ConstructL();
+    
+    /**
+     * Request for notifications.
+     */
+    TInt RequestNotifications();
+        
+    /**
+     * Get Connect screen ID from repository.
+     */
+    TInt GetConnectScreenId();
 
 private: // data
 
@@ -84,6 +95,11 @@
      * Set when user connection is enabled
      */
     TBool iUserConnectionSupported;
+
+    /**
+     * Error counter.
+     */
+    TUint iErrorCounter;
     };
 
 #endif // MPMCSIDWATCHER_H
--- a/bearermanagement/mpm/inc/mpmdatausagewatcher.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmdatausagewatcher.h	Wed Apr 14 16:22:04 2010 +0300
@@ -24,6 +24,9 @@
 class CRepository;
 class CMPMServer;
 
+// Stop after this many consecutive central repository errors.
+const TInt KMpmDataUsageWatcherCenRepErrorThreshold = 80;
+
 /**
  *  Class for accessing central repository.
  *  Follows KCurrentCellularDataUsage key in central repository.
@@ -55,11 +58,6 @@
     void RunL();
 
     /**
-    * Active object's RunError.
-    */
-    TInt RunError( TInt aError );
-
-    /**
     * Active object's DoCancel.
     */
     void DoCancel();
@@ -75,6 +73,17 @@
     * Symbian 2nd phase constructor.
     */
     void ConstructL();
+    
+    /**
+    * Request for notifications.
+    */
+    TInt RequestNotifications();
+    
+    /**
+    * Get current cellular data usage value.
+    */
+    TInt GetCurrentDataUsageValue();
+
 
 private: // data
 
@@ -95,6 +104,11 @@
      */
     CMPMServer* iServer;
 
+    /**
+     * Error counter.
+     */
+    TUint iErrorCounter;
+
     };
 
 #endif // MPMDATAUSAGEWATCHER_H
--- a/bearermanagement/mpm/inc/mpmiapselection.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmiapselection.h	Wed Apr 14 16:22:04 2010 +0300
@@ -28,13 +28,6 @@
 class CMPMConfirmDlgStarting;
 class TMpmConnPref;
 
-enum TOfflineNoteResponse
-    {
-    EOfflineResponseUndefined,
-    EOfflineResponseYes,
-    EOfflineResponseNo
-    };
-
 /**
  * Handles IAP selection. MPM Server session
  * uses the class to select the best available 
@@ -218,27 +211,6 @@
     void HandleUserSelectionL( TBool aIsIap, TUint32 aId, TInt aError  );
 
     /**
-     * Returns the stored user response to the offline note
-     * @since 3.2
-     */
-    TOfflineNoteResponse OfflineNoteResponse();
-
-    /**
-     * Stores the user response to the offline note
-     * @since 3.2
-     * @param aResponse Offline note response
-     */
-    void SetOfflineNoteResponse( TOfflineNoteResponse aResponse );
-
-    /**
-     * Iap selection is notified that conenction is started. 
-     * Offline note response is reseted.
-     *
-     * @since 3.2
-     */
-    void ConnectionStarted();
-
-    /**
      * Get original MPM connection preferences
      * @since 5.2
      */
@@ -356,11 +328,6 @@
     // State of impilict connection start
     TImplicitConnectionState iImplicitState;
 
-    // Offline note response for the connection. 
-    // Offline note must be displayed only once 
-    // during the connection (not for each wlan iap of a snap).
-    TOfflineNoteResponse iOfflineNoteResponse;
-
     // True if connection is roaming (set when displaying offline note)
     TBool iIsRoaming;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bearermanagement/mpm/inc/mpmofflinewatcher.h	Wed Apr 14 16:22:04 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Listens for offline mode changes in central repository.
+*
+*/
+
+#ifndef MPMOFFLINEWATCHER_H
+#define MPMOFFLINEWATCHER_H
+
+//  INCLUDES
+#include <e32base.h>
+
+class CRepository;
+class CMPMServer;
+
+// Stop after this many consecutive central repository errors.
+const TInt KMpmOfflineWatcherCenRepErrorThreshold = 80;
+
+/**
+ *  Class for accessing central repository.
+ *  Follows KCoreAppUIsNetworkConnectionAllowed key in central repository.
+ *  @since 5.2
+ */
+class CMpmOfflineWatcher : public CActive
+    {
+
+public:
+
+    /**
+    * New for calling the two-phased constructor.
+    */
+    static CMpmOfflineWatcher* NewL( CMPMServer* aServer );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CMpmOfflineWatcher();
+
+    /**
+     * Start to listen for events.
+     */
+    void StartL();
+    
+    /**
+    * Active object's RunL.
+    */
+    void RunL();
+
+    /**
+    * Active object's DoCancel.
+    */
+    void DoCancel();
+
+private:
+
+    /**
+    * C++ default constructor.
+    */
+    CMpmOfflineWatcher( CMPMServer* aServer );
+
+    /**
+    * Symbian 2nd phase constructor.
+    */
+    void ConstructL();
+    
+    /**
+    * Request for notifications.
+    */
+    TInt RequestNotifications();
+    
+    /**
+    * Get current offline mode value.
+    */
+    TInt GetCurrentOfflineValue();
+
+
+private: // data
+
+    /**
+     * Is offline feature supported.
+     */
+    TBool iOfflineFeatureSupported;
+
+    /**
+     * Central repository handle.
+     * Own.
+     */
+    CRepository* iRepository;
+
+    /**
+     * Offline mode activity value.
+     */
+    TInt iOfflineMode;     // type: TCoreAppUIsNetworkConnectionAllowed
+
+    /**
+     * Pointer to the MPM Server object.
+     * Not own.
+     */
+    CMPMServer* iServer;
+
+    /**
+     * Error counter.
+     */
+    TUint iErrorCounter;
+
+    };
+
+#endif // MPMOFFLINEWATCHER_H
--- a/bearermanagement/mpm/inc/mpmserver.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserver.h	Wed Apr 14 16:22:04 2010 +0300
@@ -38,6 +38,7 @@
 class CMPMCommsDatAccess;
 class CMpmCsIdWatcher;
 class CMpmDataUsageWatcher;
+class CMpmOfflineWatcher;
 
 // CONSTANTS
 _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" );
@@ -167,6 +168,13 @@
     EMPMBearerTypeOther
     };
 
+enum TOfflineWlanQueryResponse
+    {
+    EOfflineResponseUndefined,
+    EOfflineResponseYes,
+    EOfflineResponseNo
+    };
+
 // FUNCTION PROTOTYPES
 void PanicServer( TInt aPanic );
 
@@ -792,6 +800,14 @@
         inline CMpmCsIdWatcher* CsIdWatcher();
 
         /**
+         * Change state of the P&S keys according to active connection.
+         * Non-leaving version. Resets variables in case error happens.
+         * @since 5.2         
+         * @param aSession Handle to session used by connection.
+        */
+        void UpdateActiveConnection( CMPMServerSession& aSession );
+        
+        /**
         * Change state of the P&S keys according to active connection.
         * @since 5.0
         * @param aSession Handle to session used by connection.
@@ -813,11 +829,12 @@
         void PublishActiveConnection();
         
         /**
-        * Returns number of active connections.
+        * Returns number of active iaps.
         * @since 5.0
+        * @param aKeysUpToDate Tells whether P&S keys are valid or not.
         * @return Number of active connections
         */
-        TInt NumberOfActiveConnections();
+        TInt NumberOfActiveConnections( TBool& aKeysUpToDate );
 
         /**
         * Returns server session instance that corresponds to given
@@ -835,6 +852,30 @@
         */
         void StopCellularConns();
 
+        /**
+        * Offline mode watcher updates the mode variable stored by MPM server.
+        * @since 5.2
+        */
+        void UpdateOfflineMode( TInt newModeValue );
+
+        /**
+        * Returns true if the phone is in offline mode.
+        * @since 5.2
+        */
+        TBool IsPhoneOffline();
+
+        /**
+        * Tells the "Use WLAN in offline mode" query response.
+        * @since 5.2
+        */
+        TOfflineWlanQueryResponse OfflineWlanQueryResponse();
+
+        /**
+        * Called when the "Use WLAN in offline mode" query has been responded.
+        * @since 5.2
+        */
+        void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse);
+
     private:
 
         /**
@@ -940,10 +981,15 @@
         CMpmCsIdWatcher* iMpmCsIdWatcher;
 
         /**
-         * Handle to another central repository watcher
+         * Handle to central repository watcher
          */
         CMpmDataUsageWatcher* iMpmDataUsageWatcher;
 
+        /**
+         * Handle to central repository watcher
+         */
+        CMpmOfflineWatcher* iMpmOfflineWatcher;
+
         // Iap id of the active connection
         TUint32 iActiveIapId;
         
@@ -958,6 +1004,12 @@
 
         // Used for commsdat related functionalities
         CMPMCommsDatAccess* iCommsDatAccess;
+        
+        // Offline mode.
+        TInt iOfflineMode;
+        
+        // Is WLAN usage already accepted in this offline session.
+        TOfflineWlanQueryResponse iOfflineWlanQueryResponse;
     };
 
 #include "mpmserver.inl"
--- a/bearermanagement/mpm/inc/mpmserversession.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserversession.h	Wed Apr 14 16:22:04 2010 +0300
@@ -289,13 +289,6 @@
         void ClientErrorNotificationL( TInt aError );
 
         /**
-        * Checks if phone is in offline mode or not.
-        * @since 3.1
-        * @return ETrue if phone is in offline mode, otherwise EFalse.
-        */
-        TBool IsPhoneOfflineL() const;
-
-        /**
         * Returns the list of available IAPs, where the blacklisted IAPs 
         * have already been removed.
         * @since 3.2
@@ -807,9 +800,9 @@
         * @param aValidatedIap Iap validated by MPM for roaming
         * @return ETrue if necessary, otherwise EFalse.
         */
-        TBool CheckNotifNeed( const TUint32       aCurrentIap,
-                              const TUint32       aLastNotifiedIap,
-                              const TUint32       aValidatedIap );
+        TBool CheckNotifNeedL( const TUint32       aCurrentIap,
+                               const TUint32       aLastNotifiedIap,
+                               const TUint32       aValidatedIap );
 
         /**
         * Returns the list of unavailable IAPs.
@@ -959,6 +952,11 @@
         // Set when this session is user connection
 		//
         TBool iUserConnection;
+        
+        // Set when disconnect dialog is shown to avoid 
+        // showing duplicate cellulara data usage dialog
+        //
+        TBool iDisconnectDialogShown;
     };
 
 #include "mpmserversession.inl"
--- a/bearermanagement/mpm/inc/mpmwlanquerydialog.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmwlanquerydialog.h	Wed Apr 14 16:22:04 2010 +0300
@@ -25,7 +25,8 @@
 #include <wifiprotuiclient.h>
 #include <wifiprotreturn.h>
 
-#include "mpmiapselection.h" // for TOfflineNoteResponse
+#include "mpmcommsdataccess.h"
+
 
 // ID of Easy Wep dialog
 const TUid KUidEasyWepDlg = { 0x101FD673 };
@@ -135,12 +136,10 @@
          * Used if there are several dialogs queued.
          *
          * @param aWlanIapId     Selected WLAN IAP
-         * @param aOfflineStatus Offline note response
          * @param aDialogStatus  Status of the dialog when destroyed.
          * @since 3.2
          */
         void OfferInformation( TUint32 aWlanIapId, 
-                               TOfflineNoteResponse aOfflineStatus,
                                TInt aDialogStatus );
 
         CMPMWlanQueryDialog( CMPMIapSelection&  aSession,
--- a/bearermanagement/mpm/src/mpmcommsdataccess.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmcommsdataccess.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -2325,7 +2325,26 @@
 
             TMpmConnPref tempMpmConnPref;
             tempMpmConnPref.SetSnapId( snap );
-            aSession.IapSelectionL()->ChooseBestIAPL( tempMpmConnPref, aAvailableIAPList );
+            
+            // Ensure that there will be no infinite loops by dropping
+            // this virtual iap out from the list of available iaps.
+            // E.g. next layer SNAP could be the same as current SNAP.
+            RAvailableIAPList tempList;
+            CleanupClosePushL( tempList );
+              
+            for( TInt i=0; i < aAvailableIAPList.Count(); i++ )
+                {
+                // drop this virtual iap out from the list of
+                // available iaps to prevent from infinitely looping
+                //	
+                if ( aAvailableIAPList[i] != aVirtualIapId )
+                    {
+                    tempList.Append( aAvailableIAPList[i] );
+                    }
+                }
+            aSession.IapSelectionL()->ChooseBestIAPL( tempMpmConnPref, tempList );
+            CleanupStack::PopAndDestroy( &tempList );
+            
             aRealIapId = tempMpmConnPref.IapId();
             }
         else if ( virtualNext->iNextLayerIAP != 0 )
@@ -2344,10 +2363,18 @@
                 MPMLOGSTRING(
                     "CMPMCommsDatAccess::FindRealIapL: Call FindRealIapL" )
 
-                FindRealIapL( iap2->RecordId(), 
-                              aRealIapId, 
-                              aAvailableIAPList,
-                              aSession );
+                if ( aVirtualIapId != virtualNext->iNextLayerIAP )
+                    {
+                    FindRealIapL( iap2->RecordId(), 
+                                  aRealIapId, 
+                                  aAvailableIAPList,
+                                  aSession );
+                    }
+                else
+                    {
+                    aRealIapId = 0;
+                    MPMLOGSTRING( "CMPMCommsDatAccess::FindRealIapL: Virtual iap points to itself" )
+                    }
                 }
             else
                 {
@@ -2672,7 +2699,8 @@
 // -----------------------------------------------------------------------------
 //
 TBool CMPMCommsDatAccess::AreActiveIapsInSameSnapL ( RArray<TActiveBMConn>& aActiveBMConns,
-                                                     TUint32& aSnapId )
+                                                     TUint32& aSnapId,
+                                                     CMPMServer& aServer )
     {
     MPMLOGSTRING( "CMPMCommsDatAccess::AreActiveIapsInSameSnapL" )
     TBool same = ETrue;
@@ -2682,8 +2710,12 @@
     // Go through all active connections
     for (TInt index = 0; index < aActiveBMConns.Count(); index++ )
         {
+        CMPMServerSession* serverSession = aServer.GetServerSession(
+                aActiveBMConns[index].iConnInfo.iConnId );
+    
         // Do check only for active connections
-        if ( aActiveBMConns[index].iConnInfo.iState != EStarted )
+        if ( aActiveBMConns[index].iConnInfo.iState != EStarted ||
+             !serverSession->ChooseBestIapCalled())
             {
             continue;
             }
@@ -2693,8 +2725,8 @@
             {
             prevSnapId = snapId;
             // Get destination id for the iap
-            snapId = GetSnapIdL( aActiveBMConns[index].iConnInfo.iIapId );
-                        
+            snapId = aActiveBMConns[index].iConnInfo.iSnap;
+            
             // Check if previous iap's destination is different
             if ( ( ( prevSnapId != snapId ) && prevSnapId && snapId ) ||
                  !snapId )
@@ -2774,7 +2806,10 @@
         }
 
     // Determine the actual priorities for IAPs
-    DeterminePrioritiesL( iapIds, activeIaps, aSession );
+    if( iapIds.Count() > 1 )
+        {
+        DeterminePrioritiesL( iapIds, activeIaps, aSession );
+        }
 
     // Check if a matching available IAP is found.
     if( iapIds.Count() )
--- a/bearermanagement/mpm/src/mpmcsidwatcher.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmcsidwatcher.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -29,16 +29,20 @@
 CMpmCsIdWatcher::CMpmCsIdWatcher()
     : CActive( EPriorityStandard )
     {
+    MPMLOGSTRING( "CMpmCsIdWatcher::CMpmCsIdWatcher" )
+            
     CActiveScheduler::Add( this );    
     }
 
 
 // ---------------------------------------------------------------------------
-// Creates central repositor object
+// Creates central repository object
 // ---------------------------------------------------------------------------
 //
 void CMpmCsIdWatcher::ConstructL()
     {
+    MPMLOGSTRING( "CMpmCsIdWatcher::ConstructL" )
+
     iRepository = CRepository::NewL( KMpmOccCenRepUid );
 
     // Check whether user connection is supported
@@ -56,6 +60,8 @@
 //
 CMpmCsIdWatcher* CMpmCsIdWatcher::NewL()
     {
+    MPMLOGSTRING( "CMpmCsIdWatcher::NewL" )
+
     CMpmCsIdWatcher* self = new( ELeave ) CMpmCsIdWatcher();
     CleanupStack::PushL( self );
     self->ConstructL();
@@ -68,7 +74,9 @@
 // ---------------------------------------------------------------------------
 //
 CMpmCsIdWatcher::~CMpmCsIdWatcher()
-    {    
+    {
+    MPMLOGSTRING( "CMpmCsIdWatcher::~CMpmCsIdWatcher" )
+
     Cancel();
     delete iRepository;
     }
@@ -79,13 +87,13 @@
 //
 void CMpmCsIdWatcher::StartL()
     {
-    // Request notification
-    User::LeaveIfError( iRepository->NotifyRequest( KMpmConnectScreenId,
-                        iStatus ));
-    SetActive();
+    MPMLOGSTRING( "CMpmCsIdWatcher::StartL" )
+            
+    // Get the initial Connect screen ID from repository.
+    User::LeaveIfError( GetConnectScreenId() );
 
-    // Get value from central repository
-    User::LeaveIfError(iRepository->Get(KMpmConnectScreenId, iConnectScreenId));
+    // Request for notifications.
+    User::LeaveIfError( RequestNotifications() );
     }
 
 // ---------------------------------------------------------------------------
@@ -94,6 +102,8 @@
 //
 TUint32 CMpmCsIdWatcher::ConnectScreenId() const
     {
+    MPMLOGSTRING( "CMpmCsIdWatcher::ConnectScreenId" )
+
     if ( iUserConnectionSupported )
         {
         // Return real value if user connection is supported
@@ -113,26 +123,30 @@
 //
 void CMpmCsIdWatcher::RunL()
     {
-    // Leave if error
-    User::LeaveIfError( iStatus.Int() );
+    MPMLOGSTRING( "CMpmCsIdWatcher::RunL" )
 
-    // Request new notification
-    User::LeaveIfError( iRepository->NotifyRequest( KMpmConnectScreenId,
-        iStatus ));
-    SetActive();
-    
-    // Get value from central repository
-    iRepository->Get( KMpmConnectScreenId, iConnectScreenId );
-    }
+    if ( iStatus.Int() < KErrNone )
+        {
+        MPMLOGSTRING2("Status: 0x%08X", iStatus.Int())
+        iErrorCounter++;
+        if ( iErrorCounter > KMpmCsIdWatcherCenRepErrorThreshold )
+            {
+            MPMLOGSTRING2("Over %d consecutive errors, stopping notifications permanently.",
+                    KMpmCsIdWatcherCenRepErrorThreshold)
+            return;
+            }
+        // Else: Error occured but counter not expired. Proceed.
+        }
+    else
+        {
+        // Notification is received ok => Reset the counter.
+        iErrorCounter = 0;
 
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Nothing to do over here
-// ---------------------------------------------------------------------------
-//
-TInt CMpmCsIdWatcher::RunError( TInt /*aError*/ )
-    {
-    return KErrNone;
+        // Get value from central repository
+        GetConnectScreenId();
+        }
+
+    RequestNotifications();
     }
 
 // ---------------------------------------------------------------------------
@@ -142,6 +156,44 @@
 //
 void CMpmCsIdWatcher::DoCancel()
     {
+    MPMLOGSTRING( "CMpmCsIdWatcher::DoCancel" )
     iRepository->NotifyCancel( KMpmConnectScreenId );
     }
 
+// ---------------------------------------------------------------------------
+// Request notifications.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmCsIdWatcher::RequestNotifications()
+    {
+    MPMLOGSTRING( "CMpmCsIdWatcher::RequestNotifications" )
+
+    TInt err = iRepository->NotifyRequest( KMpmConnectScreenId, iStatus );
+        
+    if ( err == KErrNone )
+        {
+        SetActive();
+        }
+    else
+        {
+        MPMLOGSTRING2( "CMpmCsIdWatcher::RequestNotifications, ERROR: %d", err )
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Get current repository key value.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmCsIdWatcher::GetConnectScreenId()
+    {
+    MPMLOGSTRING( "CMpmCsIdWatcher::GetConnectScreenId" )
+
+    TInt err = iRepository->Get( KMpmConnectScreenId, iConnectScreenId );
+        
+    if ( err != KErrNone )
+        {
+        MPMLOGSTRING2( "CMpmCsIdWatcher::GetConnectScreenId, ERROR: %d", err )
+        }
+    return err;
+    }
--- a/bearermanagement/mpm/src/mpmdatausagewatcher.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmdatausagewatcher.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -82,14 +82,11 @@
     {
     MPMLOGSTRING( "CMpmDataUsageWatcher::StartL" )
 
-    // Request notification
-    User::LeaveIfError( iRepository->NotifyRequest( KCurrentCellularDataUsage,
-            iStatus ) );
-    SetActive();
+    // Get the initial data usage value from repository.
+    User::LeaveIfError( GetCurrentDataUsageValue() );
 
-    // Get value from central repository
-    User::LeaveIfError( iRepository->Get( KCurrentCellularDataUsage,
-            iCellularDataUsage ) );
+    // Request notifications.
+    User::LeaveIfError( RequestNotifications() );
     }
 
 // ---------------------------------------------------------------------------
@@ -101,38 +98,39 @@
     {
     MPMLOGSTRING( "CMpmDataUsageWatcher::RunL" )
 
-    User::LeaveIfError( iStatus.Int() );
+    if ( iStatus.Int() < KErrNone )
+        {
+        MPMLOGSTRING2("Status: 0x%08X", iStatus.Int())
+        iErrorCounter++;
+        if ( iErrorCounter > KMpmDataUsageWatcherCenRepErrorThreshold )
+            {
+            MPMLOGSTRING2("Over %d consecutive errors, stopping notifications permanently.",
+                    KMpmDataUsageWatcherCenRepErrorThreshold)
+            return;
+            }
+        // Else: Error occured but counter not expired. Proceed.
+        }
+    else
+        {
+        // Notification is received ok => Reset the counter.
+        iErrorCounter = 0;
 
-    // Request new notification
-    User::LeaveIfError( iRepository->NotifyRequest( KCurrentCellularDataUsage,
-            iStatus ) );
-    SetActive();
+        // Get the new Cellular data usage setting value from central repository.
+        TInt oldCellularDataUsage = iCellularDataUsage;
 
-    TInt oldCellularDataUsage = iCellularDataUsage;
-
-    // Get the new value from central repository
-    User::LeaveIfError( iRepository->Get( KCurrentCellularDataUsage,
-            iCellularDataUsage ) );
+        if ( GetCurrentDataUsageValue() == KErrNone )
+            {
+            // Stop cellular connections if the setting changes into Disabled.
+            if ( oldCellularDataUsage != ECmCellularDataUsageDisabled &&
+                    iCellularDataUsage == ECmCellularDataUsageDisabled &&
+                    iServer->RoamingWatcher()->RoamingStatus() != EMPMRoamingStatusUnknown )
+                {
+                iServer->StopCellularConns();
+                }
+            }
+        }
     
-    // Stop cellular connections if the setting changes into Disabled
-    if ( oldCellularDataUsage != ECmCellularDataUsageDisabled &&
-         iCellularDataUsage == ECmCellularDataUsageDisabled &&
-         iServer->RoamingWatcher()->RoamingStatus() != EMPMRoamingStatusUnknown )
-        {
-        iServer->StopCellularConns();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Nothing to do over here.
-// ---------------------------------------------------------------------------
-//
-TInt CMpmDataUsageWatcher::RunError( TInt /*aError*/ )
-    {
-    MPMLOGSTRING( "CMpmDataUsageWatcher::RunError" )
-
-    return KErrNone;
+    RequestNotifications();
     }
 
 // ---------------------------------------------------------------------------
@@ -147,3 +145,40 @@
     iRepository->NotifyCancel( KCurrentCellularDataUsage );
     }
 
+// ---------------------------------------------------------------------------
+// Request notifications.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmDataUsageWatcher::RequestNotifications()
+    {
+    MPMLOGSTRING( "CMpmDataUsageWatcher::RequestNotifications" )
+
+    TInt err = iRepository->NotifyRequest( KCurrentCellularDataUsage, iStatus );
+        
+    if ( err == KErrNone )
+        {
+        SetActive();
+        }
+    else
+        {
+        MPMLOGSTRING2( "CMpmDataUsageWatcher::RequestNotifications, ERROR: %d", err )
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Get current repository key value.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmDataUsageWatcher::GetCurrentDataUsageValue()
+    {
+    MPMLOGSTRING( "CMpmDataUsageWatcher::GetCurrentDataUsageValue" )
+
+    TInt err = iRepository->Get( KCurrentCellularDataUsage, iCellularDataUsage );
+        
+    if ( err != KErrNone )
+        {
+        MPMLOGSTRING2( "CMpmDataUsageWatcher::GetCurrentDataUsageValue, ERROR: %d", err )
+        }
+    return err;
+    }
--- a/bearermanagement/mpm/src/mpmiapselection.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmiapselection.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -43,7 +43,6 @@
       iUserSelectionIapId( 0 ),
       iUserSelectionSnapId( 0 ),
       iImplicitState( EImplicitStart ),
-      iOfflineNoteResponse( EOfflineResponseUndefined ),
       iIsRoaming( EFalse ),
       iNewWlansAllowed ( EFalse )
     {
@@ -344,7 +343,7 @@
         // KErrGprsOfflineMode should be returned instead of KErrNone.
         // 
         
-        if ( !iapTypeLanOrWlan && iSession->IsPhoneOfflineL() )
+        if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() )
             {
             ChooseIapComplete( KErrGprsOfflineMode, &iChooseIapPref );
             }
@@ -512,7 +511,7 @@
         {
         ChooseIapComplete( KErrGprsServicesNotAllowed, NULL );
         }
-    else if ( !iapTypeLanOrWlan && iSession->IsPhoneOfflineL() )
+    else if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() )
         {
         // In case offline mode is enabled, only LAN or WLAN is allowed.
         // If some other bearer has been requested, then error code 
@@ -952,43 +951,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMIapSelection::OfflineNoteResponse
-// -----------------------------------------------------------------------------
-//
-TOfflineNoteResponse CMPMIapSelection::OfflineNoteResponse()
-    {
-#ifndef _PLATFORM_SIMULATOR_
-    MPMLOGSTRING2( "CMPMIapSelection::OfflineNoteResponse: %d",
-                   iOfflineNoteResponse )
-    return iOfflineNoteResponse;
-#else
-    // Platsim simulates WLAN and offline-mode. To ease automated testing,
-    // offline connection confirmation is not asked in Platsim-variant
-    MPMLOGSTRING( "CMPMIapSelection::OfflineNoteResponse: yes for Platsim" )
-    return EOfflineResponseYes;
-#endif
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMIapSelection::ConnectionStarted
-// -----------------------------------------------------------------------------
-//
-void CMPMIapSelection::ConnectionStarted()
-    {
-    MPMLOGSTRING( "CMPMIapSelection::ConnectionStarted: reset offline response" )
-    SetOfflineNoteResponse( EOfflineResponseUndefined );
-    }
-    
-// -----------------------------------------------------------------------------
-// CMPMIapSelection::SetOfflineNoteShown
-// -----------------------------------------------------------------------------
-//
-void CMPMIapSelection::SetOfflineNoteResponse( TOfflineNoteResponse aResponse )
-    {
-    MPMLOGSTRING2( "CMPMIapSelection::SetOfflineNoteResponse %d ", aResponse )
-    iOfflineNoteResponse = aResponse;
-    }
-// -----------------------------------------------------------------------------
 // CMPMIapSelection::CompleteImplicitConnectionL
 // -----------------------------------------------------------------------------
 //
@@ -1003,7 +965,7 @@
                                    iapTypeLanOrWlan,
                                    *iSession );
                                    
-    if ( !iapTypeLanOrWlan && iSession->IsPhoneOfflineL() )
+    if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() )
         {
         MPMLOGSTRING2( "CMPMIapSelection::CompleteImplicitConnectionL: Completing with code = %i",
                 KErrGprsOfflineMode )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bearermanagement/mpm/src/mpmofflinewatcher.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Listens central repository for offline mode changes.
+ *
+ */
+
+#include <e32base.h>
+#include <centralrepository.h>
+#include <CoreApplicationUIsSDKCRKeys.h>
+#include <featmgr.h>
+
+#include "mpmlogger.h"
+#include "mpmserver.h"
+#include "mpmofflinewatcher.h"
+
+// ---------------------------------------------------------------------------
+// Default C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CMpmOfflineWatcher::CMpmOfflineWatcher( CMPMServer* aServer ) :
+    CActive( EPriorityStandard ), iServer( aServer )
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::CMpmOfflineWatcher" )
+
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// Symbian 2nd phase constructor. Creates a central repository object.
+// ---------------------------------------------------------------------------
+//
+void CMpmOfflineWatcher::ConstructL()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::ConstructL" )
+
+    FeatureManager::InitializeLibL();
+    // If feature isn't supported, then no watching, but return in StartL().
+    iOfflineFeatureSupported = FeatureManager::FeatureSupported( 
+                               KFeatureIdOfflineMode );
+    FeatureManager::UnInitializeLib();
+
+        
+    iRepository = CRepository::NewL( KCRUidCoreApplicationUIs );
+    }
+
+// ---------------------------------------------------------------------------
+// Creates a new object by calling the two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CMpmOfflineWatcher* CMpmOfflineWatcher::NewL( CMPMServer* aServer )
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::NewL" )
+
+    CMpmOfflineWatcher* self = new( ELeave ) CMpmOfflineWatcher( aServer );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CMpmOfflineWatcher::~CMpmOfflineWatcher()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::~CMpmOfflineWatcher" )
+
+    Cancel();
+    delete iRepository;
+    }
+
+// ---------------------------------------------------------------------------
+// Order notification from changes.
+// ---------------------------------------------------------------------------
+//
+void CMpmOfflineWatcher::StartL()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::StartL" )
+            
+    if ( !iOfflineFeatureSupported )
+        {
+        return;
+        }
+
+    // Get the initial data usage value from repository.
+    User::LeaveIfError( GetCurrentOfflineValue() );
+    iServer->UpdateOfflineMode( iOfflineMode );
+    
+    // Request notifications.
+    User::LeaveIfError( RequestNotifications() );
+    }
+
+// ---------------------------------------------------------------------------
+// From class CActive.
+// Event is received when there is a change in central repository key.
+// ---------------------------------------------------------------------------
+//
+void CMpmOfflineWatcher::RunL()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::RunL" )
+
+    if ( iStatus.Int() < KErrNone )
+        {
+        MPMLOGSTRING2("Status: 0x%08X", iStatus.Int())
+        iErrorCounter++;
+        if ( iErrorCounter > KMpmOfflineWatcherCenRepErrorThreshold )
+            {
+            MPMLOGSTRING2("Over %d consecutive errors, stopping notifications permanently.",
+                    KMpmOfflineWatcherCenRepErrorThreshold)
+            return;
+            }
+        // Else: Error occured but counter not expired. Proceed.
+        }
+    else
+        {
+        // Notification is received ok => Reset the counter.
+        iErrorCounter = 0;
+
+        // Check if mode has changed (it should).
+        TInt oldMode = iOfflineMode;
+        
+        TInt err = GetCurrentOfflineValue();
+        if ( err == KErrNone && oldMode != iOfflineMode )
+            {
+            iServer->UpdateOfflineMode( iOfflineMode );
+            }
+        }
+    
+    RequestNotifications();
+    }
+
+// ---------------------------------------------------------------------------
+// From class CActive.
+// Cancel the outstanding request.
+// ---------------------------------------------------------------------------
+//
+void CMpmOfflineWatcher::DoCancel()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::DoCancel" )
+
+    iRepository->NotifyCancel( KCoreAppUIsNetworkConnectionAllowed );
+    }
+
+// ---------------------------------------------------------------------------
+// Request for notifications.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmOfflineWatcher::RequestNotifications()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::RequestNotifications" )
+
+    TInt err = iRepository->NotifyRequest( KCoreAppUIsNetworkConnectionAllowed, iStatus );
+        
+    if ( err == KErrNone )
+        {
+        SetActive();
+        }
+    else
+        {
+        // MPM's offline mode watching wouldn't recover... 
+        MPMLOGSTRING2( "CMpmOfflineWatcher::RequestNotifications, ERROR: %d", err )
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the current repository key value.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmOfflineWatcher::GetCurrentOfflineValue()
+    {
+    MPMLOGSTRING( "CMpmOfflineWatcher::GetCurrentOfflineValue" )
+
+    TInt err = iRepository->Get( KCoreAppUIsNetworkConnectionAllowed, iOfflineMode );
+        
+    if ( err != KErrNone )
+        {
+        MPMLOGSTRING2( "CMpmOfflineWatcher::GetCurrentOfflineValue, ERROR: %d", err )
+        }
+    return err;
+    }
--- a/bearermanagement/mpm/src/mpmserver.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserver.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -26,6 +26,7 @@
 #include <mmtsy_names.h>                 // KMmTsyModuleName
 #include <centralrepository.h>
 #include <es_sock_partner.h>
+#include <CoreApplicationUIsSDKCRKeys.h>
 
 #include "mpmserver.h"
 #include "mpmserversession.h"
@@ -44,6 +45,7 @@
 #include "mpmcsidwatcher.h"
 #include "mpmdatausagewatcher.h"
 #include "mpmpropertydef.h"
+#include "mpmofflinewatcher.h"
 
 // ============================= LOCAL FUNCTIONS ===============================
 
@@ -91,7 +93,8 @@
       iWlanQueryQueue( NULL ),
       iConnectDialogQueue( NULL ),
       iDefaultConnection( NULL ), 
-      iConnectionCounter( 0 )
+      iConnectionCounter( 0 ),
+      iOfflineMode( ECoreAppUIsNetworkConnectionAllowed )
     {
     }
 
@@ -175,8 +178,6 @@
     iMpmCsIdWatcher->StartL();
 
     // Create another central repository watcher and start it
-    // TODO: Trapped, because currently it may fatally leave in HW.
-    // (Possibly because of the capability updates of data usage watcher's CR-keys.)
     TRAPD( duwErr, iMpmDataUsageWatcher = CMpmDataUsageWatcher::NewL( this ) );
     if (duwErr == KErrNone)
         {
@@ -188,6 +189,18 @@
         MPMLOGSTRING( "CMPMServer::ConstructL: CMpmDataUsageWatcher::NewL() failed!" )
         }
 
+    // Create another central repository watcher and start it
+    TRAPD( owErr, iMpmOfflineWatcher = CMpmOfflineWatcher::NewL( this ) );
+    if (owErr == KErrNone)
+        {
+        iMpmOfflineWatcher->StartL();
+        }
+    else
+        {
+        iMpmOfflineWatcher = NULL;
+        MPMLOGSTRING( "CMPMServer::ConstructL: CMpmOfflineWatcher::NewL() failed!" )
+        }
+
     // Define P&S keys (snap & iap) for the user connection
     TInt ret = RProperty::Define( KMPMUserConnectionCategory,
                                   KMPMPSKeyUserConnectionSnap,
@@ -345,7 +358,9 @@
     delete iMpmCsIdWatcher;    
     
     delete iMpmDataUsageWatcher;    
-    
+
+    delete iMpmOfflineWatcher;    
+
     iDedicatedClients.Close();
 
     delete iCommsDatAccess;    
@@ -446,18 +461,9 @@
             }
         }
 
-    if ( aState == EStarted )
+    if ( aState == EStarted && aSession.ChooseBestIapCalled() )
         {
-        TInt ret = KErrNone;
-        
-        TRAP ( ret, UpdateActiveConnectionL( aSession ) );
-        
-        if ( ret != KErrNone )
-            {
-            iActiveBearerType = EMPMBearerTypeNone;
-            iActiveIapId = 0;
-            iActiveSnapId = 0;            
-            }
+        UpdateActiveConnection( aSession );
         }
 
 #ifdef _DEBUG
@@ -512,15 +518,9 @@
         iActiveBMConns[index1].iConnInfo.iState = EIdle;
         
         // Change state of P&S keys if needed
-        TInt ret = KErrNone;
-        
-        TRAP ( ret, UpdateActiveConnectionL( aSession ) );
-        
-        if ( ret != KErrNone )
+        if ( aSession.ChooseBestIapCalled() )
             {
-            iActiveBearerType = EMPMBearerTypeNone;
-            iActiveIapId = 0;
-            iActiveSnapId = 0;            
+            UpdateActiveConnection( aSession );
             }
         }
 #ifdef _DEBUG
@@ -560,15 +560,9 @@
             iActiveBMConns.Remove( i );
 
             // Update active connection
-            TInt ret = KErrNone;
-        
-            TRAP ( ret, UpdateActiveConnectionL( aSession ) );
-        
-            if ( ret != KErrNone )
+            if ( aSession.ChooseBestIapCalled() )
                 {
-                iActiveBearerType = EMPMBearerTypeNone;
-                iActiveIapId = 0;
-                iActiveSnapId = 0;            
+                UpdateActiveConnection( aSession );
                 }
             }
         }
@@ -857,15 +851,9 @@
             }
         }
 
-    TInt ret = KErrNone;
-        
-    TRAP ( ret, UpdateActiveConnectionL( aSession ) );
-        
-    if ( ret != KErrNone )
+    if ( aSession.ChooseBestIapCalled() )
         {
-        iActiveBearerType = EMPMBearerTypeNone;
-        iActiveIapId = 0;
-        iActiveSnapId = 0;            
+        UpdateActiveConnection( aSession );
         }
 
 #ifdef _DEBUG
@@ -930,15 +918,9 @@
                 }
             
             // Update active connection
-            TInt ret = KErrNone;
-        
-            TRAP ( ret, UpdateActiveConnectionL( aSession ) );
-        
-            if ( ret != KErrNone )
+            if ( aSession.ChooseBestIapCalled() )
                 {
-                iActiveBearerType = EMPMBearerTypeNone;
-                iActiveIapId = 0;
-                iActiveSnapId = 0;            
+                UpdateActiveConnection( aSession );
                 }
             }
         }
@@ -1530,34 +1512,55 @@
 //
 void CMPMServer::StopConnections( TInt aIapId )
     {
+    MPMLOGSTRING2( "CMPMServer::StopConnections aIapId = %d", aIapId )
     for (TInt index = 0; index < iSessions.Count(); index++)
         {
-/*        if (iSessions[index]->UserConnection())
-            continue;
-  */          
+        CMPMServerSession* session = iSessions[index];
         // Stop connection
         if ( aIapId == 0 )
             {
-            iSessions[index]->StopConnection();
+            session->StopConnection();
             }
-        else
+        else if ( GetBMIap( session->ConnectionId() ) == aIapId )
             {
-            TRAP_IGNORE( iSessions[index]->StopIAPNotificationL( aIapId ));
-            }
-        
+            TRAP_IGNORE( session->StopIAPNotificationL( aIapId ));
+            }     
         }
     }
 
 // -----------------------------------------------------------------------------
+// CMPMServer::UpdateActiveConnection
+// -----------------------------------------------------------------------------
+//
+void CMPMServer::UpdateActiveConnection( CMPMServerSession& aSession )
+    {
+    // Update active connection
+    TInt ret = KErrNone;
+            
+    TRAP ( ret, UpdateActiveConnectionL( aSession ) );
+            
+    if ( ret != KErrNone )
+        {
+        iActiveBearerType = EMPMBearerTypeNone;
+        iActiveIapId = 0;
+        iActiveSnapId = 0;            
+        }   
+    }
+
+// -----------------------------------------------------------------------------
 // CMPMServer::UpdateActiveConnectionL
 // -----------------------------------------------------------------------------
 //
 void CMPMServer::UpdateActiveConnectionL( CMPMServerSession& aSession )
     {
     MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL" )
-    TUint32 snapId;
 
-    if ( !NumberOfActiveConnections() )
+    TBool keysUpToDate( ETrue );
+    
+    // number of active iaps
+    TInt numberOfActive = NumberOfActiveConnections( keysUpToDate );
+    
+    if ( numberOfActive == 0 )
         {
         // If no active connections then just reset keys and publish
         iActiveBearerType = EMPMBearerTypeNone;
@@ -1566,29 +1569,43 @@
         PublishActiveConnection();
         return;
         }
+        
+    if ( keysUpToDate )
+        {
+        MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: already up-to-date" )
+        return;   
+        }
 
-    // Check if all active connections are in same snap
-    if ( CommsDatAccess()->AreActiveIapsInSameSnapL(
-         iActiveBMConns, snapId ) )
+    if ( numberOfActive > 1 )
         {
-        // Select active connection according to priority
-        CommsDatAccess()->SelectActiveConnectionL (
-            snapId,
-            iActiveBMConns,
-            iActiveIapId,
-            iActiveSnapId,
-            iActiveBearerType,
-            aSession );
+        // Check if all active connections are in same snap
+        TUint32 snapId;
 
-        PublishActiveConnection();
-        return;
+        if ( CommsDatAccess()->AreActiveIapsInSameSnapL(
+             iActiveBMConns, snapId, *this ) )
+            {
+            MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: Active iaps are in one SNAP" )
+            // Select active connection according to priority
+            CommsDatAccess()->SelectActiveConnectionL (
+                snapId,
+                iActiveBMConns,
+                iActiveIapId,
+                iActiveSnapId,
+                iActiveBearerType,
+                aSession );
+
+            PublishActiveConnection();
+            return;
+            }
+        
+        MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: Active iaps are in different SNAPs" )
         }
 
     // Reset active connections
     iActiveBearerType = EMPMBearerTypeNone;
     iActiveIapId = 0;
     iActiveSnapId = 0;
-            
+                
     // Active connections locating in different snaps
     // Use priority order vpn, wlan and packet
     for ( TInt index = 0; index < iActiveBMConns.Count(); index++ )
@@ -1602,10 +1619,11 @@
             {
             TMPMBearerType bearerType = EMPMBearerTypeOther;
         
-            if ( iDedicatedClients.Find( iActiveBMConns[index].iConnInfo.iAppUid ) == 
-                 KErrNone )
+            TInt ret = iDedicatedClients.Find( iActiveBMConns[index].iConnInfo.iAppUid );
+            if ( ret != KErrNotFound )
                 {
                 // Skip dedicated client
+                MPMLOGSTRING2( "Skip dedicated client = %d", iActiveBMConns[index].iConnInfo.iAppUid )
                 continue;
                 }
 
@@ -1632,9 +1650,8 @@
                 iActiveSnapId = iActiveBMConns[index].iConnInfo.iSnap;
                 }
             }
-
-        PublishActiveConnection();  
         }
+    PublishActiveConnection();
     }
 
 // -----------------------------------------------------------------------------
@@ -1697,13 +1714,18 @@
 
 // -----------------------------------------------------------------------------
 // CMPMServer::NumberOfActiveConnections
+// Returns number of active iaps.
 // -----------------------------------------------------------------------------
 //
-TInt CMPMServer::NumberOfActiveConnections()
+TInt CMPMServer::NumberOfActiveConnections( TBool& aKeysUpToDate )
     {
     MPMLOGSTRING( "CMPMServer::NumberOfActiveConnections" )
     
+    aKeysUpToDate = ETrue; 
     TInt count( 0 );
+    RArray<TUint32> activeIaps;
+    
+    activeIaps.Reset();
     
     for ( TInt index = 0; index < iActiveBMConns.Count(); index++ )
         {
@@ -1713,10 +1735,25 @@
         if ( iActiveBMConns[index].iConnInfo.iState == EStarted &&
              serverSession->ChooseBestIapCalled() )
             {
-            count++;
+            TInt ret = activeIaps.Find( iActiveBMConns[index].iConnInfo.iIapId );
+ 
+            if ( ret == KErrNotFound )
+                {        
+                activeIaps.Append ( iActiveBMConns[index].iConnInfo.iIapId ); 
+                count++;
+                }
+            
+            if ( iActiveIapId != iActiveBMConns[index].iConnInfo.iIapId )
+                 {
+                 // iap that is different from current active iap was found
+                 aKeysUpToDate = EFalse;
+                 }
             }
         }
     
+    activeIaps.Close();
+    MPMLOGSTRING2( "CMPMServer::NumberOfActiveConnections: count = %d", count )
+    
     return count;
     }
 
@@ -2083,6 +2120,75 @@
     stoppedIaps.Close();
     }
 
+// ---------------------------------------------------------------------------
+// CMPMServer::UpdateOfflineMode
+// Offline watcher listens the offline mode and calls this when it's changed.
+// ---------------------------------------------------------------------------
+//
+void CMPMServer::UpdateOfflineMode( TInt newModeValue )
+    {
+    MPMLOGSTRING2( "CMPMServer::UpdateOfflineMode: Value %d", newModeValue )
+
+    iOfflineMode = newModeValue;
+
+    if ( iOfflineMode == ECoreAppUIsNetworkConnectionAllowed )
+        {
+        // Offline mode finished, reset the QueryResponse variable.
+        iOfflineWlanQueryResponse = EOfflineResponseUndefined;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CMPMServer::IsPhoneOffline
+// Returns the current offline mode.
+// ---------------------------------------------------------------------------
+//
+TBool CMPMServer::IsPhoneOffline()
+    {
+    MPMLOGSTRING( "CMPMServer::IsPhoneOffline" )
+
+    TBool retval = EFalse;
+    if ( iOfflineMode == ECoreAppUIsNetworkConnectionNotAllowed)
+        {
+        retval = ETrue;
+        MPMLOGSTRING( "CMPMServer::IsPhoneOffline: Yes." )
+        }
+    return retval;
+    }
+
+// ---------------------------------------------------------------------------
+// CMPMServer::OfflineWlanQueryResponse
+// Tells the "Use WLAN in offline mode" query's response during the
+// current offline mode session.
+// ---------------------------------------------------------------------------
+//
+TOfflineWlanQueryResponse CMPMServer::OfflineWlanQueryResponse()
+    {
+    MPMLOGSTRING( "CMPMServer::OfflineWlanQueryResponse" )
+
+#ifndef _PLATFORM_SIMULATOR_
+    MPMLOGSTRING2( "CMPMServer::IsOfflineWlanQueryAccepted: %d", iOfflineWlanQueryResponse )
+    return iOfflineWlanQueryResponse;
+#else
+    // Platsim simulates WLAN and offline-mode. To ease automated testing,
+    // offline connection confirmation is not asked in Platsim-variant
+    MPMLOGSTRING( "CMPMServer::OfflineWlanQueryResponse: yes for Platsim" )
+    return EOfflineResponseYes;
+#endif
+    }
+
+// ---------------------------------------------------------------------------
+// CMPMServer::SetOfflineWlanQueryResponse
+// Called when the "Use WLAN in offline mode" note has been responded.
+// ---------------------------------------------------------------------------
+//
+void CMPMServer::SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse)
+    {
+    MPMLOGSTRING( "CMPMServer::SetOfflineWlanQueryResponse" )
+
+    iOfflineWlanQueryResponse = aResponse;
+    }
+
 // -----------------------------------------------------------------------------
 // TMPMBlackListConnId::Append
 // -----------------------------------------------------------------------------
--- a/bearermanagement/mpm/src/mpmserversession.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserversession.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -25,7 +25,6 @@
 #include <gsmerror.h>     // KErrPacketDataTsyMaxPdpContextsReached 
 #include <etelpckt.h>     // KErrUmtsMaxNumOfContextExceededByNetwork
 #include <bldvariant.hrh>                // For feature flags
-#include <featmgr.h>                     // FeatureManager
 #include <centralrepository.h>           // CRepository 
 #include <CoreApplicationUIsSDKCRKeys.h> // KCRUidCoreApplicationUIs, 
                                          // KCoreAppUIsNetworkConnectionAllowed
@@ -76,7 +75,8 @@
       iConfirmDlgRoaming( NULL ),
       iStoredIapInfo(),
       iIapSelection( NULL ),
-      iMigrateState( EMigrateNone )
+      iMigrateState( EMigrateNone ),
+      iDisconnectDialogShown( EFalse )
     {
     }
 
@@ -94,12 +94,6 @@
             *const_cast<CMPMServer*>( &iMyServer ), *this ));
         }
 
-    FeatureManager::InitializeLibL();
-    iOfflineFeatureSupported = FeatureManager::FeatureSupported( 
-                                   KFeatureIdOfflineMode );
- 
-     FeatureManager::UnInitializeLib();
-                                       
     // Append session pointer to server
     // 
     iMyServer.AppendSessionL( this );
@@ -712,8 +706,6 @@
     // Complete the message as soon as possible to avoid latency in BM
     // 
     aMessage.Complete( KErrNone );
-    
-    IapSelectionL()->ConnectionStarted();
     }
 
 // -----------------------------------------------------------------------------
@@ -852,6 +844,21 @@
         {
         MPMLOGSTRING( "CMPMServerSession::IsConfirmFirstL - True" )
         isConfirmFirst = ETrue;
+
+        // iDisconnectDialogShown is set when disconnect dialog is shown.
+        // Before the disconnect dialog is shown, data usage confirmation
+        // dialog is already shown for the new PDP context. If you choose
+        // to disconnect the active PDP context then data usage dialog is
+        // shown again for the new context. So, set isConfirmFirst to
+        // False to avoid duplicate cellular confirm dialog
+        //
+        if ( iDisconnectDialogShown )
+            {
+            MPMLOGSTRING( "CMPMServerSession::IsConfirmFirstL  - False; Data \
+confirmation dialog already shown this IAP" )
+            isConfirmFirst = EFalse;
+            iDisconnectDialogShown = EFalse;
+            }
         }
     else 
         {
@@ -1419,8 +1426,11 @@
         }
 
     // Show error popup if it's allowed per client request
+    // Don't show the pop up if error code is for disconnect dialog
+    //
     if ( !( iIapSelection->MpmConnPref().NoteBehaviour() &
-            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) )
+            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) &&
+         !DisconnectDlgErrorCode( error ) )
         {
         CConnectionUiUtilities* connUiUtils = NULL;
         TRAPD( popupCreateError, connUiUtils = CConnectionUiUtilities::NewL() );
@@ -1499,6 +1509,7 @@
             iDisconnectDlg = CMPMDisconnectDlg::NewL( *const_cast<CMPMServerSession*>(this),
                                                       error,
                                                       *MyServer().DisconnectQueue() );
+            iDisconnectDialogShown = ETrue;
             return;
             }
         else
@@ -1860,13 +1871,13 @@
         // Store message for later usage.
     iServerSortSNAPMessage = aMessage;
 
-    TUint32 aSeconds = static_cast<TUint32>( iServerSortSNAPMessage.Int2() );
+    TUint32 seconds = static_cast<TUint32>( iServerSortSNAPMessage.Int2() );
     
     // To display up to date information the WLAN scan should be done first
     iMyServer.Events()->ScanWLANNetworksL( this, 
                                            ConnectionId(), 
                                            EWlanScanCallbackSortSnap, 
-                                           aSeconds );
+                                           seconds );
     }
     
 // -----------------------------------------------------------------------------
@@ -2665,16 +2676,9 @@
             }
         }
 
-    TInt err(0);
     TInt currentIap = MyServer().GetBMIap( iConnId );
-    MPMLOGSTRING4( "CMPMServerSession::PrefIAPNotificationL - \
-current iap %d, last notified %d, err %d ", currentIap, iLastNotifiedIap, err )
-    if( err != KErrNone )
-        {
-        MPMLOGSTRING( "CMPMServerSession::PrefIAPNotificationL: Connection is not \
-registered for notifications" )
-        return;
-        }
+    MPMLOGSTRING3( "CMPMServerSession::PrefIAPNotificationL - \
+current iap %d, last notified %d ", currentIap, iLastNotifiedIap )
         
     TBool iapTypeLanOrWlan( EFalse );
     RAvailableIAPList  availableIAPList;
@@ -2731,9 +2735,9 @@
                                        iapTypeLanOrWlan,
                                        *this );
         
-        if ( CheckNotifNeed( currentIap,
-                             iLastNotifiedIap,
-                             validateIapId ) )
+        if ( CheckNotifNeedL( currentIap,
+                              iLastNotifiedIap,
+                              validateIapId ) )
             {
             MPMLOGSTRING2( "CMPMServerSession::PrefIAPNotificationL: \
 Sending pref iap notification connId: 0x%x", iConnId )
@@ -2797,7 +2801,7 @@
         // 
     else 
         {
-        err = availableIAPList.Find( oldIapId );
+        TInt err = availableIAPList.Find( oldIapId );
         if( err == KErrNotFound )
             {
             MPMLOGSTRING2( "CMPMServerSession::PrefIAPNotificationL: \
@@ -2975,35 +2979,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServerSession::IsPhoneOfflineL
-// 
-// Checks if phone is in offline mode or not.
-// Return ETrue if phone is in offline mode.
-// Return EFalse if phone is not in offline mode.
-// -----------------------------------------------------------------------------
-//
-TBool CMPMServerSession::IsPhoneOfflineL() const
-    {
-    MPMLOGSTRING( "CMPMServerSession::IsPhoneOfflineL" )
-    if ( iOfflineFeatureSupported )
-        {
-        CRepository* repository = CRepository::NewLC(KCRUidCoreApplicationUIs);
-        TInt connAllowed = ECoreAppUIsNetworkConnectionAllowed;
-        repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed );
-        CleanupStack::PopAndDestroy( repository ); 
-        if ( !connAllowed )
-            {
-            MPMLOGSTRING(
-                "CMPMServerSession::IsPhoneOfflineL Phone is in offline mode" )
-            return ETrue;
-            }
-        }
-    MPMLOGSTRING(
-        "CMPMServerSession::IsPhoneOfflineL Phone is not in offline mode" )
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServerSession::AvailableUnblacklistedIapsL
 // -----------------------------------------------------------------------------
 //
@@ -3159,12 +3134,12 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServerSession::CheckNotifNeed
+// CMPMServerSession::CheckNotifNeedL
 // -----------------------------------------------------------------------------
 //
-TBool CMPMServerSession::CheckNotifNeed( const TUint32       aCurrentIap,
-                                         const TUint32       aLastNotifiedIap,
-                                         const TUint32       aValidatedIap )
+TBool CMPMServerSession::CheckNotifNeedL( const TUint32       aCurrentIap,
+                                          const TUint32       aLastNotifiedIap,
+                                          const TUint32       aValidatedIap )
     {
     TBool retValue( EFalse );
 
@@ -3183,8 +3158,19 @@
             }
         else
             {
-            MPMLOGSTRING( "CMPMServerSession::CheckNotifNeed: notif needed" )
-            retValue = ETrue;
+            TCmUsageOfWlan usageOfWlan = MyServer().CommsDatAccess()->ForcedRoamingL();
+            
+            if ( usageOfWlan == ECmUsageOfWlanManual &&
+                 MyServer().CommsDatAccess()->CheckWlanL( aValidatedIap ) != ENotWlanIap  )
+                {
+                MPMLOGSTRING( "CMPMServerSession::CheckNotifNeed: WLAN IAP, Switch to WLAN is Manual, no need to send notification" )
+                retValue = EFalse;
+                }
+            else
+                {
+                MPMLOGSTRING( "CMPMServerSession::CheckNotifNeed: notif needed" )
+                retValue = ETrue;             
+                }
             }
        }
     else
@@ -3579,7 +3565,7 @@
 TBool CMPMServerSession::ForcedRoaming()
     {
     TBool forcedRoaming( EFalse );
-    if ( iIapSelection != NULL )
+    if ( iIapSelection )
         {
         forcedRoaming = iIapSelection->MpmConnPref().ForcedRoaming();
         }
@@ -3659,7 +3645,8 @@
         // be filtered.
         index = 0;
         RAvailableIAPList availableIaps; 
-            
+        CleanupClosePushL( availableIaps );
+		
         for ( TUint i = 0; i < aIapInfo.iCount; i++ )
             {
             availableIaps.AppendL( aIapInfo.iIap[i].iIapId );
@@ -3704,7 +3691,8 @@
                 aIapInfo.iCount--;                               
                 }
             index++;
-            }        
+            }
+        CleanupStack::PopAndDestroy( &availableIaps );
         }
     }
 
--- a/bearermanagement/mpm/src/mpmwlanquerydialog.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/bearermanagement/mpm/src/mpmwlanquerydialog.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -135,7 +135,6 @@
         {
         MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog starts new dialog" )
         dlg->OfferInformation( iWlanIapId, 
-                               iIapSelection.OfflineNoteResponse(),
                                iStatus.Int() );
         // In destructor we cannot let the query leave
         TRAPD( err, dlg->StartWlanQueryL(); )
@@ -195,7 +194,8 @@
         {
         if( iStatus.Int() == KErrNone )
             {
-            iIapSelection.SetOfflineNoteResponse( EOfflineResponseYes );
+            iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
+                    EOfflineResponseYes );
             if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) )
                 {
                 MPMLOGSTRING( "CMPMWlanQueryDialog::RunL starting wlan network query" )
@@ -205,7 +205,8 @@
             }
         else if ( iStatus.Int() == KErrCancel )
             {
-            iIapSelection.SetOfflineNoteResponse( EOfflineResponseNo );
+            iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
+                    EOfflineResponseNo );
             MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", 
                            iStatus.Int() )
             }
@@ -462,19 +463,12 @@
     MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery noteBehaviour = %d", noteBehaviour )
     
     if( !emergencyCallEstablished && 
-        iIapSelection.Session()->IsPhoneOfflineL() && 
+        iIapSelection.Session()->MyServer().IsPhoneOffline() && 
         !activeWlanIap && 
-        iIapSelection.OfflineNoteResponse() != EOfflineResponseYes &&
+        iIapSelection.Session()->MyServer().OfflineWlanQueryResponse() != EOfflineResponseYes &&
         iOverrideStatus == KErrNone )
         {
-        // if user has already refused offline note complete immediately
-        //
-        if ( iIapSelection.OfflineNoteResponse() == EOfflineResponseNo )
-            {
-            MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery user has already refused offline" )
-            iIapSelection.UserWlanSelectionDoneL( KErrCancel, iWlanIapId );
-            }
-        else if ( noteBehaviour & TExtendedConnPref::ENoteBehaviourConnDisableQueries )
+        if ( noteBehaviour & TExtendedConnPref::ENoteBehaviourConnDisableQueries )
             {
             MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery offline note query not shown due to disabled queries" )
             iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId );
@@ -529,8 +523,7 @@
 // -----------------------------------------------------------------------------
 //
 void CMPMWlanQueryDialog::OfferInformation(
-                TUint32 aWlanIapId, 
-                TOfflineNoteResponse aOfflineStatus,
+                TUint32 aWlanIapId,
                 TInt aDialogStatus )
     {
     TBool isEasyWlan( EFalse );
@@ -551,12 +544,13 @@
         iWlanIapId      = aWlanIapId;
         iOverrideStatus = aDialogStatus;
         }
-    if ( aOfflineStatus != EOfflineResponseUndefined )
+    TOfflineWlanQueryResponse offlineResponse =
+            iIapSelection.Session()->MyServer().OfflineWlanQueryResponse();
+    if ( offlineResponse != EOfflineResponseUndefined )
         {
         MPMLOGSTRING3( "CMPMWlanQueryDialog<0x%x>::OfferInformation: offline response %d",
                        iIapSelection.Session()->ConnectionId(),
-                       aOfflineStatus ) 
-        iIapSelection.SetOfflineNoteResponse( aOfflineStatus );        
+                       offlineResponse )
         iOverrideStatus = aDialogStatus;
         }
 
--- a/cmmanager/cmmgr/Framework/Src/cmdlg.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/cmmanager/cmmgr/Framework/Src/cmdlg.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -107,7 +107,7 @@
     , iCmManager( aCmManager )
     , iDestUid ( aDestUid )
     , iPrioritising ( EFalse )
-    , iExitReason( KDialogUserBack )
+    , iExitReason( KDialogUserExit )
     , iEscapeArrived( EFalse )
     , iExitduringProcessing( EFalse )
     , iBackduringProcessing( EFalse )
@@ -136,7 +136,10 @@
         // set old text back, if we have it...
         if ( iOldTitleText )
             {
-            TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
+            if ( iExitReason == KDialogUserBack )
+                {
+                TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
+                }
             delete iOldTitleText; iOldTitleText = NULL;
             }
         }    
@@ -446,6 +449,7 @@
         case EAknSoftkeyBack:
             {
             iCmManager->WatcherUnRegister();
+            iExitReason = KDialogUserBack;
             
             if ( !iProcessing )
                 {
@@ -632,7 +636,13 @@
             
         case ECmManagerUiCmdCmUserExit:
             {
-            iExitReason = KDialogUserExit;
+            if (!iProcessing)
+                {
+                *iSelected = 0;
+                iExitReason = KDialogUserExit;
+                TryExitL( iExitReason );
+                }
+            break;
             }
             
         case EAknSoftkeyBack:
@@ -640,6 +650,7 @@
             if (!iProcessing)
                 {
                 *iSelected = 0;
+                iExitReason = KDialogUserBack;
                 TryExitL( iExitReason );
                 }
             break;
@@ -840,6 +851,7 @@
                     iDestDlg->ShowDefaultConnectionNoteL( oldConn );
                     }
                 HandleListboxDataChangeL();
+                iListbox->HandleItemRemovalL();
                 }
                 break;
 
@@ -1979,6 +1991,7 @@
         if( !iCmManager->DestinationStillExistedL( iCmDestinationImpl ) )
             {
             iCmManager->WatcherUnRegister();
+            iExitReason = KDialogUserBack;
             TryExitL( iExitReason );
             return;
             }
--- a/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -619,7 +619,21 @@
 EXPORT_C TKeyResponse CmPluginBaseSettingsDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
                                        TEventCode aType )    
     {
-    return iListbox->OfferKeyEventL( aKeyEvent, aType );       
+    TKeyResponse retVal ( EKeyWasNotConsumed );
+    switch( aKeyEvent.iCode )
+        {
+        // Add processing for case EKeyEscape to support status pane event in IAP-related editing 
+        // views (Dlg view, AdvDlg view and IPv4 and IPv6 views and so on)
+        case EKeyEscape:
+            TryExitL( iExitReason );
+            retVal = EKeyWasConsumed;
+            break;
+        default:
+            retVal = iListbox->OfferKeyEventL( aKeyEvent, aType ); 
+            break;
+        }
+        
+    return retVal;
     }
 
 //---------------------------------------------------------------------------
--- a/cmmanager/cmmgr/Framework/Src/cmwizard.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/cmmanager/cmmgr/Framework/Src/cmwizard.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -233,10 +233,6 @@
 
                 HBufC* destName = targetDest->NameLC();
     
-                TCmCommonUi::ShowNoteL( R_CMWIZARD_NEW_METHOD_ADDED,
-                                        *destName,
-                                        TCmCommonUi::ECmOkNote );
-    
                 CleanupStack::PopAndDestroy( destName );
     
                 // Here's a tricky one: if 'aTargetDestination' was NULL, then
--- a/cmmanager/cmmgr/Framework/Src/destdlg.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/cmmanager/cmmgr/Framework/Src/destdlg.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -120,10 +120,14 @@
         }
     if ( iTitlePane )
         {
-        // set old text back, if we have it...
+        // set old text back, if we have it and if we are going back to
+        // Connectivity Settings view
         if ( iOldTitleText )
             {
-            TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
+            if ( iExitReason == KDialogUserBack )
+                {
+                TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
+                }
             delete iOldTitleText;
             }
         }
@@ -365,9 +369,13 @@
             {
             CLOG_WRITE( "CDestDlg::ProcessCommandL command: exit");
             iExitReason = KDialogUserExit;
+            iCmManagerImpl->WatcherUnRegister();
+            TryExitL( iExitReason );
+            break;            
             }
         case EAknSoftkeyBack:
             {
+            iExitReason = KDialogUserBack;
             iCmManagerImpl->WatcherUnRegister();
             TryExitL( iExitReason );
             break;
@@ -403,8 +411,7 @@
                 }
             if ( iConnSettingsImpl->RunDefaultConnecitonRBPageL( selection ) )
                 {
-                defConnValue = selection.ConvertToDefConn();
-                ShowDefaultSetNoteL( defConnValue );
+                defConnValue = selection.ConvertToDefConn();                
                 
                 iCmManagerImpl->WriteDefConnL( defConnValue );
                 HandleListboxDataChangeL();
@@ -611,6 +618,7 @@
             if (!iProcessing)
                 {
                 *iExiting = EFalse;
+                iExitReason = KDialogUserBack;
                 retval = ETrue;                
                 }
             break;
@@ -1077,11 +1085,7 @@
                         }                    
 
                     iListbox->HandleItemAdditionL();
-
-                    TCmCommonUi::ShowNoteL( R_CMWIZARD_NEW_DEST_ADDED,
-                                            destName,
-                                            TCmCommonUi::ECmOkNote );
-                    
+               
                     // Sets the mittle soft key text to "Open"                        
                     SetMskL( R_QTN_MSK_OPEN );
                                             
--- a/cmmanager/cmmgr/Framework/SrcData/cmmanager.rss	Wed Mar 31 22:15:10 2010 +0300
+++ b/cmmanager/cmmgr/Framework/SrcData/cmmanager.rss	Wed Apr 14 16:22:04 2010 +0300
@@ -272,12 +272,6 @@
 RESOURCE TBUF r_cmwizard_select_destination_description
     { buf = qtn_netw_conset_detail_add_to_destination; }
 
-RESOURCE TBUF r_cmwizard_new_method_added
-    { buf = qtn_netw_conset_conf_new_method_added; }
-
-RESOURCE TBUF r_cmwizard_new_dest_added
-    { buf = qtn_netw_conset_conf_new_dest_added; }
-
 RESOURCE TBUF r_cmwizard_no_destination
     { buf = qtn_netw_conset_info_no_destinations; }
     
--- a/cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h	Wed Apr 14 16:22:04 2010 +0300
@@ -1,4 +1,4 @@
 #ifndef __OSTTRACEDEFINITIONS_H__
 #define __OSTTRACEDEFINITIONS_H__
-#include <opensystemtrace.h>
+#include <OpenSystemTrace.h>
 #endif
--- a/connectionmonitoring/connmon/connectionmonitor/inc/CWlanSupport.h	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/inc/CWlanSupport.h	Wed Apr 14 16:22:04 2010 +0300
@@ -376,6 +376,14 @@
      * Second phase construction.
      */
     void ConstructL();
+    
+    /*
+     * Converts WLAN's security modes into ConnMon's.
+     * @since 5.2
+     * @param scanInfo Wlan scan info
+     * @return Connection monitor's security mode (TConnMonSecurityMode).
+     */
+    TUint ConvertWlan2ConnMonExtSecMode(CWlanScanInfo* scanInfo);
 
 private: // Data
     // Pointer to server module
--- a/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -191,7 +191,7 @@
 
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::GetSignalStrength
+// CWlanSupport::GetSignalStrengthL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::GetSignalStrengthL(
@@ -416,7 +416,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::AppendAvailableIapsBySsid
+// CWlanSupport::AppendAvailableIapsBySsidL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::AppendAvailableIapsBySsidL( RArray<TUint>& aIdArray )
@@ -774,27 +774,7 @@
             LOGIT1("CWlanSupport::GetWLANNetworksL: signalStrength %d", signalStrength)
 
             // SecurityMode
-            TUint8 ieLength( 0 );
-            const TUint8* wpaData;
-
-            TUint securityMode( EConnMonSecurityOpen );
-            if ( scanInfo->Capability() & KWlan802Dot11CapabilityPrivacyMask )
-                {
-                if ( ( scanInfo->InformationElement(
-                        KWlan802Dot11RsnIE,
-                        ieLength,
-                        &wpaData ) == KErrNone ) ||
-                     ( scanInfo->WpaIE(
-                        ieLength,
-                        &wpaData ) == KErrNone ) )
-                    {
-                    securityMode = EConnMonSecurityWpa; // WPA
-                    }
-                else
-                    {
-                    securityMode = EConnMonSecurityWep; // WEP
-                    }
-                }
+            TUint securityMode = ConvertWlan2ConnMonExtSecMode(scanInfo);
             LOGIT1("CWlanSupport::GetWLANNetworksL: securityMode %d", securityMode)
 
             // SSID == name
@@ -867,7 +847,7 @@
 
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::ParseWlanNetworks
+// CWlanSupport::ParseWlanNetworksL
 // -----------------------------------------------------------------------------
 //
 void CWlanSupport::ParseWlanNetworksL(
@@ -900,28 +880,8 @@
         TUint signalStrength( aScanInfo->RXLevel() );
 
         // SecurityMode
-        TUint8 ieLength( 0 );
-        const TUint8* wpaData;
-
-        TUint securityMode( EConnMonSecurityOpen );
-        if ( aScanInfo->Capability() & KWlan802Dot11CapabilityPrivacyMask )
-            {
-            if ( ( aScanInfo->InformationElement(
-                    KWlan802Dot11RsnIE,
-                    ieLength,
-                    &wpaData ) == KErrNone ) ||
-                 ( aScanInfo->WpaIE(
-                    ieLength,
-                    &wpaData ) == KErrNone ) )
-                {
-                securityMode = EConnMonSecurityWpa; // WPA
-                }
-            else
-                {
-                securityMode = EConnMonSecurityWep; // WEP
-                }
-            }
-
+        TUint securityMode = ConvertWlan2ConnMonExtSecMode(aScanInfo);
+                
         // SSID == name
         TBuf8<CConnMonWlanNetwork::KMaxNameLength> name8;
         TUint8 ieLen( 0 );
@@ -970,7 +930,7 @@
 
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::GetCurrentWlanNetwork
+// CWlanSupport::GetCurrentWlanNetworkL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::GetCurrentWlanNetworkL(
@@ -1045,7 +1005,7 @@
 
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::ParseWlanNetworks
+// CWlanSupport::ParseWlanProbeRawBuffersL
 // -----------------------------------------------------------------------------
 //
 void CWlanSupport::ParseWlanProbeRawBuffersL(
@@ -1200,7 +1160,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::SetIntAttribute
+// CWlanSupport::SetIntAttributeL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::SetIntAttributeL(
@@ -1232,7 +1192,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::SetUintAttribute
+// CWlanSupport::SetUintAttributeL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::SetUintAttributeL(
@@ -1264,7 +1224,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::GetIntAttribute
+// CWlanSupport::GetIntAttributeL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::GetIntAttributeL( const RMessage2& aMessage, TInt& aValue )
@@ -1293,7 +1253,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::GetUintAttribute
+// CWlanSupport::GetUintAttributeL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::GetUintAttributeL( const RMessage2& aMessage, TUint& aValue )
@@ -1322,7 +1282,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::SetStringAttribute
+// CWlanSupport::SetStringAttributeL
 //
 // Currently assumes the descriptor attribute 'aValue' length has been checked
 // earlier and is short enough.
@@ -1358,7 +1318,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::GetStringAttribute
+// CWlanSupport::GetStringAttributeL
 // -----------------------------------------------------------------------------
 //
 TInt CWlanSupport::GetStringAttributeL(
@@ -1471,6 +1431,51 @@
     return value;
     }
 
+// -----------------------------------------------------------------------------
+// CWlanSupport::ConvertWlan2ConnMonExtSecMode
+// -----------------------------------------------------------------------------
+//
+TUint CWlanSupport::ConvertWlan2ConnMonExtSecMode(CWlanScanInfo* scanInfo)
+    {
+    LOGENTRFN("CWlanSupport::ConvertWlan2ConnMonExtSecMode()")
+
+    TUint securityMode(EConnMonSecurityOpen);
+    switch (scanInfo->ExtendedSecurityMode())
+        {
+        case EWlanConnectionExtentedSecurityModeOpen:
+            securityMode = EConnMonSecurityOpen;
+            break;
+            
+        case EWlanConnectionExtentedSecurityModeWepOpen:
+        case EWlanConnectionExtentedSecurityModeWepShared:
+            securityMode = EConnMonSecurityWep;
+            break;
+            
+        case EWlanConnectionExtentedSecurityMode802d1x:
+            securityMode = EConnMonSecurity802d1x;
+            break;
+            
+        case EWlanConnectionExtentedSecurityModeWpa:
+        case EWlanConnectionExtentedSecurityModeWpa2:
+            securityMode = EConnMonSecurityWpa;
+            break;
+            
+        case EWlanConnectionExtentedSecurityModeWpaPsk:
+        case EWlanConnectionExtentedSecurityModeWpa2Psk:
+            securityMode = EConnMonSecurityWpaPsk;
+            break;
+            
+        case EWlanConnectionExtentedSecurityModeWapi:
+        case EWlanConnectionExtentedSecurityModeWapiPsk:
+        default:
+            securityMode = EConnMonSecurityOpen;
+            break;
+        }
+
+    LOGEXITFN1("CWlanSupport::ConvertWlan2ConnMonExtSecMode()", securityMode)
+    return securityMode;
+    }
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -1788,7 +1793,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSession::GetScanResults
+// CWlanSession::GetScanResultsL
 // -----------------------------------------------------------------------------
 //
 void CWlanSession::GetScanResultsL( const RMessage2& aMessage )
@@ -2002,7 +2007,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSession::CompleteActiveRequests
+// CWlanSession::CompleteActiveRequestsL
 // -----------------------------------------------------------------------------
 //
 void CWlanSession::CompleteActiveRequestsL(
@@ -2176,7 +2181,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSession::CompleteGetNetworkNamesRequest
+// CWlanSession::CompleteGetNetworkNamesRequestL
 // Completes the asynchronous client request: GetPckgAttribute( KNetworkNames )
 // -----------------------------------------------------------------------------
 //
@@ -2207,7 +2212,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSession::CompleteGetWlanNetworksRequest
+// CWlanSession::CompleteGetWlanNetworksRequestL
 // Completes the asynchronous client request: GetPckgAttribute( KWlanNetworks )
 // -----------------------------------------------------------------------------
 //
@@ -2259,7 +2264,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSession::CompleteGetWlanSsidNetworksRequest
+// CWlanSession::CompleteGetWlanSsidNetworksRequestL
 // Completes the asynchronous client request: GetPckgAttribute( KWlanSsidNetworks )
 // -----------------------------------------------------------------------------
 //
@@ -2311,7 +2316,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSession::CompleteGetWlanProbeRawBuffersRequest
+// CWlanSession::CompleteGetWlanProbeRawBuffersRequestL
 // Completes the asynchronous client request: GetPckgAttribute( KWlanProbeRawBuffers )
 // -----------------------------------------------------------------------------
 //
--- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonWLANNetwork.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonWLANNetwork.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -123,8 +123,10 @@
         {
         buf.Append( aPtrC[len+EBufBase+i] );
         }
-
-    return TConnMonWLANNetwork( name, connectionMode, signalStrength, securityMode, buf );
+    TConnMonWLANNetwork connMonWLANNetwork = TConnMonWLANNetwork( name, 
+            connectionMode, signalStrength, securityMode, buf );
+    buf.Close();
+    return connMonWLANNetwork;
     }
 
 // End-of-file
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -58,6 +58,7 @@
     STATIC_CAST( CEikServAppUi*, 
                  CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
     delete iExpiryTimer;
+    iChoiceIds.Close();
     }
 
 // ---------------------------------------------------------
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc	Wed Apr 14 16:22:04 2010 +0300
@@ -94,7 +94,7 @@
 //w:
 //r:3.0
 //
-#define qtn_offline_activate_wlan               "Do you want to create a WLAN connection in Off-line mode?"
+#define qtn_offline_activate_wlan               "Allow WLAN connections during this offline session?"
 
 //d: Wait note text during collection of access points
 //l: popup_note_wait_window
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/data/DisconnectDlg.rss	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/data/DisconnectDlg.rss	Wed Apr 14 16:22:04 2010 +0300
@@ -39,21 +39,6 @@
     {
     }
 
-RESOURCE TBUF r_qtn_netw_conf_conn_disconnected 
-    { 
-    buf = qtn_netw_conf_conn_disconnected; 
-    }
-
-RESOURCE TBUF r_qtn_netw_conf_modem_conn_disconnected 
-    { 
-    buf = qtn_netw_conf_modem_conn_disconnected; 
-    }
-
-RESOURCE TBUF r_qtn_cmon_info_conn_already_end 
-    { 
-    buf = qtn_cmon_info_conn_already_end; 
-    }
-
 RESOURCE TBUF r_qtn_netw_info_disconnect_failed 
     { 
     buf = qtn_netw_info_disconnect_failed; 
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -358,18 +358,6 @@
     // the connection is succesfully closed
     CConnectionInfo* info = iConnArray->At( iClosingConnectionIndex );
 
-    TPtrC iap = info->GetIapNameL();
-    TInt bearerType = info->GetBearerType();
-
-    if( bearerType < EBearerExternalCSD )
-        {
-        InfoNoteL( R_QTN_NETW_CONF_CONN_DISCONNECTED, &iap );
-        }
-    else
-        {
-        InfoNoteL( R_QTN_NETW_CONF_MODEM_CONN_DISCONNECTED );
-        }
-
     CLOG_LEAVEFN("CConnectionModel::SelectedConnectionClosedL");    
     }
 
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgDialog.cpp	Wed Mar 31 22:15:10 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgDialog.cpp	Wed Apr 14 16:22:04 2010 +0300
@@ -222,19 +222,17 @@
         TInt result = iConnModel->EndConnection( toBeClosedItem );
         iDisconnectDialogUi->iDialogRun = EFalse;
         if ( result )
-            {
-            TInt resId = R_QTN_CMON_INFO_CONN_ALREADY_END;
+            {            
             if( KNullUnit == result )
                 {
                 result = KErrNone;
                 }
             else
-                {
-                resId = R_QTN_NETW_INFO_DISCONNECT_FAILED;
+                {               
+                iConnModel->InfoNoteL( R_QTN_NETW_INFO_DISCONNECT_FAILED );
                 result = KErrGeneral;
                 }
-
-            iConnModel->InfoNoteL( resId );
+            
             iDisconnectDialogUi->CompleteL( result );
             }
         }