Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:04:22 +0300
branchRCL_3
changeset 14 be41ab7b952f
parent 12 876a3df1f464
child 15 43658d24f35d
Revision: 201017 Kit: 201019
callcontinuity/vcc/src/tvccstatecalling.cpp
commsconfig/cscgsplugin/src/cscgsplugin.cpp
commsconfig/cscsettingsui/inc/cscsettingsuimainview.h
commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp
convergedconnectionhandler/cchclientapi/src/cchserviceimplasynchroniser.cpp
convergedconnectionhandler/cchserver/inc/cchcommdbwatcher.h
convergedconnectionhandler/cchserver/inc/cchconnmonhandler.h
convergedconnectionhandler/cchserver/inc/cchconnmonhandlernotifier.h
convergedconnectionhandler/cchserver/inc/cchserverbase.h
convergedconnectionhandler/cchserver/inc/cchspshandler.h
convergedconnectionhandler/cchserver/inc/cchuihandler.h
convergedconnectionhandler/cchserver/src/cchcommdbwatcher.cpp
convergedconnectionhandler/cchserver/src/cchconnmonhandler.cpp
convergedconnectionhandler/cchserver/src/cchserverbase.cpp
convergedconnectionhandler/cchserver/src/cchserviceinfo.cpp
convergedconnectionhandler/cchserver/src/cchsession.cpp
convergedconnectionhandler/cchserver/src/cchspshandler.cpp
convergedconnectionhandler/cchserver/src/cchuihandler.cpp
voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxengine.cpp
voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxeventmonitor.cpp
voipplugins/sipconnectionprovider/src/scpservicehandlerbase.cpp
voipplugins/voipadapters/dmvoipadapter/src/nsmldmvoipadapter.cpp
--- a/callcontinuity/vcc/src/tvccstatecalling.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/callcontinuity/vcc/src/tvccstatecalling.cpp	Tue May 11 16:04:22 2010 +0300
@@ -122,7 +122,11 @@
 		if ( aContext.Parameters().CallType() == CCPCall::ECallTypePS )
             {
             TRAP_IGNORE( aContext.Notifier().NotifySubscriberL( EVccCsToPsHoInprogress, 
-                                                   KErrNone ) );            
+                                                   KErrNone ) );
+                  
+            RUBY_DEBUG0( "TVccStateCalling::CallStateChanged - call are swapped so hang up CS call now" );
+            ReleaseCall( aContext, *aContext.SecondaryCall(), *iInit, KVccHoOk );
+            return;
             }
         else
             {
--- a/commsconfig/cscgsplugin/src/cscgsplugin.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/commsconfig/cscgsplugin/src/cscgsplugin.cpp	Tue May 11 16:04:22 2010 +0300
@@ -239,19 +239,17 @@
     {
     // Get the correct application data
     RWsSession ws;
+    CleanupClosePushL( ws );
     User::LeaveIfError( ws.Connect() );
 
     // Find the task with uid
     TApaTaskList taskList( ws );
     TApaTask task = taskList.FindApp( KCscAppUid );
-    ws.Close();
 
     if ( task.Exists() )
         {
-        //Launch csc application as embedded
-        TAppInfo app( KCscAppUid, KCscApp );
-        iEmbedded = NULL;
-        EmbedAppL( app );
+        //Bring CSC to foreground.
+        task.BringToForeground();
         }
     else
         {
@@ -260,6 +258,7 @@
         iEmbedded = NULL;
         EmbedAppL( app );
         }
+    CleanupStack::PopAndDestroy( &ws );
     }
 
 
--- a/commsconfig/cscsettingsui/inc/cscsettingsuimainview.h	Tue Apr 27 16:28:03 2010 +0300
+++ b/commsconfig/cscsettingsui/inc/cscsettingsuimainview.h	Tue May 11 16:04:22 2010 +0300
@@ -271,6 +271,11 @@
      */
     TBool iDeleted;
 
+    /**
+     * Flag for telling if SNAP list is open.
+     */
+    TBool iSnapListOpen;
+
 #ifdef _DEBUG
     friend class UT_cscsettingsui;
 #endif
--- a/commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp	Tue May 11 16:04:22 2010 +0300
@@ -85,6 +85,7 @@
         ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
         
     iImToneSelectionListOpen = EFalse;
+    iSnapListOpen = EFalse;
     CSCSETUIDEBUG( "CCSCSettingsUiMainView::ConstructL - end" );
     }
 
@@ -847,16 +848,24 @@
 void CCSCSettingsUiMainView::LaunchCMSettingsUiL()
     {
     CSCSETUIDEBUG( "CCSCSettingsUiMainView::LaunchCMSettingsUiL" );
+    if ( iSnapListOpen )
+        {
+        CSCSETUIDEBUG( "CCSCSettingsUiMainView::LaunchCMSettingsUiL  end" );
+        return;
+        }
     
     // Launch Connection Method Settings Ui.
     CCmSettingsUi* cmSettingsUi = CCmSettingsUi::NewL();
     CleanupStack::PushL( cmSettingsUi );
+    iSnapListOpen = ETrue;
     if ( CCmSettingsUi::EExit == cmSettingsUi->RunSettingsL() )
         {
         HandleCommandL( EEikCmdExit );
         }
     CleanupStack::PopAndDestroy( cmSettingsUi );
-    iContainer->UpdateContainerL();
+    iSnapListOpen = EFalse;
+    ResetViewL();
+    CSCSETUIDEBUG( "CCSCSettingsUiMainView::LaunchCMSettingsUiL  end" );
     }
 
 // ---------------------------------------------------------------------------
@@ -952,6 +961,13 @@
     {
     CSCSETUIDEBUG( "CCSCSettingsUiMainView::ResetViewL - IN" );
 
+    // Do not update view if SNAP list is open because in some cases
+    // there will be problems with title and status bar.
+    if ( iSnapListOpen )
+        {
+        CSCSETUIDEBUG( "CCSCSettingsUiMainView::ResetViewL - OUT" );
+        return;
+        }
     // Create container when view is activated.
     if ( !iContainer )
         {
--- a/convergedconnectionhandler/cchclientapi/src/cchserviceimplasynchroniser.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/src/cchserviceimplasynchroniser.cpp	Tue May 11 16:04:22 2010 +0300
@@ -66,18 +66,16 @@
 void CCchServiceImplAsynchroniser::Disable( TCCHSubserviceType aType )
     {
     CCHLOGSTRING( "CCchServiceImplAsynchroniser::Disable IN" );
-    if (iState == EIdle)
+    if (iState != EIdle)
         {
+        Cancel();
+        }
         iState = EDisabling;
         TRequestStatus status = KErrNone;
         TServiceSelection selection( iServiceId, aType );
         SetActive();
         iCch.CchClient().DisableService( selection, iStatus );
-        }
-    else
-        {
-        CCHLOGSTRING( "CCchServiceImplAsynchroniser already active" );
-        }
+
     CCHLOGSTRING( "CCchServiceImplAsynchroniser::Disable OUT" );
     }
 
@@ -95,7 +93,14 @@
 
 void CCchServiceImplAsynchroniser::DoCancel()
     {
-
+    if ( EEnabling == iState ) 
+            { 
+            iCch.CchClient().EnableServiceCancel(); 
+            } 
+        else if ( EDisabling == iState ) 
+            { 
+            iCch.CchClient().DisableServiceCancel(); 
+            } 
     }
 
 void CCchServiceImplAsynchroniser::RunL()
--- a/convergedconnectionhandler/cchserver/inc/cchcommdbwatcher.h	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/inc/cchcommdbwatcher.h	Tue May 11 16:04:22 2010 +0300
@@ -91,6 +91,28 @@
      * @since Series 60 3.2
      */
     TBool IsWlanApL( TInt aIapId );
+    
+	/**
+     * Checks is IAP's bearer type VPN AP.
+     * @param aIapId of IAP to check.
+     * @return ETrue if given IAP id is VPN AP, otherwise EFalse.
+     */
+    TBool IsVpnApL( TInt aIapId );
+    
+	/**
+     * IAP's bearer getter.
+     * @param aIapId.
+     * @return TUint32 bearer type.
+     */
+    TUint32 GetBearerL( TInt aIapId );
+    
+	/**
+     * Removes IAPs which are not linked to VPN AP.
+     * @param aIapIds all connected iaps, afterward only linked IAPs.
+	 * @param aIAPId VPN IAP to check.
+     */
+    void RemoveOtherThanVpnIapsL( RArray<TUint>& aIaps, TUint aIAPId );
+        
 
 protected: // From base classes
 
--- a/convergedconnectionhandler/cchserver/inc/cchconnmonhandler.h	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/inc/cchconnmonhandler.h	Tue May 11 16:04:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 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"
@@ -38,8 +38,15 @@
 
 // FORWARD DECLARATIONS
 class CCCHServerBase;
+class MCCHConnMonHandlerNotifier;
 
 // CLASS DECLARATION
+class TCCHConnectionInfo
+    {
+public:
+    TUint iIapId;
+    TUint iConnId;
+    };
 
 /**
  *  CCCHConnMonHandler declaration
@@ -61,6 +68,8 @@
           EInitialized,     /// Initalized
           EGetIAPS,
           EGetSNAPs,
+          EGetIAP,
+          EGetConnectionCount,
           EError            /// Error condition
         };
 
@@ -83,10 +92,14 @@
 
     /**
      * Scan available networks
-     * @since S60 3.2
+     *
+     * @since S60 9.2
      * @param aWlanScan ETrue if WLAN network scan needed
+     * @param aObserver Completion notified by method
+     *        NetworkScanningCompletedL() if set.
      */
-    void ScanNetworks( TBool aWlanScan = EFalse );
+    void ScanNetworks( TBool aWlanScan = EFalse,
+	    MCCHConnMonHandlerNotifier* aObserver = NULL );
 
     /**
      * Cancel network scanning
@@ -110,6 +123,26 @@
      */
     TBool IsIapAvailable( TUint aIapId ) const;
 
+    /**
+     * Sets observer to notify if SNAPs availability is changed
+     *
+     * @since S60 9.2
+     * @param aObserver Notifies by method
+     *        SNAPsAvailabilityChanged(). NULL turns off notify.
+     */
+    void SetSNAPsAvailabilityChangeListener( MCCHConnMonHandlerNotifier* aObserver );
+        
+	/**
+     * Collects all connected IAP Ids and Connection Ids to array.
+     */
+    void StartMonitoringConnectionChanges();
+	
+	/**
+     * Connected IAPs getter.
+     * @param aIapIds
+     */
+    void StopMonitoringConnectionChanges( RArray<TUint>& aIapIds );
+
 protected: // From base classes
 
     /**
@@ -182,6 +215,31 @@
      */
     void StopNotify();
 
+    /**
+     * Call back function to the CPeriodic.
+     * 
+     * @since S60 9.2
+     * @param aAny A pointer to this class.
+     * @return Error code
+     */
+    static TInt PeriodicTimerCallBack(TAny* aAny);
+        
+	/**
+     * Connection count solver.
+     */
+    void GetConnectionCount();
+	
+	/**
+     * IAP Id solver.
+     */
+    void GetIapId();
+	
+	/**
+     * Remove connected IAP id from connected IAPs array.
+	 * @param aConnId disconnected connection id.
+     */
+    void RemoveIapId( TUint aConnId );
+
 private: // data
 
     /**
@@ -219,6 +277,43 @@
      */
     RArray<TUint>                   iAvailableIAPs;
 
+    /**
+     * Connection change listener timer.
+     * owns.
+     */
+    CPeriodic* iConnChangeListenerTimer;
+    
+    /**
+     * Network scanning observer
+     */
+    MCCHConnMonHandlerNotifier* iNetworkScanningObserver;
+	
+    /**
+     * SNAPs availability change observer
+     */
+    MCCHConnMonHandlerNotifier* iSNAPsAvailabilityObserver;
+    
+	/**
+     * pending async request
+     */
+    RArray<TCCHConnMonHandlerState> iPendingRequests;
+	
+	/**
+     * Unsolved connection ids
+     */
+    RArray<TUint>                   iUnsolvedConnIds;
+	
+	/**
+     * Connected IAP Ids
+     */
+    RArray<TCCHConnectionInfo>      iConnIapIds;
+	
+	/**
+     * Async helpers
+     */
+    TUint                           iConnIapId;
+    TUint                           iConnId;
+    TUint                           iConnCount;
     };
 
 #endif // C_CCHCONNMONHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/convergedconnectionhandler/cchserver/inc/cchconnmonhandlernotifier.h	Tue May 11 16:04:22 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 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"
+* 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:  CCCHServerBase declaration
+*
+*/
+
+#ifndef M_CCHCONNMONHANDLERNOTIFIER_H
+#define M_CCHCONNMONHANDLERNOTIFIER_H
+
+#include <rconnmon.h>
+
+/**
+ *  MCCHConnMonHandlerNotifier declaration
+ *  @lib cchserver.exe
+ *  @since S60 9.2
+ */
+class MCCHConnMonHandlerNotifier
+    {
+
+public:
+    
+    /**
+     * Informs observer when network scanning is completed.
+     * 
+     * @since S60 9.2
+     * @param aSNAPs SNAPs info.
+     * @param aError Error code
+     */
+    virtual void NetworkScanningCompletedL( const TConnMonSNAPInfo& aSNAPs, TInt aError ) = 0;
+    
+    /**
+     * Informs observer when SNAPs availability is changed
+     * 
+     * @since S60 9.2
+     * @param aError Error code.
+     *        KErrTimeOut if SNAP availability is not changed in defined time.
+     */
+    virtual void SNAPsAvailabilityChanged( TInt aError ) = 0;
+
+    };
+
+#endif // M_CCHCONNMONHANDLERNOTIFIER_H
+
+// End of file
--- a/convergedconnectionhandler/cchserver/inc/cchserverbase.h	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/inc/cchserverbase.h	Tue May 11 16:04:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 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"
@@ -24,6 +24,7 @@
 #include <e32base.h>
 #include <cchclientserver.h>
 #include "cchwakeupeventobserver.h"
+#include "cchconnmonhandlernotifier.h"
 
 // CONSTANTS
 
@@ -88,7 +89,8 @@
  *  @since S60 3.2
  */
 NONSHARABLE_CLASS( CCCHServerBase ) : public CPolicyServer,
-			                          public MCchWakeUpEventObserver
+			                          public MCchWakeUpEventObserver,
+			                          public MCCHConnMonHandlerNotifier
     {
 
 public: // Constructors and destructor
@@ -235,7 +237,13 @@
       * Switch server to monitoring mode
       */
      void WakeUp();
-     
+
+private: // From MCCHConnMonHandlerNotifier
+    
+    void NetworkScanningCompletedL( const TConnMonSNAPInfo& aSNAPs, TInt aError );
+    
+    void SNAPsAvailabilityChanged( TInt aError );
+         
 private:
 
     /**
@@ -269,7 +277,12 @@
      * Release all dynamic memory allocations and other resources
      */
     void ReleaseAllResources();
-    
+	
+    /**
+     * Starts service
+     */
+    void ServiceStartupL();
+        
     template <class T>T& ConstructObject( CCCHServerBase* aThis, T*& aObject );
     template <class T>T& ConstructObject( T*& aObject );
 
--- a/convergedconnectionhandler/cchserver/inc/cchspshandler.h	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/inc/cchspshandler.h	Tue May 11 16:04:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 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"
@@ -104,40 +104,7 @@
     void GetConnectivityPluginUidL( TUint32 aServiceId,
         TCCHSubserviceType aType, 
         TUid& aUid ) const;
-    
-    /**
-     * Get SNAP Id
-     * @since S60 3.2
-     * @param aServiceId Used Service
-     * @param aType Subservice's type
-     * @param aSNAPId On completion, contains SNAP Id
-     */
-    void GetSNAPIdL( TUint32 aServiceId,
-        TCCHSubserviceType aType,
-        TInt& aSNAPId ) const;
-    
-    /**
-     * Get IAP Id
-     * @since S60 3.2
-     * @param aServiceId Used Service
-     * @param aType Subservice's type
-     * @param aIapId On completion, contains IAP Id
-     */
-    void GetIapIdL( TUint32 aServiceId,
-        TCCHSubserviceType aType,
-        TInt& aIapIdL ) const;
-    
-    /**
-     * Get Settings Id
-     * @since S60 3.2
-     * @param aServiceId Used Service
-     * @param aType Subservice's type
-     * @param aId On completion, contains Settings Id
-     */
-    void GetSettingsIdL( TUint32 aServiceId,
-        TCCHSubserviceType aType,
-        TInt& aId ) const;
-    
+        
     /**
      * Get Service's load at startup information
      * @since S60 3.2
--- a/convergedconnectionhandler/cchserver/inc/cchuihandler.h	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/inc/cchuihandler.h	Tue May 11 16:04:22 2010 +0300
@@ -110,6 +110,12 @@
      * Waits one second to give enought time to end async requests
      */
     void Destroy();
+    
+    /**
+     * Is cost warning already shown
+     * @return TBool if cost warning already shown ETrue 
+     */
+    TBool IsCostWarningSeen() const;
 
 public: // From MCchEtelNetworkStatusObserver
 
--- a/convergedconnectionhandler/cchserver/src/cchcommdbwatcher.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchcommdbwatcher.cpp	Tue May 11 16:04:22 2010 +0300
@@ -20,6 +20,7 @@
 #include <cmdestination.h>
 #include <cmconnectionmethoddef.h>
 #include <cmpluginwlandef.h>
+#include <cmpluginvpndef.h>
 #include <centralrepository.h>
 #include <commsdat.h>
 
@@ -215,6 +216,21 @@
     }
 
 // ---------------------------------------------------------------------------
+// CCCHCommsDbWatcher::IsVpnApL
+//
+// ---------------------------------------------------------------------------
+//
+TBool CCCHCommDbWatcher::IsVpnApL(
+    TInt aIapId )
+    {
+    CCHLOGSTRING( "CCCHCommDbWatcher::IsVpnApL: IN" );
+    TBool response( KPluginVPNBearerTypeUid == GetBearerL( aIapId ) );
+    CCHLOGSTRING3( "CCCHCommDbWatcher::IsVpnApL: iap id: %d is vpn ap: %d", 
+            aIapId, response );
+    return response;
+    }
+
+// ---------------------------------------------------------------------------
 // CCCHCommsDbWatcher::IsWLANAPL
 //
 // ---------------------------------------------------------------------------
@@ -223,20 +239,26 @@
     TInt aIapId )
     {
     CCHLOGSTRING( "CCCHCommDbWatcher::IsWLANAPL: IN" );
-    TBool ret( EFalse );
-    TUint32 bearer( KErrNone );
-
-    // Bearer Type
-    bearer = CmManagerL().ConnectionMethodL( aIapId ).GetIntAttributeL( 
-            CMManager::ECmBearerType );
-    ret = KUidWlanBearerType == bearer;
-
+    TBool response( KUidWlanBearerType == GetBearerL( aIapId ) );
+    
     CCHLOGSTRING3( "CCCHCommDbWatcher::IsWLANAPL: iap id: %d is wlan ap: %d", 
-        aIapId, ret );
-    return ret;
+        aIapId, response );
+    return response;
     }
    
 // ---------------------------------------------------------------------------
+// CCCHCommsDbWatcher::GetBearerL
+//
+// ---------------------------------------------------------------------------
+//
+TUint32 CCCHCommDbWatcher::GetBearerL( 
+    TInt aIapId )
+    {
+    return CmManagerL().ConnectionMethodL( aIapId ).GetIntAttributeL( 
+            CMManager::ECmBearerType );
+    }
+    
+// ---------------------------------------------------------------------------
 // CCCHCommsDbWatcher::RunL
 //
 // ---------------------------------------------------------------------------
@@ -330,9 +352,9 @@
     currentDestinations.Append( destinationlessIaps ); 
 
     //Get count of iaps per destination
-    CCHLOGSTRING2( "CCCHCommDbWatcher::CheckIapsL: cmMethods count %d",
-            destIdArray.Count() )
     CmManagerL().AllDestinationsL( destIdArray );
+    CCHLOGSTRING2( "CCCHCommDbWatcher::CheckIapsL: destination count %d",
+                destIdArray.Count() )
     for ( TInt i = 0; i < destIdArray.Count(); i++ )
         {
         RCmDestination destination = CmManagerL().DestinationL( destIdArray[ i ] );
@@ -512,6 +534,74 @@
         }
     }
 
+// ---------------------------------------------------------------------------
+// CCCHCommsDbWatcher::RemoveOtherThanVpnIapsL
+//
+// ---------------------------------------------------------------------------
+//
+void CCCHCommDbWatcher::RemoveOtherThanVpnIapsL(
+    RArray<TUint>& aIapIds,
+    TUint aIAPId )
+    {
+    CCHLOGSTRING2( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL; IAP ID:  %d", aIAPId );
+    CCHLOGSTRING2( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL; IAPs count before: %d", aIapIds.Count() );
+    
+    TUint32 iapId( KErrNone );
+    RArray<TUint> iaps;
+    CleanupClosePushL( iaps );
+    RCmConnectionMethod cm = CmManagerL().ConnectionMethodL( aIAPId );
+    CleanupClosePushL( cm );
+	
+    TUint32 realIap( cm.GetIntAttributeL( CMManager::ECmNextLayerIapId ) );
+    CCHLOGSTRING2( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL: real iap  %d ", realIap );
+    TUint32 realSnap( cm.GetIntAttributeL( CMManager::ECmNextLayerSNAPId ) );
+    CCHLOGSTRING2( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL: real snap %d", realSnap );
+            
+    if ( realIap )
+        {
+        CCHLOGSTRING( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL: VPN linked to IAP" );
+        
+        if ( KErrNotFound != aIapIds.Find( realIap ) )
+            {
+            iaps.Append( realIap );
+            }
+        }
+    else
+        {
+        CCHLOGSTRING( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL: VPN linked to SNAP" );
+        
+        RCmDestination realDestination = CmManagerL().DestinationL( realSnap );
+        CleanupClosePushL( realDestination );
+        
+        for ( TInt i = 0; i < realDestination.ConnectionMethodCount(); i++ )
+            {
+            RCmConnectionMethod realCm = realDestination.ConnectionMethodL( i );
+            CleanupClosePushL( realCm );
+            iapId = realCm.GetIntAttributeL( CMManager::ECmIapId );
+        
+            if ( KErrNotFound != aIapIds.Find( iapId ) )
+                {
+                iaps.Append( iapId );
+                }
+            
+            CleanupStack::PopAndDestroy( &realCm );
+            }
+        
+        CleanupStack::PopAndDestroy( &realDestination );
+        }
+            
+    aIapIds.Reset();
+    for ( TInt j( 0 ); j < iaps.Count(); j++ )
+        {
+        aIapIds.Append( iaps[ j ] );
+        }
+    
+    CleanupStack::PopAndDestroy( &cm );
+    CleanupStack::PopAndDestroy( &iaps ); 
+    
+    CCHLOGSTRING2( "CCCHCommDbWatcher::RemoveOtherThanVpnIapsL; IAPs count after:  %d", aIapIds.Count() );
+    }
+    
 // ========================== OTHER EXPORTED FUNCTIONS =======================
 
 //  End of File
--- a/convergedconnectionhandler/cchserver/src/cchconnmonhandler.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchconnmonhandler.cpp	Tue May 11 16:04:22 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"
@@ -21,6 +21,7 @@
 #include "cchserverbase.h"
 #include "cchlogger.h"
 #include "cchservicehandler.h"
+#include "cchconnmonhandlernotifier.h"
 
 // EXTERNAL DATA STRUCTURES
 // None
@@ -35,7 +36,7 @@
 // None
 
 // LOCAL CONSTANTS AND MACROS
-// None
+const TInt KPeriodicTimerInterval( 5000000 ); // 5sec.
 
 // MODULE DATA STRUCTURES
 // None
@@ -72,6 +73,7 @@
     {
     User::LeaveIfError( iConnMon.ConnectL() );
     NotifyL();
+    iConnChangeListenerTimer = CPeriodic::NewL( CActive::EPriorityIdle );
     }
 
 // ---------------------------------------------------------------------------
@@ -103,9 +105,13 @@
 CCCHConnMonHandler::~CCCHConnMonHandler()
     {
     CCHLOGSTRING( "CCCHConnMonHandler::~CCCHConnMonHandler" );
-    
+    iConnChangeListenerTimer->Cancel();
+    delete iConnChangeListenerTimer;
     StopNotify();
     Cancel();
+    iPendingRequests.Close();
+	iUnsolvedConnIds.Close();
+    iConnIapIds.Close();
     iAvailableSNAPs.Close();
     iAvailableIAPs.Close();
     iConnMon.Close();
@@ -116,12 +122,14 @@
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------
 //
-void CCCHConnMonHandler::ScanNetworks( TBool aWlanScan )
+void CCCHConnMonHandler::ScanNetworks(
+    TBool aWlanScan, MCCHConnMonHandlerNotifier* aObserver )
     {
     CCHLOGSTRING( "CCCHConnMonHandler::ScanNetworks: IN" );
     
     if ( aWlanScan )
         {
+        iNetworkScanningObserver = aObserver;
         GetIaps( EBearerIdAll );
         }
             
@@ -161,6 +169,25 @@
     }
 
 // ---------------------------------------------------------------------------
+// CCCHConnMonHandler::SetSNAPsAvailabilityChangeListener
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHConnMonHandler::SetSNAPsAvailabilityChangeListener(
+    MCCHConnMonHandlerNotifier* aObserver )
+    {
+    CCHLOGSTRING( "CCCHConnMonHandler::SetSNAPsAvailabilityChangeListener" );
+    iSNAPsAvailabilityObserver = aObserver;
+    if ( iSNAPsAvailabilityObserver )
+        {
+        iConnChangeListenerTimer->Start(
+            KPeriodicTimerInterval,
+            KPeriodicTimerInterval,
+            TCallBack( PeriodicTimerCallBack, this ) );
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // CCCHConnMonHandler::GetIaps
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------
@@ -278,6 +305,27 @@
     iConnMon.CancelNotifications();
     }
 
+// ----------------------------------------------------------------------------
+// CCCHConnMonHandler::PeriodicTimerCallBack
+// The call back function.
+// ----------------------------------------------------------------------------
+//
+TInt CCCHConnMonHandler::PeriodicTimerCallBack( TAny* aAny )
+    {
+    CCHLOGSTRING( "CCCHConnMonHandler::PeriodicTimerCallBack" );
+    
+    CCCHConnMonHandler* self = static_cast<CCCHConnMonHandler*>( aAny );
+    self->iConnChangeListenerTimer->Cancel();
+    
+    if ( self->iSNAPsAvailabilityObserver )
+        {
+        self->iSNAPsAvailabilityObserver->
+            SNAPsAvailabilityChanged( KErrTimedOut );
+        }
+    
+    return KErrNone;
+    }
+
 // ---------------------------------------------------------------------------
 // CCCHConnMonHandler::RunL
 // (other items were commented in a header).
@@ -296,21 +344,211 @@
                 UpdateIapArray( iIapsBuf() );
                 GetSNAPs();
                 }
-            break;
+                break;
+            
             case EGetSNAPs:
                 {
                 UpdateSnapArray( iSNAPbuf() );
+                if ( iNetworkScanningObserver )
+                    {
+                    iNetworkScanningObserver->NetworkScanningCompletedL(
+                        iSNAPbuf(), KErrNone );
+                    iNetworkScanningObserver = NULL;
+                    }
                 }
-            break;
+                break;
+            
+            case EGetIAP:
+                {
+                CCHLOGSTRING2( "CCCHConnMonHandler::RunL: iap: %d", iConnIapId );
+                TCCHConnectionInfo info;
+                info.iIapId  = iConnIapId;
+                info.iConnId = iConnId;
+                                    
+                if ( KErrNotFound == iConnIapIds.Find( info ) )
+                    {
+                    iConnIapIds.Append( info );
+                    }
+                iConnId    = 0;
+                iConnIapId = 0;
+                
+                CCHLOGSTRING2( "CCCHConnMonHandler::RunL: unsolved conn count: %d", iUnsolvedConnIds.Count() );
+                if ( iUnsolvedConnIds.Count() )
+                    {
+                    GetIapId();
+                    }
+                }
+                break;
+                
+            case EGetConnectionCount:
+                {
+                CCHLOGSTRING2( "CCCHConnMonHandler::RunL: conn count: %d", iConnCount );
+                TBool familiar( EFalse );
+                TUint connId( KErrNone );
+                TUint subConnCount( KErrNone );
+                for ( TInt i( 1 ); i <= iConnCount; i++ )
+                    {
+                    if ( !iConnMon.GetConnectionInfo( i, connId, subConnCount ) )
+                        {
+                        familiar = EFalse;
+                        for ( TInt j( 0 ); j < iConnIapIds.Count(); j++ )
+                            {
+                            if ( connId == iConnIapIds[ j ].iConnId )
+                                {
+                                CCHLOGSTRING2( "CCCHConnMonHandler::RunL: iap %d is familiar connection", iConnIapIds[ j ].iIapId );
+                                familiar = ETrue;
+                                break;
+                                }
+                            }
+                        
+                        if ( !familiar && KErrNotFound == iUnsolvedConnIds.Find( connId ) )
+                            {
+                            iUnsolvedConnIds.Append( connId );
+                            }
+                        }
+                    }
+                iConnCount = 0;
+                
+                CCHLOGSTRING2( "CCCHConnMonHandler::RunL: unsolved conn count: %d", iUnsolvedConnIds.Count() );
+                if ( iUnsolvedConnIds.Count() )
+                    {
+                    GetIapId();
+                    }
+                }
+                break;
+                
             default:
                 break;
             }
+        
+        
+        if ( iPendingRequests.Count() && !IsActive() )
+            {
+            CCHLOGSTRING2( "CCCHConnMonHandler::RunL: request pending : %d", 
+                iPendingRequests[ 0 ] );
+            switch ( iPendingRequests[ 0 ] )
+                {
+                case EGetIAP:
+                    {
+                    GetIapId();
+                    }
+                    break;
+                        
+                case EGetConnectionCount:
+                    {
+                    GetConnectionCount();
+                    }
+                    break;
+                        
+                default:
+                    break;
+                }
+            
+            iPendingRequests.Remove( 0 );
+            iPendingRequests.Compress();
+            }
+        }
+    else
+        {
+        if ( iNetworkScanningObserver )
+            {
+            iNetworkScanningObserver->NetworkScanningCompletedL(
+                iSNAPbuf(), iStatus.Int() );
+            iNetworkScanningObserver = NULL;
+            }
         }
             
     CCHLOGSTRING( "CCCHConnMonHandler::RunL: OUT" );
     }
 
 // ---------------------------------------------------------------------------
+// CCCHConnMonHandler::StartMonitoringConnectionChanges
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHConnMonHandler::StartMonitoringConnectionChanges()
+    {
+    iConnIapIds.Reset();
+    
+    if ( !IsActive() )
+        {
+        GetConnectionCount();
+        }
+    else
+        {
+        iPendingRequests.Append( EGetConnectionCount );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CCCHConnMonHandler::StopMonitoringConnectionChanges
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHConnMonHandler::StopMonitoringConnectionChanges( 
+    RArray<TUint>& aIapIds )
+    {
+    aIapIds.Reset();
+    for ( TInt i( 0 ); i < iConnIapIds.Count(); i++ )
+        {
+        if ( KErrNotFound == aIapIds.Find( iConnIapIds[ i ].iIapId ) )
+            {
+            aIapIds.Append( iConnIapIds[ i ].iIapId );
+            }
+        }
+    }
+	
+// ---------------------------------------------------------------------------
+// CCCHConnMonHandler::GetConnectionCount
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHConnMonHandler::GetConnectionCount()
+    {
+    iState = EGetConnectionCount;
+    iConnMon.GetConnectionCount( iConnCount, iStatus ); 
+    SetActive(); 
+    }
+     
+// ---------------------------------------------------------------------------
+// CCCHConnMonHandler::GetIapId
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHConnMonHandler::GetIapId()
+    {
+    if ( iUnsolvedConnIds.Count() )
+        {
+        iConnId = iUnsolvedConnIds[ 0 ];
+        iUnsolvedConnIds.Remove( 0 );
+        iUnsolvedConnIds.Compress();
+        
+        iState = EGetIAP;
+        iConnMon.GetUintAttribute( iConnId, 0, KIAPId, iConnIapId, iStatus );
+        SetActive();
+        }
+    }
+            
+// ---------------------------------------------------------------------------
+// CCCHConnMonHandler::RemoveIapId
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHConnMonHandler::RemoveIapId(
+    TUint aConnId )
+    {
+    for ( TInt i( 0 ); i < iConnIapIds.Count(); i++ )
+        {
+        if ( aConnId == iConnIapIds[ i ].iConnId )
+            {
+            iConnIapIds.Remove( i );
+            iConnIapIds.Compress();
+            break;
+            }
+        }
+    }
+	
+// ---------------------------------------------------------------------------
 // CCCHConnMonHandler::DoCancel
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------
@@ -318,6 +556,17 @@
 void CCCHConnMonHandler::DoCancel()
     {
     iConnMon.CancelAsyncRequest( EConnMonGetPckgAttribute );
+    if ( iNetworkScanningObserver )
+        {
+        iNetworkScanningObserver->NetworkScanningCompletedL(
+            iSNAPbuf(), KErrCancel );
+        iNetworkScanningObserver = NULL;
+        }
+    if ( iSNAPsAvailabilityObserver )
+        {
+        iSNAPsAvailabilityObserver->SNAPsAvailabilityChanged( KErrCancel );
+        iSNAPsAvailabilityObserver = NULL;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -352,8 +601,44 @@
 
             TConnMonSNAPInfo snaps  = eventSNAP->SNAPAvailability();
             UpdateSnapArray( snaps );
+            
+            if ( iSNAPsAvailabilityObserver )
+                {
+                iConnChangeListenerTimer->Cancel();
+                iSNAPsAvailabilityObserver->SNAPsAvailabilityChanged( KErrNone );
+                }
             }
             break;
+			
+        case EConnMonCreateConnection:
+            {
+            const CConnMonCreateConnection* eventCreate = NULL; 
+            eventCreate = static_cast< const CConnMonCreateConnection* >(
+                &aConnMonEvent );
+            iUnsolvedConnIds.Append( eventCreate->ConnectionId() );
+                        
+            if ( !IsActive() )
+                {
+                GetIapId();
+                }
+            else
+                {
+                iPendingRequests.Append( EGetIAP );
+                }
+            }
+            break;
+            
+        case EConnMonDeleteConnection:
+            {
+            const CConnMonDeleteConnection* eventDelete = NULL; 
+            eventDelete = static_cast< const CConnMonDeleteConnection* >(
+                &aConnMonEvent );
+            TUint connId = eventDelete->ConnectionId();
+             
+            RemoveIapId( connId );
+            }
+            break;
+            
         default:
             break;
         }
--- a/convergedconnectionhandler/cchserver/src/cchserverbase.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchserverbase.cpp	Tue May 11 16:04:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 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"
@@ -29,8 +29,10 @@
 #include "cchwakeupeventnotifier.h"
 #include "cchstartupcounter.h"
 #include "cchactivescheduler.h"
+#include "cchconnmonhandlernotifier.h"
 
 #include <ecom/ecom.h>
+#include <rconnmon.h>
 
 // EXTERNAL DATA STRUCTURES
 // None
@@ -260,18 +262,8 @@
 
     if ( iServiceHandler->IsStartupFlagSet() )
         {
-        // Start monitoring startup flag registration, this may set startup 
-        // flag to OFF if crashes happens more than KCCHMaxStartupCount during 
-        // startup flag registration
-        TRAP_IGNORE( CreateStartupCounterL() );
-        // If CCH cannot load the Plug-ins, CCH can still 
-        // try to load them later 
-        TRAP_IGNORE( iServiceHandler->LoadPluginsL() );
-        RequestStorage().ScanNetworks();
-        // initialization is now done. update states and send notification to 
-        // all clients
-        iServerObjectsInit = ETrue;
-        iServiceHandler->UpdateL();
+        // is snap ready to proceed startup
+        ConnMonHandler().ScanNetworks( ETrue, this );
         }
     else
         {
@@ -282,7 +274,30 @@
         }
     CCHLOGSTRING( "CCCHServerBase::InitServerObjectsL: OUT" );
     }
-    
+
+// ---------------------------------------------------------------------------
+// CCCHServerBase::ServiceStartupL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CCCHServerBase::ServiceStartupL()
+    {
+    CCHLOGSTRING( "CCCHServerBase::ServiceStartupL: IN" );
+    // Start monitoring startup flag registration, this may set startup
+    // flag to OFF if crashes happens more than KCCHMaxStartupCount during
+    // startup flag registration
+    TRAP_IGNORE( CreateStartupCounterL() );
+    // If CCH cannot load the Plug-ins, CCH can still
+    // try to load them later
+    TRAP_IGNORE( iServiceHandler->LoadPluginsL() );
+    RequestStorage().ScanNetworks();
+    // initialization is now done. update states and send notification to
+    // all clients
+    iServerObjectsInit = ETrue;
+    iServiceHandler->UpdateL();
+    CCHLOGSTRING( "CCCHServerBase::ServiceStartupL: OUT" );
+    }
+
 // ---------------------------------------------------------------------------
 // CCCHServerBase::StartMinimalServerL
 // Start server in settings monitoring mode
@@ -641,6 +656,57 @@
     return shutDownAllowed;
     }
 
+// ---------------------------------------------------------------------------
+// From MCCHConnMonHandlerNotifier
+// CCCHServerBase::NetworkScanningCompletedL
+// ---------------------------------------------------------------------------
+//
+void CCCHServerBase::NetworkScanningCompletedL(
+    const TConnMonSNAPInfo& aSNAPs, TInt aError )
+    {
+    CCHLOGSTRING2( "CCCHServerBase::NetworkScanningCompletedL error = %d", aError );
+
+    if ( KErrNone == aError && aSNAPs.iCount  )
+        {
+        ServiceStartupL();
+        }
+    else if ( KErrNone == aError || KErrNotReady == aError )
+        {
+        // No SNAPs available. Start listen to availability change
+        ConnMonHandler().SetSNAPsAvailabilityChangeListener( this );
+        }
+    else
+        {
+        // exceptional error occured
+        ResetStartupCounterL();
+        StartMinimalServerL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From MCCHConnMonHandlerNotifier
+// CCCHServerBase::SNAPsAvailabilityChanged
+// ---------------------------------------------------------------------------
+//
+void CCCHServerBase::SNAPsAvailabilityChanged( TInt aError )
+    {
+    CCHLOGSTRING2( "CCCHServerBase::SNAPsAvailabilityChanged error = %d", aError );
+    
+    // Stop event receiving
+    ConnMonHandler().SetSNAPsAvailabilityChangeListener( NULL );
+    
+    if ( KErrNone == aError || KErrTimedOut == aError )
+        {
+        ServiceStartupL();
+        }
+    else
+        {
+        // exceptional error occured
+        ResetStartupCounterL();
+        StartMinimalServerL();
+        }
+    }
+
 // ========================== OTHER EXPORTED FUNCTIONS =======================
 
 // ---------------------------------------------------------------------------
--- a/convergedconnectionhandler/cchserver/src/cchserviceinfo.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchserviceinfo.cpp	Tue May 11 16:04:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 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"
@@ -554,11 +554,12 @@
     iIsEnabled = EFalse;
     if ( aReadServiceTable )
         {
-        TBool found( EFalse );
+        TUint validSubserviceCount( 0 );
         TInt index( KErrNotFound );
         TCCHService service;
         // Read service information from service table
         iServer.SPSHandler().GetServiceInfoL( iServiceId , service );
+
         for ( TInt i( 0 ); i < service.iSubservices.Count(); i++ )
             {            
             TCCHSubservice subservice = service.iSubservices[ i ];
@@ -575,32 +576,51 @@
                     {
                     iIsEnabled = iSubservices[ index ]->IsEnabled();
                     }
+                
+                validSubserviceCount++;
+                }
+            else if ( ECCHUnknown != subservice.iConnectionInfo.iServiceSelection.iType )
+                {
+                AddSubserviceL( subservice );
+                validSubserviceCount++;
                 }
             else
                 {
-                AddSubserviceL( subservice );
+                // do nothing
                 }
             }
+        
         // Check that all subservices really exist in service table
-        if ( service.iSubservices.Count() < iSubservices.Count() )
+        if ( validSubserviceCount < iSubservices.Count() )
             {
+            CCHLOGSTRING( "CCCHServiceInfo::UpdateL: check subservices -> need update" );
+        
             for ( TInt i( 0 ); i < iSubservices.Count(); i++ )
-                {                
-                found = ETrue;
-                for ( TInt j( 0 ); j < service.iSubservices.Count() && 
-                    found; j++ )
+                {
+                TBool found( EFalse );
+                TCCHSubserviceType type = iSubservices[ i ]->Type();
+                         
+                for ( TInt j( 0 ) ; j < service.iSubservices.Count() && !found ; j++ )
                     {
-                    found = 
-                        service.iSubservices[ j ].iConnectionInfo.iServiceSelection.iType == 
-                            iSubservices[ i ]->Type();
+                    CCHLOGSTRING2( "CCCHServiceInfo::UpdateL: type 1=%d", type );
+                    CCHLOGSTRING2( "CCCHServiceInfo::UpdateL: type 2=%d", 
+                        service.iSubservices[ j ].iConnectionInfo.iServiceSelection.iType );
+                
+                    if ( service.iSubservices[ j ].iConnectionInfo.iServiceSelection.iType == type )
+                        {
+                        CCHLOGSTRING( "CCCHServiceInfo::UpdateL: check subservices -> found" );
+                        found = ETrue;
+                        }
                     }
-                // if this subservice is not in service table then remove it.
+                
                 if ( !found )
                     {
+                    CCHLOGSTRING( "CCCHServiceInfo::UpdateL: remove subservice" );
+                
                     delete iSubservices[ i ];
                     iSubservices.Remove( i );
                     i--;
-                    }                
+                    }              
                 }
             }
         }
@@ -864,7 +884,7 @@
         {
         ret = iSubservices[ i ]->GetStartUpFlag(); 
         }
-    CCHLOGSTRING2( "CCCHServiceHandler::StartupFlagSet: %d", ret );        
+    CCHLOGSTRING2( "CCCHServiceInfo::StartupFlagSet: %d", ret );        
     return ret;
     }
 
--- a/convergedconnectionhandler/cchserver/src/cchsession.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchsession.cpp	Tue May 11 16:04:22 2010 +0300
@@ -128,14 +128,18 @@
             const TInt handle( iObjectIx->AddL( subsession ) );
             CleanupStack::Pop( subsession );
             TPckg<TInt> handlePckg( handle );
-            TRAPD( err, aMessage.WriteL( 3, handlePckg ) );
+            TInt err = aMessage.Write( 3, handlePckg ); 
+         
             if ( KErrNone != err )
                 {
                 // Panic client
                 iObjectIx->Remove( handle );
-                iCCHServer.PanicClient( aMessage, ECCHErrSubSessionOpen );
+                iCCHServer.PanicClient( aMessage, ECCHErrSubSessionOpen );   
                 }
-            aMessage.Complete( KErrNone );
+            else   
+                {
+                aMessage.Complete( KErrNone );
+                }
             }
             break;
         case ECCHCloseSubSession:
@@ -144,13 +148,13 @@
             if ( iObjectIx->At( handle ) )
                 {
                 iObjectIx->Remove( handle );
+                aMessage.Complete( KErrNone );
                 }
             else
                 {
                 // Panic client. Handle was not valid
                 iCCHServer.PanicClient( aMessage, ECCHErrSubSessionClose );
                 }
-            aMessage.Complete( KErrNone );
             }
             break;
         /**
--- a/convergedconnectionhandler/cchserver/src/cchspshandler.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchspshandler.cpp	Tue May 11 16:04:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 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"
@@ -142,88 +142,94 @@
     TCCHService& aService ) const
     {
     CCHLOGSTRING( "CCCHSPSHandler::GetServiceInfoL: IN" );
+    
+    aService.iSubservices.Reset();
+    
+    // Get entry
     TInt err( KErrNone );
-    // Get entry
     CSPEntry* entry = CSPEntry::NewLC();
     err = iSettings->FindEntryL( aServiceId, *entry );
-    CCHLOGSTRING2( "iSettings->FindEntryL err: %d", err );
+    
     if ( KErrNone == err )
         {
         // Read service id and service name
         aService.iServiceId = aServiceId;
         RBuf buf;
-        buf.Create( entry->GetServiceName(), KCCHMaxServiceNameLength );
+        CleanupClosePushL( buf );
+        buf.CreateL( entry->GetServiceName(), KCCHMaxServiceNameLength );
         aService.iServiceName.Copy( buf );
-        buf.Close();
-        
-        // get all service properties a.k.a subservices
-        RPropertyArray properties;
-        properties = entry->GetAllProperties();
+        CleanupStack::PopAndDestroy( &buf );
         
-        TServicePropertyName propertyName;
-        TUint count( 0 );
-        TInt pServiceId( 0 );
-        TInt pSnap( 0 );
-        TInt pIap( 0 );
-	    TBool pSnapLocked( EFalse );
+        // Check which subservices are supported
+        RPropertyNameArray propertyNameArray;
+        CleanupClosePushL( propertyNameArray );
+        propertyNameArray.AppendL( EPropertyVoIPSubServicePluginId );
+        propertyNameArray.AppendL( EPropertyPresenceSubServicePluginId );
+        propertyNameArray.AppendL( EPropertyIMSubServicePluginId );
+        propertyNameArray.AppendL( EPropertyVMBXSubServicePluginId );
         
-        for ( TInt i( 0 ); i < properties.Count() &&
-            count < KCCHMaxSubservicesCount; i++ )
+        for ( TInt i( 0 ) ; i < propertyNameArray.Count() ; i++ )
             {
-            propertyName = properties[ i ]->GetName();
+            CSPProperty* property = CSPProperty::NewLC();
+        
+            err = iSettings->FindPropertyL( 
+                aServiceId,
+                propertyNameArray[ i ],
+                *property );
             
-            // Check is subservice valid
-            TBool valid( EFalse );
-            TRAPD( error, valid = ValidSubserviceL( aServiceId, propertyName ) );
-            if ( KErrNone == error && valid )
+            if ( !err && ValidSubserviceL( aServiceId, propertyNameArray[ i ] ) )
                 {
-    	        aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iType = 
-                    propertyName == 
-                        EPropertyVoIPSubServicePluginId ? ECCHVoIPSub : 
-                    propertyName == 
-                        EPropertyPresenceSubServicePluginId ? ECCHPresenceSub : 
-                    propertyName == 
-                        EPropertyIMSubServicePluginId ? ECCHIMSub : 
-                    propertyName == 
-                        EPropertyVMBXSubServicePluginId ? ECCHVMBxSub : 
-                    ECCHUnknown;
-                
-                if ( ECCHUnknown != aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iType )
+                TCCHSubserviceType type = ECCHUnknown;        
+                switch ( propertyNameArray[ i ] )
                     {
-                    aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iServiceId = aServiceId;
-                    aService.iSubservices[ count ].iState     = ECCHUninitialized;              
-                    
-                    GetSettingsIdL( aServiceId, 
-                        aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iType, 
-                        pServiceId );
-                    aService.iSubservices[ count ].iSubserviceId = 
-                        static_cast<TUint> ( pServiceId );
-                    
-                    GetSNAPIdL( aServiceId, 
-                        aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iType, 
-                        pSnap );
-                    aService.iSubservices[ count ].iConnectionInfo.iSNAPId = 
-                        static_cast<TUint32> ( pSnap );
-                    
-                    GetSNAPIdL( aServiceId, 
-                        aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iType, 
-                        pSnapLocked );
-                    aService.iSubservices[ count ].iConnectionInfo.iSNAPLocked = 
-                        static_cast<TUint32> ( pSnapLocked );
-                    
-                    GetIapIdL( aServiceId, 
-                        aService.iSubservices[ count ].iConnectionInfo.iServiceSelection.iType, 
-                        pIap );
-                    aService.iSubservices[ count ].iConnectionInfo.iIapId  = 
-                            static_cast<TUint32> ( pIap ); 
-                        
-                    count++;
+                    case EPropertyVoIPSubServicePluginId:
+                        {
+                        type = ECCHVoIPSub;
+                        }
+                        break;
+                    case EPropertyPresenceSubServicePluginId:
+                        {
+                        type = ECCHPresenceSub;
+                        }
+                        break;
+                    case EPropertyIMSubServicePluginId:
+                        {
+                        type = ECCHIMSub;
+                        }
+                        break;
+                    case EPropertyVMBXSubServicePluginId:
+                        {
+                        type = ECCHVMBxSub;
+                        }
+                        break;
+                    default:
+                        {
+                        type = ECCHUnknown;
+                        break;
+                        }
                     }
+            
+                CCHLOGSTRING2( "CCCHSPSHandler::GetServiceInfoL: subservice type=%d", type );
+                
+                aService.iSubservices[ i ].iConnectionInfo.iServiceSelection.iType = type;
+                aService.iSubservices[ i ].iConnectionInfo.iServiceSelection.iServiceId = aServiceId;
+                
+                // These are just initialized here. Correct values are got from connectivity plugin
+                aService.iSubservices[ i ].iState = ECCHUninitialized;
+                aService.iSubservices[ i ].iSubserviceId = KErrNone;
+                aService.iSubservices[ i ].iConnectionInfo.iSNAPId = KErrNone;
+                aService.iSubservices[ i ].iConnectionInfo.iIapId = KErrNone;
+                aService.iSubservices[ i ].iConnectionInfo.iSNAPLocked = EFalse;
                 }
-            }    
-        }    
+        
+            CleanupStack::PopAndDestroy( property );
+            }
+        
+        CleanupStack::PopAndDestroy( &propertyNameArray );
+        }
     else
         {
+        CCHLOGSTRING2( "CCCHSPSHandler::GetServiceInfoL: error getting entry err=%d", err );
         User::Leave( err );
         }
             
@@ -301,120 +307,6 @@
     CCHLOGSTRING2( 
         "CCCHSPSHandler::GetConnectivityPluginUidL: aUid 0x%X", aUid );   
     }
-
-// ---------------------------------------------------------------------------
-// CCCHSPSHandler::GetSNAPIdL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CCCHSPSHandler::GetSNAPIdL( TUint32 aServiceId,
-    TCCHSubserviceType aType,
-    TInt& aSNAPId ) const
-    {
-    CCHLOGSTRING( "CCCHSPSHandler::GetSNAPIdL: IN" );
-    CCHLOGSTRING2( "CCCHSPSHandler::GetSNAPIdL: aServiceId %d", aServiceId );
-    CCHLOGSTRING2( "CCCHSPSHandler::GetSNAPIdL: aType %d", aType );
-    
-    TSPItemType propertyType( EItemTypeNotDefined );
-    TServicePropertyName propertyName( EPropertyUnknown );
-    RPropertyArray subproperties;
-    CleanupClosePushL( subproperties );
-    
-    ChangeToPropertyStyleL( aType, propertyType, propertyName );
-       
-    // Find correct subservice
-    TInt err( iSettings->FindSubServicePropertiesL( 
-        aServiceId, propertyType, subproperties ) );
-    CCHLOGSTRING2( "CCH: iSettings->FindSubServicePropertiesL err: %d" , err );            
-    for ( TInt i( 0 ); i < subproperties.Count(); i++ )
-        {
-        // Read subservice's SNAP Id
-        if ( propertyName == subproperties[ i ]->GetName() )
-            {                
-            subproperties[ i ]->GetValue( aSNAPId );
-            i = subproperties.Count();               
-            }
-        }    
-    
-    subproperties.ResetAndDestroy( );
-    CleanupStack::PopAndDestroy( &subproperties );
-    CCHLOGSTRING2( "CCCHSPSHandler::GetSNAPIdL: aSNAPId %d", aSNAPId );
-    }
-
-// ---------------------------------------------------------------------------
-// CCCHSPSHandler::GetIapIdL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CCCHSPSHandler::GetIapIdL( TUint32 aServiceId,
-    TCCHSubserviceType aType,
-    TInt& aIapId ) const
-    {
-    CCHLOGSTRING( "CCCHSPSHandler::GetIapIdL: IN" );
-    CCHLOGSTRING2( "CCCHSPSHandler::GetIapIdL: aServiceId %d", aServiceId );
-    CCHLOGSTRING2( "CCCHSPSHandler::GetIapIdL: aType %d", aType );
-    
-    TSPItemType propertyType( EItemTypeNotDefined );
-    TServicePropertyName propertyName( EPropertyUnknown );
-    RPropertyArray subproperties;
-    CleanupClosePushL( subproperties );
-    
-    ChangeToPropertyStyleL( aType, propertyType, propertyName );
-           
-    // Find correct subservice
-    TInt err( iSettings->FindSubServicePropertiesL( 
-        aServiceId, propertyType, subproperties ) );
-    CCHLOGSTRING2( "CCH: iSettings->FindSubServicePropertiesL err: %d" , err );
-    for ( TInt i( 0 ); i < subproperties.Count(); i++ )
-        {
-        // Read subservice's IAP Id
-        if ( propertyName == subproperties[ i ]->GetName() )
-            {                
-            subproperties[ i ]->GetValue( aIapId );
-            i = subproperties.Count();               
-            }
-        }    
-    
-    subproperties.ResetAndDestroy( );
-    CleanupStack::PopAndDestroy( &subproperties );
-    CCHLOGSTRING2( "CCCHSPSHandler::GetIapIdL: aIapId %d", aIapId );    
-    }
-
-// ---------------------------------------------------------------------------
-// CCCHSPSHandler::GetSettingsIdL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CCCHSPSHandler::GetSettingsIdL( TUint32 aServiceId,
-    TCCHSubserviceType aType,
-    TInt& aId ) const
-    {
-    TSPItemType propertyType( EItemTypeNotDefined );
-    TServicePropertyName propertyName( EPropertyUnknown );
-    RPropertyArray subproperties;
-    CleanupClosePushL( subproperties );
-    
-    ChangeToPropertyStyleL( aType, propertyType, propertyName );
-           
-    // Find correct subservice
-    TInt err( iSettings->FindSubServicePropertiesL( 
-        aServiceId, propertyType, subproperties ) );
-    CCHLOGSTRING2( "CCH: iSettings->FindSubServicePropertiesL err: %d" , err );
-    for ( TInt i( 0 ); i < subproperties.Count(); i++ )
-        {
-        // Read subservice's Id
-        if ( propertyName == subproperties[ i ]->GetName() )
-            {                
-            TInt id( 0 );
-            subproperties[ i ]->GetValue( id );
-            aId = id;
-            i = subproperties.Count();               
-            }
-        }    
-    
-    subproperties.ResetAndDestroy( );
-    CleanupStack::PopAndDestroy( &subproperties );
-    }
         
 // ---------------------------------------------------------------------------
 // CCCHSPSHandler::LoadAtStartUpL
@@ -425,6 +317,8 @@
     TCCHSubserviceType aType,
     TBool& aEnabled ) const
     {
+    CCHLOGSTRING2( "CCCHSPSHandler::LoadAtStartUpL: aType %d", aType );   
+    
     
     TSPItemType propertyType( EItemTypeNotDefined );
     TServicePropertyName propertyName( EPropertyUnknown );
@@ -450,6 +344,8 @@
         }    
     subproperties.ResetAndDestroy( );
     CleanupStack::PopAndDestroy( &subproperties );
+    
+    CCHLOGSTRING2( "CCCHSPSHandler::LoadAtStartUpL: aEnabled %d", aEnabled );  
     }
 
 // ---------------------------------------------------------------------------
@@ -461,7 +357,7 @@
     const TCCHSubserviceType aType,
     const TBool aOnOff ) const
     {
-       
+    CCHLOGSTRING2( "CCCHSPSHandler::SetLoadAtStartUpL: aType %d", aType );      
     CCHLOGSTRING2( "CCCHSPSHandler::SetLoadAtStartUpL: aOnOff %d", aOnOff );   
     TSPItemType propertyType( EItemTypeNotDefined );
     TServicePropertyName propertyName( EPropertyUnknown );
@@ -573,8 +469,11 @@
             {
             CCHLOGSTRING( "Subservice: EPropertyIMSubServicePluginId" );
             
-            // Until further notice IM property is always valid
-            valid = ETrue;
+            valid = KErrNone != iSettings->FindPropertyL( aServiceId, 
+                ESubPropertyIMSettingsId, *property ) ? EFalse :
+                    KErrNone == property->GetValue( propertyId );
+            
+            CCHLOGSTRING2( "CCH:     property id: %d" , propertyId );
             break;
             }
         case EPropertyVMBXSubServicePluginId:
@@ -591,7 +490,7 @@
         default:
             {
             // Let other properties go through
-            valid = ETrue;
+            valid = EFalse;
             break;
             }
         }
--- a/convergedconnectionhandler/cchserver/src/cchuihandler.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchuihandler.cpp	Tue May 11 16:04:22 2010 +0300
@@ -244,16 +244,8 @@
 void CCchUIHandler::CheckGprsFirstUsageL( )
     { 
     CCHLOGSTRING( "CCchUIHandler::CheckGprsFirstUsageL - IN" );
-    
-    // Check value from cenrep
-    TInt gprsRoamingCostWarningShown( 0 );
-    
-    User::LeaveIfError( iCchRepository->Get( 
-        KCCHGprsRoamingCostWarningShown, 
-        gprsRoamingCostWarningShown ) );
-    
     // Show gprs roaming cost warning note if not already shown
-    if( !gprsRoamingCostWarningShown )
+    if( !IsCostWarningSeen() )
         {
         iNoteHandler->LaunchGlobalNoteL( 
             R_QTN_SERVTAB_ALLOW_GPRS_WHEN_ROAMING_QUERY, 
@@ -265,6 +257,22 @@
     }
 
 // ---------------------------------------------------------------------------
+// CCchUIHandler::IsCostWarningSeen
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//      
+TBool CCchUIHandler::IsCostWarningSeen() const
+    {
+    TBool response( EFalse );
+    TInt costWarning( KErrNone );
+    iCchRepository->Get( KCCHGprsRoamingCostWarningShown, costWarning );
+
+    response = 1 == costWarning;
+    CCHLOGSTRING2( "CCchUIHandler::IsCostWarningSeen : %d", response );
+    return response;
+    }
+
+// ---------------------------------------------------------------------------
 // CCchUIHandler::NetworkConnectionsAllowed
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------
--- a/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxengine.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxengine.cpp	Tue May 11 16:04:22 2010 +0300
@@ -65,8 +65,6 @@
 _LIT8( KMessageAccount8, "message-account" );
 _LIT8( KVoiceMessage8, "voice-message" );
 _LIT8( KSlash8, "/" );
-_LIT8( KLParen8, "(" );
-_LIT8( KRParen8, ")" );
 _LIT8( KColon8, ":" );
 _LIT8( KCrlf8, "\r\n" );
 _LIT8( KEndLine8, "\n" );
@@ -195,9 +193,10 @@
     User::LeaveIfError( mwiAddress->GetValue( ptrvoiceMailUri16 ) );
     if ( ptrvoiceMailUri16.Length() < KMinIpVoiceMailBoxUriLength )
         {
+        IPVMEPRINT( "CIpVmbxEngine::SubscribeProfileL - MWI not found, Leaving..." );
         User::Leave( KErrNotFound );
         }
-    IPVMEPRINT( "CIpVmbxEngine::MWI found" );
+    IPVMEPRINT( "CIpVmbxEngine::SubscribeProfileL - MWI found" );
     if ( KErrNotFound == ptrvoiceMailUri16.Find( KSipString ) )
         {
         ptrvoiceMailUri16.Insert( 0, KSipString );
@@ -360,6 +359,7 @@
         {
         // protocol test fix, new message should not be created
         // if new message count is 0
+        IPVMEPRINT( "CIpVmbxEngine::EventReceivedL - No new messages" );
         createSMS = EFalse;
         }
     if ( 0 == ptrFrom8.Length() )
@@ -388,11 +388,13 @@
     if ( totalMsgs != curTotal || newMsgs != curNew )
         {
         statusChanged = ETrue;
+        IPVMEPRINT( "CIpVmbxEngine::EventReceivedL - Status changed" );
         subscription->SetAccountMessageCount( totalMsgs, newMsgs );
         }
 
     if ( createSMS && statusChanged )
         {
+        IPVMEPRINT( "CIpVmbxEngine::EventReceivedL - Create message body" );
         TBuf8< KSmsLength > messageBody8;
         CreateMessageBodyL(
             *content8,
@@ -610,7 +612,11 @@
     TDes8& aNewMessages8,
     TDes8& aFrom8 ) const
     {
-    IPVMEPRINT( "CIpVmbxEngine::ParseNotifyContentL - IN" );
+#ifdef _DEBUG
+    TBuf<128> tmpStr;
+    tmpStr.Copy( aContent8 );
+    IPVMEPRINT2( "CIpVmbxEngine::ParseNotifyContentL - aContent8:%S", &tmpStr )
+#endif // _DEBUG
     aCreateSms = EFalse;
 
     // check required content
@@ -642,6 +648,7 @@
         }
     else
         {
+        IPVMEPRINT( "CIpVmbxEngine::ParseNotifyContentL - leave with KErrCorrupt" );
         // malformed critical part of message
         User::Leave( KErrCorrupt );
         }
@@ -651,6 +658,7 @@
         // both optionals found
         if ( !( atPosAccount < atPosMessage ) )
             {
+            IPVMEPRINT( "CIpVmbxEngine::ParseNotifyContentL - leave with KErrCorrupt 2" );
             // incorrect format
             User::Leave( KErrCorrupt );
             }
@@ -659,6 +667,7 @@
     if ( KErrNotFound != atPosAccount && aCreateSms )
         {
         // get account
+        IPVMEPRINT( "CIpVmbxEngine::ParseNotifyContentL - get account" );
         messagePtr8.Set( FetchMessagePartL( posPtr8 ) );
         analyzer8.Assign(
             messagePtr8.Mid( messagePtr8.Find( KColon8 ) + KOneChar ) );
@@ -670,7 +679,7 @@
         aFrom8.Copy( dataPtr8.Left( aFrom8.MaxLength() ) );
         }
 
-    if ( KErrNotFound != atPosMessage && aCreateSms )
+    if ( KErrNotFound != atPosMessage )
         {
         messagePtr8.Set( FetchMessagePartL( posPtr8 ) );
         analyzer8.Assign(
@@ -688,28 +697,7 @@
 
         analyzer8.SkipSpace();
         User::LeaveIfError( analyzer8.Val( oldMessageCount ) );
-        // save result here because of leaving parts above
-        aNewMessages8.Num( newMessageCount );
-        // result saved here in case of leave from optional parsing of optional part below
-        aTotalMessages8.Num( ( TInt64 ) oldMessageCount +  ( TInt64 ) newMessageCount );
 
-        analyzer8.SkipSpace();
-        if ( KErrNotFound != KLParen8().Locate( analyzer8.Get() ) )
-            {
-            // urgent messages found
-            TUint urgentNew = 0;
-            TUint urgentOld = 0;
-            User::LeaveIfError( analyzer8.Val( urgentNew ) );
-            analyzer8.SkipSpace();
-            User::LeaveIfError( KSlash8().Locate( analyzer8.Get() ) );
-
-            User::LeaveIfError( analyzer8.Val( urgentOld ) );
-            newMessageCount += urgentNew;
-            oldMessageCount += urgentOld;
-            analyzer8.SkipSpace();
-            User::LeaveIfError( KRParen8().Locate( analyzer8.Get() ) );
-            }
-        // save status again, might have updated
         aNewMessages8.Num( newMessageCount );
         aTotalMessages8.Num( ( TInt64 ) oldMessageCount + ( TInt64 ) newMessageCount );
 
--- a/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxeventmonitor.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/voipplugins/sipconnectionprovider/ipvoicemailengine/src/ipvmbxeventmonitor.cpp	Tue May 11 16:04:22 2010 +0300
@@ -113,7 +113,7 @@
     CMceEvent& aEvent,
     TMceTransactionDataContainer* /*aContainer*/ )
     {
-    IPVMEPRINT( "CIpVmbxEventMonitor::NotifyReceived" );
+    IPVMEPRINT( "CIpVmbxEventMonitor::NotifyReceived - IN" );
     CMceEvent::TState eventState( CMceEvent::EIdle );
     eventState = aEvent.State();
     TBool firstNotify = EFalse;
@@ -136,6 +136,7 @@
                     {
                     
                     subscription->SetStateRegistered();
+                    IPVMEPRINT( "CIpVmbxEventMonitor::NotifyReceived - firstNotify" );
                     firstNotify = ETrue;
                     }
     
@@ -151,15 +152,14 @@
                         message = CIpVmbxEngine::EEngineSmsError;
                         }
                     }
-                else 
-                    if ( firstNotify )
-                        {
-                        message = CIpVmbxEngine::EEngineSubscribed;
-                        }
-                    else
-                        {
-                        message = CIpVmbxEngine::EEngineUndefined;
-                        }
+                else if ( firstNotify )
+                    {
+                    message = CIpVmbxEngine::EEngineSubscribed;
+                    }
+                else
+                    {
+                    message = CIpVmbxEngine::EEngineUndefined;
+                    }
                 }
                 break;
             case CMceEvent::ETerminated:
--- a/voipplugins/sipconnectionprovider/src/scpservicehandlerbase.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/voipplugins/sipconnectionprovider/src/scpservicehandlerbase.cpp	Tue May 11 16:04:22 2010 +0300
@@ -197,19 +197,9 @@
 //
 void CScpServiceHandlerBase::HandleSipProfileForcedDisable()
     {
-    SCPLOGSTRING2( "CScpServiceHandlerBase[0x%x]::HandleSipProfileForcedDisable",
-                   this );
+    SCPLOGSTRING2( 
+        "CScpServiceHandlerBase[0x%x]::HandleSipProfileForcedDisable", this );
 
-    CScpProfileHandler& profileHandler = iSubService.ProfileHandler();
-    
-    CScpSipConnection* sipConnection = 
-        profileHandler.GetSipConnection( iSubService.SipProfileId() );
-      
-    if ( sipConnection )
-        {
-        sipConnection->ForceDisable();
-        }
-    
     HandleSipConnectionEvent( iSubService.SipProfileId(), EScpDeregistered );
     }
 
--- a/voipplugins/voipadapters/dmvoipadapter/src/nsmldmvoipadapter.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/voipplugins/voipadapters/dmvoipadapter/src/nsmldmvoipadapter.cpp	Tue May 11 16:04:22 2010 +0300
@@ -1012,7 +1012,7 @@
     presenceId.SetAccessTypesL( accessTypesGetReplaceAdd );
     presenceId.SetOccurenceL( MSmlDmDDFObject::EZeroOrOne );
     presenceId.SetScopeL( MSmlDmDDFObject::EDynamic );
-    presenceId.SetDFFormatL( MSmlDmDDFObject::EInt );
+    presenceId.SetDFFormatL( MSmlDmDDFObject::EChr );
     presenceId.AddDFTypeMimeTypeL( KNSmlDMVoIPTextPlain );
     presenceId.SetDescriptionL( KNSmlDMVoIPPresenceSettingsIdExp );