Revision: 201019 RCL_3 PDK_3.0.0
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:31:20 +0300
branchRCL_3
changeset 15 43658d24f35d
parent 14 be41ab7b952f
child 16 df4dfb214df5
Revision: 201019 Kit: 2010121
commsconfig/cscsipvoipcleanupplugin/src/cscsvcpluginrcsehandler.cpp
convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifconnectionhandler.cpp
convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp
convergedconnectionhandler/cchclientapi/src/cchimpl.cpp
convergedconnectionhandler/cchserver/inc/cchservicehandler.h
convergedconnectionhandler/cchserver/src/cchservicehandler.cpp
richcallsettingsengine/rcse2/src/crcseprofileregistry.cpp
richcallsettingsengine/rcse2/src/rcsedbimporter.cpp
richcallsettingsengine/rcse2/src/rcseregistrybase.cpp
voipplugins/ipapputils/src/csipclientresolverutils.cpp
voipplugins/sipconnectionprovider/inc/scpservicehandlerbase.h
voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxengine.h
voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxobserver.h
voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxengine.cpp
voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxeventmonitor.cpp
voipplugins/sipconnectionprovider/src/scpservicehandlerbase.cpp
voipplugins/sipconnectionprovider/src/scpservicemanager.cpp
voipplugins/sipconnectionprovider/src/scpsettinghandler.cpp
voipplugins/sipconnectionprovider/src/scpvmbxhandler.cpp
voipplugins/voipadapters/cpvoipadapter/src/CWPVoIPAdapter.cpp
--- a/commsconfig/cscsipvoipcleanupplugin/src/cscsvcpluginrcsehandler.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/commsconfig/cscsipvoipcleanupplugin/src/cscsvcpluginrcsehandler.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 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"
@@ -89,6 +89,8 @@
     {
     CSCSVCPLUGINDEBUG( "CCSCSvcPluginRcseHandler::GetProfileIdsL - begin");
     
+    CleanupClosePushL( aSipProfileIds );
+    
     RPointerArray<CRCSEProfileEntry> entries;
     TCleanupItem clItem( ResetAndDestroy, &entries );
     CleanupStack::PushL( clItem );
@@ -113,6 +115,7 @@
         }
         
     CleanupStack::PopAndDestroy(); // clItem    
+    CleanupStack::Pop();
     
     CSCSVCPLUGINDEBUG( "CCSCSvcPluginRcseHandler::GetProfileIdsL - end");
     }
--- a/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifconnectionhandler.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifconnectionhandler.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 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"
@@ -210,6 +210,8 @@
     CCHUIDEBUG( 
         "CCchUiNotifConnectionHandler::GetAccessPointsFromSnapL - IN" );
 
+    CleanupClosePushL(aIapIds);
+    
     RCmDestinationExt destination = 
                 iCmManagerExt.DestinationL( aDestinationId );
     CleanupClosePushL( destination );
@@ -226,6 +228,7 @@
         }
 
     CleanupStack::PopAndDestroy( &destination );
+    CleanupStack::Pop();
     
     CCHUIDEBUG( 
         "CCchUiNotifConnectionHandler::GetAccessPointsFromSnapL - OUT" );
--- a/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp	Tue May 25 12:31:20 2010 +0300
@@ -808,7 +808,7 @@
 	{
 	CCHUIDEBUG( 
 	    "CCCHUiNotifierImpl::FillNoConnectionsAvailableListboxL - IN" );	
-
+	
 	HBufC* connectWhenAv = StringLoader::LoadLC( 
         R_QTN_CCHUINOTIF_CONNECT_WHEN_AV_TEXT );
 	HBufC* searchWlan = StringLoader::LoadLC( 
@@ -821,7 +821,7 @@
 	TBool sipVoip( EFalse );
 	TRAPD( err, sipVoip = IsSIPVoIPL( aServiceId ) );
 	
-	if ( !err && sipVoip )
+	if ( !err && sipVoip && IsVoIPOverWCDMAAllowedL() )
 	    {
 	    aListItems.AppendL( *connectWhenAv );
 	    aCommandArray.AppendL( ECchUiCommandConnectWhenAvailable );
@@ -839,7 +839,7 @@
 
     CleanupStack::PopAndDestroy( useGprs );	
     CleanupStack::PopAndDestroy( searchWlan );	
-    CleanupStack::PopAndDestroy( connectWhenAv );	
+    CleanupStack::PopAndDestroy( connectWhenAv );
     
     CCHUIDEBUG( 
         "CCCHUiNotifierImpl::FillNoConnectionsAvailableListboxL - OUT" ); 
@@ -855,6 +855,8 @@
 	CCHUIDEBUG( 
 	    "CCCHUiNotifierImpl::FillNoConnectionsDefinedListboxL - IN" );	
 
+    CleanupClosePushL( aCommandArray );
+	
 	HBufC* searchWlan = StringLoader::LoadLC( 
 		R_QTN_CCHUINOTIF_SEARCH_WLAN_NOT_DEF_TEXT );
 	
@@ -873,6 +875,7 @@
 
     CleanupStack::PopAndDestroy( useGprs );	
     CleanupStack::PopAndDestroy( searchWlan );	
+    CleanupStack::Pop();
     
     CCHUIDEBUG( 
         "CCCHUiNotifierImpl::FillNoConnectionsDefinedListboxL - OUT" );  	    
@@ -886,6 +889,8 @@
 	CDesCArray& aListItems, RArray<TCchUiOperationCommand>& aCommandArray )
 	{
 	CCHUIDEBUG( "CCCHUiNotifierImpl::FillNoConnectionsFoundListboxL - IN" );	
+	
+	CleanupClosePushL( aCommandArray );
 
 	HBufC* searchWlan = StringLoader::LoadLC( 
 		R_QTN_CCHUINOTIF_SEARCH_WLAN_NOT_FOUND_TEXT );	
@@ -905,6 +910,7 @@
 
     CleanupStack::PopAndDestroy( useGprs );	
     CleanupStack::PopAndDestroy( searchWlan );	
+    CleanupStack::Pop( &aCommandArray );
     
     CCHUIDEBUG( "CCCHUiNotifierImpl::FillNoConnectionsFoundListboxL - OUT" );  
 	}	
@@ -918,7 +924,7 @@
     {
     CCHUIDEBUG( 
         "CCCHUiNotifierImpl::FillChangeCurrentConnectionListboxL - IN" ); 
-
+    
     HBufC* searchWlan = StringLoader::LoadLC( 
         R_QTN_CCHUINOTIF_SEARCH_WLAN_CHANGE_CURRENT_CONNECTION_TEXT );  
         
@@ -936,7 +942,7 @@
         }
 
     CleanupStack::PopAndDestroy( useGprs ); 
-    CleanupStack::PopAndDestroy( searchWlan );  
+    CleanupStack::PopAndDestroy( searchWlan );
     
     CCHUIDEBUG( 
             "CCCHUiNotifierImpl::FillChangeCurrentConnectionListboxL - OUT" );
@@ -951,7 +957,7 @@
     CDesCArray& aListItems, RArray<TCchUiOperationCommand>& aCommandArray )
     {
     CCHUIDEBUG( "CCCHUiNotifierImpl::FillChangeConnectionListboxL - IN" ); 
-
+    
     HBufC* searchWlan = StringLoader::LoadLC( 
         R_QTN_CCHUINOTIF_SEARCH_WLAN_CHANGE_CONNECTION_TEXT );  
            
@@ -969,7 +975,7 @@
         }
 
     CleanupStack::PopAndDestroy( useGprs ); 
-    CleanupStack::PopAndDestroy( searchWlan );  
+    CleanupStack::PopAndDestroy( searchWlan );
        
     CCHUIDEBUG( "CCCHUiNotifierImpl::FillChangeConnectionListboxL - OUT" );
     }
--- a/convergedconnectionhandler/cchclientapi/src/cchimpl.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/src/cchimpl.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -294,51 +294,48 @@
 void CCchImpl::GetServicesL( TCCHSubserviceType aType, 
         RPointerArray<CCchService>& aServices )
     {
+    CCHLOGSTRING( "CCchImpl::GetServicesL: IN" );
+
+    CleanupClosePushL( aServices );  // CS: 1
+    
     TInt error = KErrNone;
     TServiceSelection selection( 0, aType, ECchInitial );
-    CCHLOGSTRING( "CCchImpl::GetServices: IN" );
+
     CCchServiceImpl* cchServiceImpl = NULL;
     CArrayFixFlat<TCCHService>* cchServices;
     cchServices = new (ELeave) CArrayFixFlat<TCCHService>(1);
-    CleanupStack::PushL( cchServices );
+    CleanupStack::PushL( cchServices );  // CS: 2
     error = GetCchServicesL( 0, aType, *cchServices );
+    
     if( KErrNone == error )
         {
         for ( TInt i = 0; i < cchServices->Count(); i++ )
             {
             TCCHService service = cchServices->At( i );
             TInt idx = FindService( service.iServiceId );
-            if( idx == KErrNotFound )
+            
+            if( KErrNotFound == idx )
                 {
-                cchServiceImpl = CCchServiceImpl::NewL( *this, service.iServiceId, 
-                    *iCchUi );
-                error = iCchServiceImpls.Append( cchServiceImpl );
-                if( error == KErrNone )
-                    {
-                    cchServiceImpl = iCchServiceImpls[ iCchServiceImpls.Count() - 1 ];
-                    }
-                else
-                    {
-                    delete cchServiceImpl;
-                    cchServiceImpl = NULL;
-                    }
+                cchServiceImpl = CCchServiceImpl::NewLC( *this, // CS: 3
+                    service.iServiceId, *iCchUi );
+                iCchServiceImpls.AppendL( cchServiceImpl );
+                CleanupStack::Pop( cchServiceImpl );  // CS: 2
                 }
             else
                 {
                 cchServiceImpl = iCchServiceImpls[ idx ];
                 }
-            error = aServices.Append( cchServiceImpl );
-            if( error )
-                {
-                delete cchServiceImpl;
-                cchServiceImpl = NULL;
-                }
+            
+            aServices.AppendL( cchServiceImpl );
             }
         }
+    
     cchServices->Reset();
-    CleanupStack::PopAndDestroy( cchServices );
-    CCHLOGSTRING( "CCchImpl::GetServices: OUT" );
+    CleanupStack::PopAndDestroy( cchServices );  // CS: 1
     User::LeaveIfError( error );
+    CleanupStack::Pop( &aServices );  // CS: 0
+    
+    CCHLOGSTRING( "CCchImpl::GetServicesL: OUT" );
     }
 
 // ---------------------------------------------------------------------------
--- a/convergedconnectionhandler/cchserver/inc/cchservicehandler.h	Tue May 11 16:04:22 2010 +0300
+++ b/convergedconnectionhandler/cchserver/inc/cchservicehandler.h	Tue May 25 12:31:20 2010 +0300
@@ -189,7 +189,7 @@
      * @since S60 3.2
      * @param aMessage IPC message
      */
-    void GetServicesL( RMessage2 aMessage ) const;
+    void GetServicesL( RMessage2 aMessage );
 
     /** 
      * Get state of service or subservice of a certain service
--- a/convergedconnectionhandler/cchserver/src/cchservicehandler.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchservicehandler.cpp	Tue May 25 12:31:20 2010 +0300
@@ -353,15 +353,49 @@
             iCchUIHandler->UpdateUI( );
             }
         
-        // Check for possible first usage of GPRS (roaming cost warning)
-        TServiceConnectionInfo serviceConnInfo( aServiceId, aType, 0, 0 );
-        GetConnectionInfo( serviceConnInfo );
-        
-        if ( serviceConnInfo.iIapId && ECCHEnabled == aState )
+        if ( ECCHEnabled == aState && !iCchUIHandler->IsCostWarningSeen() )
             {
-            if( !iCommDbWatcher->IsWlanApL( serviceConnInfo.iIapId ) )
-                {                
-                iCchUIHandler->CheckGprsFirstUsageL();
+            // Check for possible first usage of GPRS (roaming cost warning)
+            TServiceConnectionInfo serviceConnInfo( aServiceId, aType, 0, 0 );
+            GetConnectionInfo( serviceConnInfo );
+            
+            if ( serviceConnInfo.iIapId )
+                {
+                // Stop monitoring connectivity changes and take new connections
+                RArray<TUint> iaps;
+                CleanupClosePushL( iaps );
+                TBool gprs( EFalse );
+                iServer.ConnMonHandler().StopMonitoringConnectionChanges( iaps );
+                
+                // Are we connected via VPN
+                if ( iCommDbWatcher->IsVpnApL( serviceConnInfo.iIapId ) )
+                    {
+                    // Remove iaps whom are not linked to vpn(snap or iap)
+                    TRAP_IGNORE( iCommDbWatcher->RemoveOtherThanVpnIapsL( 
+                        iaps, serviceConnInfo.iIapId ) );
+                                
+                    for ( TInt i( 0 ); i < iaps.Count(); i++ )
+                        {
+                        CCHLOGSTRING2( "CCCHServiceHandler::StateChanged: new connections: %d",iaps[ i ] );
+                        
+                        // if any new connection is gprs connection show note if not showed already
+                        if( !iCommDbWatcher->IsVpnApL( iaps[ i ] ) && !iCommDbWatcher->IsWlanApL( iaps[ i ] ) )
+                            {
+                            gprs = ETrue;
+                            break;
+                            }
+                        }
+                    }
+                else if( !iCommDbWatcher->IsWlanApL( serviceConnInfo.iIapId ) )
+                    {      
+                    gprs = ETrue;
+                    }
+                CleanupStack::PopAndDestroy( &iaps );
+                
+                if ( gprs )
+                    {
+                    iCchUIHandler->CheckGprsFirstUsageL();
+                    }
                 }
             }
         
@@ -832,6 +866,9 @@
             {
             if( connectionOk )
                 {
+                // Start monitoring connectivity changes
+                iServer.ConnMonHandler().StartMonitoringConnectionChanges();
+                
                 if( iCancelNotify )
                     {
                     DisableNotifyChange();
@@ -878,7 +915,13 @@
                     CCHLOGSTRING( "CCCHServiceHandler::EnableService: Launching WLAN scan..." );
                     TRAP_IGNORE( iWlanExtension->EnableWlanScanL() );
                     }
-                // There could be new Plug-ins after EnableL, so we must set
+                if ( error )
+                    {
+                    RArray<TUint> iaps;
+                    iServer.ConnMonHandler().StopMonitoringConnectionChanges( iaps );
+                    iaps.Close();
+                    }
+                // There could be new Plug-ins after EnableL, so we must set 
                 // notifier to loaded Plug-ins
                 iServer.PluginHandler().SetServiceNotifier( this );
                 }
@@ -1143,7 +1186,7 @@
     TInt error = GetConnectionInfo( serviceConnInfo );
     User::LeaveIfError( error );
     
-    CCHLOGSTRING3( "CCCHServiceHandler::IsConnectionDefined: snap:%d, snap:%d",
+    CCHLOGSTRING3( "CCCHServiceHandler::IsConnectionDefined: snap:%d, iap:%d",
             serviceConnInfo.iSNAPId, serviceConnInfo.iIapId );
     if( 0 != serviceConnInfo.iSNAPId )
         {
@@ -1280,13 +1323,21 @@
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------
 //
-void CCCHServiceHandler::GetServicesL( RMessage2 aMessage ) const
+void CCCHServiceHandler::GetServicesL( RMessage2 aMessage )
     {
     CCHLOGSTRING( "CCCHServiceHandler::GetServicesL: IN" );
+    // outstanding request for service, but SpSettings notify timer still running
+    if( iHandleNotifyDelayTimer->IsActive() )
+        {
+        CCHLOGSTRING( "CCCHServiceHandler::GetServicesL - Forced handling of notify" );
+        iHandleNotifyDelayTimer->Cancel();
+        HandleDelayedNotifyEvent();
+        }
     TInt count =  iServices.Count();
     TInt index( KErrNotFound );
     if ( count )
         {
+        CCHLOGSTRING2( "CCCHServiceHandler::GetServicesL service count:%d ", count );
         TUint32 serviceId = aMessage.Int0();
         TCCHSubserviceType type ( ECCHUnknown );
         type = static_cast<TCCHSubserviceType>( aMessage.Int1() );
@@ -1299,7 +1350,8 @@
             {
             count = 1;
             }
-                    
+        
+        
         CArrayFixFlat<TCCHService>* serviceArray = 
             new( ELeave )CArrayFixFlat<TCCHService>( count );
         CleanupStack::PushL( serviceArray );
@@ -1308,6 +1360,7 @@
         // Get all services
         if ( KErrNone == serviceId )
             {
+            CCHLOGSTRING( "CCCHServiceHandler::GetServicesL KErrNone == serviceId" );
             if ( type == ECCHUnknown )
                 {
                 for ( TInt i( 0 ); i < count; i++ )
@@ -1334,6 +1387,8 @@
             if ( type == ECCHUnknown )
                 {
                 index = FindService( serviceId );
+                CCHLOGSTRING2( "CCCHServiceHandler::GetServicesL index:%d", index );
+
                 if ( KErrNotFound != index )
                     {
                     iServices[ index ]->FillServiceInfo( service );
@@ -1342,6 +1397,7 @@
                 }
             else
                 {
+            CCHLOGSTRING( "CCCHServiceHandler::GetServicesL Else" );
                 TServiceSelection selection( serviceId, type ); 
                 index = ServiceExist( selection );
                 if ( KErrNotFound != index )
--- a/richcallsettingsengine/rcse2/src/crcseprofileregistry.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/richcallsettingsengine/rcse2/src/crcseprofileregistry.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 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"
@@ -30,6 +30,8 @@
 #include <cenrepdatabaseutil.h>
 #include <cenrepdatabaseproperty.h>
 
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
 #include "crcseprofileregistry.h"
 #include "crcseprofileentry.h"
 #include "crcseaudiocodecregistry.h"
@@ -351,6 +353,8 @@
     {
     RCSELOGSTRING( "CRCSEProfileRegistry::FindByServiceIdL() - IN" );
 
+    CleanupResetAndDestroyPushL( aFoundEntries );
+    
     BeginL();
 
     TBuf<KDesLength128> des;
@@ -393,6 +397,8 @@
         }
 
     EndL();
+    
+    CleanupStack::Pop( &aFoundEntries );
 
     RCSELOGSTRING( "CRCSEProfileRegistry::FindByServiceIdL() - OUT" );
     }
@@ -407,6 +413,8 @@
     RPointerArray<CRCSEProfileEntry>& aFoundEntries )
     {
     RCSELOGSTRING( "CRCSEProfileRegistry::FindBySIPProfileIdL() - IN" );
+    
+    CleanupResetAndDestroyPushL( aFoundEntries );
 
     BeginL();
 
@@ -474,6 +482,8 @@
 
     CleanupStack::PopAndDestroy( &voipIds );
     EndL();
+    
+    CleanupStack::Pop( &aFoundEntries );
 
     RCSELOGSTRING( "CRCSEProfileRegistry::FindBySIPProfileIdL() - OUT" );
     }
@@ -1148,6 +1158,8 @@
 void CRCSEProfileRegistry::ExtractProtocoIdsL( 
     const TDesC& aDes, RArray<TSettingIds>& aArray )
     {
+    CleanupClosePushL( aArray );
+    
     TLex lex( aDes );
     
     TSettingIds value;
@@ -1172,7 +1184,9 @@
             // Go over the space character.
             lex.Inc( 1 );
             }
-        } 
+        }
+    
+    CleanupStack::Pop( &aArray );
     }
 
 // -----------------------------------------------------------------------------
--- a/richcallsettingsengine/rcse2/src/rcsedbimporter.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/richcallsettingsengine/rcse2/src/rcsedbimporter.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 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"
@@ -828,6 +828,8 @@
     const TDesC& aNumbers,
     RArray<TSettingIds>& aArray )
     {
+    CleanupClosePushL( aArray );
+    
     TLex lex( aNumbers );
     
     TSettingIds value;
@@ -853,6 +855,8 @@
             lex.Inc( 1 );
             }
         } 
+    
+    CleanupStack::Pop( &aArray );
     }
 
 
@@ -865,6 +869,7 @@
     const TDesC& aNumbers,
     RArray<T>& aArray )
     {
+    CleanupClosePushL( aArray );
     TLex lex( aNumbers );
 
     // Reset original array
@@ -884,7 +889,9 @@
             // Go over the space character.
             lex.Inc( 1 );
             }
-        } 
+        }
+    
+    CleanupStack::Pop( &aArray );
     }
 
 
--- a/richcallsettingsengine/rcse2/src/rcseregistrybase.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/richcallsettingsengine/rcse2/src/rcseregistrybase.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 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"
@@ -349,6 +349,7 @@
 //
 void CRCSERegistryBase::FindAllIdsL( RArray<TUint32>& aIdArray )
     {
+    CleanupClosePushL( aIdArray );
     aIdArray.Reset();
 
     RArray<TInt> ids;
@@ -364,6 +365,7 @@
         }
 
     CleanupStack::PopAndDestroy( &ids );
+    CleanupStack::Pop( &aIdArray );
     }
 
 // -----------------------------------------------------------------------------
--- a/voipplugins/ipapputils/src/csipclientresolverutils.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/ipapputils/src/csipclientresolverutils.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 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"
--- a/voipplugins/sipconnectionprovider/inc/scpservicehandlerbase.h	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/inc/scpservicehandlerbase.h	Tue May 25 12:31:20 2010 +0300
@@ -84,6 +84,11 @@
      * @param aSubService Deregistered sub service
      */
     void DeregisterProfile();
+    
+    /**
+     * Instantly force disables sip profile
+     */
+    void PerformInstantForceSipProfileDisable();
 
     /**
      * Starts force disable timer
@@ -124,8 +129,10 @@
     /**
      * Handles sip profile forced disable timeout
      * Sends Deregistered event for the subservice
+     * @param aForceDisableSipProfile ETrue when wanted to really
+     *        force disable actual sip profile (not just generate event).
      */
-    void HandleSipProfileForcedDisable();
+    void HandleSipProfileForcedDisable( TBool aForceDisableSipProfile );
 
 protected:
 
--- a/voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxengine.h	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxengine.h	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 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"
@@ -58,7 +58,8 @@
         EEngineSmsError,
         EEngineSmsOom,
         EEngineNetworkLost,
-        EEngineNetworkError
+        EEngineNetworkError,
+        EEngineFatalNetworkError
         };
 
     /**
--- a/voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxobserver.h	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxobserver.h	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 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"
@@ -44,7 +44,8 @@
         ENoMemory,
         ESmsError,
         ENetworkError,
-        EIncorrectSettings
+        EIncorrectSettings,
+        EFatalNetworkError
         };
 
     /**
--- a/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxengine.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxengine.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 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"
@@ -553,6 +553,13 @@
             message = MIpVmbxObserver::ENetworkError;
             break;
             }
+        case CIpVmbxEngine::EEngineFatalNetworkError:
+            {
+            subscription->Cancel();
+            subscription->DeleteEvent();
+            message = MIpVmbxObserver::EFatalNetworkError;
+            break;
+            }
         default:
             IPVMEPRINT( "Unhandled message!" );
         }
@@ -613,9 +620,10 @@
     TDes8& aFrom8 ) const
     {
 #ifdef _DEBUG
-    TBuf<128> tmpStr;
-    tmpStr.Copy( aContent8 );
-    IPVMEPRINT2( "CIpVmbxEngine::ParseNotifyContentL - aContent8:%S", &tmpStr )
+    HBufC* print = HBufC::NewLC( aContent8.Length() );
+    print->Des().Copy( aContent8 );
+    IPVMEPRINT2( "CIpVmbxEngine::ParseNotifyContentL - aContent8:%S", &print->Des() )
+    CleanupStack::PopAndDestroy( print );
 #endif // _DEBUG
     aCreateSms = EFalse;
 
--- a/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxeventmonitor.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxeventmonitor.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 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"
@@ -211,6 +211,9 @@
             case KErrTimedOut:
                 message = CIpVmbxEngine::EEngineSubscribeRejected;
                 break;
+            case KErrSIPResolvingFailure:
+                message = CIpVmbxEngine::EEngineFatalNetworkError;
+                break;              
             default:
                 message = CIpVmbxEngine::EEngineNetworkError;
             }
--- a/voipplugins/sipconnectionprovider/src/scpservicehandlerbase.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/src/scpservicehandlerbase.cpp	Tue May 25 12:31:20 2010 +0300
@@ -160,6 +160,18 @@
     }
 
 // -----------------------------------------------------------------------------
+// CScpServiceHandlerBase::PerformInstantForceSipProfileDisable
+// -----------------------------------------------------------------------------
+//
+void CScpServiceHandlerBase::PerformInstantForceSipProfileDisable()
+    {
+    SCPLOGSTRING2( 
+        "CScpServiceHandlerBase[0x%x]::PerformInstantForceSipProfileDisable", 
+        this );
+    HandleSipProfileForcedDisable( ETrue );
+    }
+
+// -----------------------------------------------------------------------------
 // CScpServiceHandlerBase::StartForcedDisableTimer
 // -----------------------------------------------------------------------------
 //
@@ -195,11 +207,25 @@
 // CScpServiceHandlerBase::HandleSipProfileForcedDisable
 // -----------------------------------------------------------------------------
 //
-void CScpServiceHandlerBase::HandleSipProfileForcedDisable()
+void CScpServiceHandlerBase::HandleSipProfileForcedDisable( 
+    TBool aForceDisableSipProfile )
     {
     SCPLOGSTRING2( 
         "CScpServiceHandlerBase[0x%x]::HandleSipProfileForcedDisable", this );
 
+    if ( aForceDisableSipProfile )
+        {
+        CScpProfileHandler& profileHandler = iSubService.ProfileHandler();
+    
+        CScpSipConnection* sipConnection = 
+            profileHandler.GetSipConnection( iSubService.SipProfileId() );
+      
+        if ( sipConnection )
+            {
+            sipConnection->ForceDisable();
+            }
+        }
+    
     HandleSipConnectionEvent( iSubService.SipProfileId(), EScpDeregistered );
     }
 
@@ -214,7 +240,7 @@
     CScpServiceHandlerBase* self = static_cast<CScpServiceHandlerBase*>( aSelf );
     
     self->CancelDisableTimer();
-    self->HandleSipProfileForcedDisable();
+    self->HandleSipProfileForcedDisable( EFalse );
 
     return 1;
     }
--- a/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1049,7 +1049,9 @@
         CleanupClosePushL( cmm );
         RCmDestination destination( cmm.DestinationL( snapId ) );
         CleanupClosePushL( destination );
-
+        
+        TBool wlanIapFound( EFalse );
+        
         for ( TInt i = 0; i < destination.ConnectionMethodCount(); i++ )
             {
             RCmConnectionMethod cm = destination.ConnectionMethodL( i );
@@ -1060,6 +1062,7 @@
                 {
                 SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN IAP found" );
                 iaps.Append( cm.GetIntAttributeL( CMManager::ECmIapId ) );
+                wlanIapFound = ETrue;
                 }
             else
                 {
@@ -1091,7 +1094,12 @@
             CleanupStack::PopAndDestroy( sipConnection );
             }
         
-        if ( !available )
+        if ( !available && wlanIapFound )
+            {
+            User::Leave( KCCHErrorNetworkLost );
+            }
+        
+        else if( !wlanIapFound )
             {
             User::Leave( KCCHErrorAccessPointNotDefined );
             }
--- a/voipplugins/sipconnectionprovider/src/scpsettinghandler.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/src/scpsettinghandler.cpp	Tue May 25 12:31:20 2010 +0300
@@ -887,6 +887,8 @@
                                          RArray< TUint32 >& aServiceIds ) const
     {
     SCPLOGSTRING2( "CScpSettingHandler::GetServiceIdsL sip id: %d", aSipId );
+    
+    CleanupClosePushL( aServiceIds );
 
     RArray<TUint32> profileIdArray;
     CleanupClosePushL( profileIdArray );    
@@ -917,6 +919,7 @@
         }
 
     CleanupStack::PopAndDestroy( &profileIdArray );
+    CleanupStack::Pop( &aServiceIds );
     }
 
 // -----------------------------------------------------------------------------
--- a/voipplugins/sipconnectionprovider/src/scpvmbxhandler.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/sipconnectionprovider/src/scpvmbxhandler.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 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"
@@ -260,6 +260,14 @@
                     }
                 break;
                 }
+                
+            case EFatalNetworkError:
+                {
+                // In case of fatal network error forced disable is done to
+                // SIP profile.
+                PerformInstantForceSipProfileDisable();
+                break;
+                }
 
             case EIncorrectSettings:
                 {
--- a/voipplugins/voipadapters/cpvoipadapter/src/CWPVoIPAdapter.cpp	Tue May 11 16:04:22 2010 +0300
+++ b/voipplugins/voipadapters/cpvoipadapter/src/CWPVoIPAdapter.cpp	Tue May 25 12:31:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 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"
@@ -35,6 +35,7 @@
 #include <crcseprofileregistry.h>
 #include <crcseaudiocodecentry.h>
 #include <crcseaudiocodecregistry.h>
+#include <mmf/common/mmfcontrollerpluginresolver.h>
 
 #include "CWPVoIPAdapter.h"
 #include "CWPVoIPItem.h"
@@ -411,12 +412,24 @@
 void CWPVoIPAdapter::GetSavingInfoL( TInt aIndex, 
     RPointerArray<HBufC8>& aSavingInfo )
     {
+    CleanupResetAndDestroyPushL( aSavingInfo );
+    
     // APPID into place [0].
-    aSavingInfo.AppendL( KVoIPAppID8().AllocL() );
+    HBufC8* temp = KVoIPAppID8().AllocLC();
+    aSavingInfo.AppendL( temp );
+    CleanupStack::Pop();
+    
     // APPREF into place [1].
-    aSavingInfo.AppendL( iDatas[aIndex]->AppRef()->AllocL() );
+    temp = iDatas[aIndex]->AppRef()->AllocLC();
+    aSavingInfo.AppendL( temp );
+    CleanupStack::Pop();
+    
     // Profile id into place [2].
-    aSavingInfo.AppendL( iDatas[aIndex]->SaveData().AllocL() );
+    temp = iDatas[aIndex]->SaveData().AllocLC();
+    aSavingInfo.AppendL( temp );
+    CleanupStack::Pop();
+    
+    CleanupStack::Pop( &aSavingInfo );
     }
 
 // ---------------------------------------------------------------------------