Revision: 201010 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:45:06 +0200
branchRCL_3
changeset 15 fc69e1e37771
parent 14 7ef16719d8cb
child 16 fe8b59ab9fa0
Revision: 201010 Kit: 201010
telephonyprotocols/pdplayer/inc/PDPCPRFactory.h
telephonyprotocols/pdplayer/inc/PDPProvision.h
telephonyprotocols/pdplayer/inc/PDPSCPRFactory.h
telephonyprotocols/pdplayer/inc/PDPSCPRStates.h
telephonyprotocols/pdplayer/inc/pdp.hrh
telephonyprotocols/pdplayer/inc/pdpmcpr.h
telephonyprotocols/pdplayer/inc/pdpmcprfactory.h
telephonyprotocols/pdplayer/inc/pdptiermanagerfactory.h
telephonyprotocols/pdplayer/src/102822EF.rss
telephonyprotocols/pdplayer/src/PDPConfig.cpp
telephonyprotocols/pdplayer/src/PDPSCPRStates.cpp
telephonyprotocols/pdplayer/src/mbmsengine.cpp
telephonyprotocols/pdplayer/src/pdpmcpr.cpp
telephonyprotocols/pdplayer/src/pdptiermanager.cpp
telephonyprotocols/pdplayer/src/psdavailabilitylistener.cpp
telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp
telephonyprotocols/pdplayer/umts/test/te_spud/src/SpudUnitTestStepBase.cpp
telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide.ini
telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide_config_9x.txt
telephonyprotocols/pdplayer/umts/test/te_spudRSubConn/src/te_spudRSubConnSteps.cpp
telephonyprotocols/rawipnif/data/epocrawip.ini
telephonyprotocols/rawipnif/data/replaceepocrawipini.bat
telephonyprotocols/rawipnif/group/BLD.INF
telephonyprotocols/rawipnif/group/RawIpNif.iby
telephonyprotocols/rawipnif/inc/BcaController.h
telephonyprotocols/rawipnif/inc/BcaIoController.h
telephonyprotocols/rawipnif/inc/Constants.h
telephonyprotocols/rawipnif/src/BcaController.cpp
telephonyprotocols/rawipnif/src/BcaIoController.cpp
telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmphonebookstoretsy.h
telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp
telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_phoneidentity_individual.script
telephonyserverplugins/common_tsy/test/component/src/cctsynetworkcontrolfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyphoneidentityfu.cpp
telephonyserverplugins/common_tsy/test/component/testdata/TestGetPhoneId0001f.ini
telephonyserverplugins/common_tsy/test/integration/group/integration_test.pkg
telephonyserverplugins/common_tsy/test/integration/group/te_ctsyintegrationtestsuite.iby
telephonyserverplugins/common_tsy/test/integration/inc/cctsyinidata.h
telephonyserverplugins/common_tsy/test/integration/inc/cctsyintegrationtestsmsmessaging.h
telephonyserverplugins/common_tsy/test/integration/inc/tnetworktsytesthelper.h
telephonyserverplugins/common_tsy/test/integration/scripts_implemented/te_ctsyintegration_customapi_auto.script
telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestcallwaiting.cpp
telephonyserverplugins/common_tsy/test/integration/src/tnetworktsytesthelper.cpp
telephonyserverplugins/common_tsy/test/integration/src/tpacketservicetsytesthelper.cpp
telephonyserverplugins/common_tsy/test/integration/testdata/ctsyintegration_ntn_data.ini
telephonyserverplugins/common_tsy/test/integration/testdata/testexecute.ini
telephonyserverplugins/simtsy/inc/CSimCallForwarding.h
telephonyserverplugins/simtsy/src/CSimCallForwarding.cpp
telephonyserverplugins/simtsy/src/CSimPhone.cpp
telephonyserverplugins/simtsy/test/Te_SimNetwork/Te_SimNetwork_config.txt
--- a/telephonyprotocols/pdplayer/inc/PDPCPRFactory.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPCPRFactory.h	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 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"
@@ -25,11 +25,12 @@
 
 #include <comms-infras/ss_connprov.h>
 #include <ss_fact.h>
+#include "pdp.hrh"
 
 class CPDPConnectionProviderFactory : public ESock::CConnectionProviderFactoryBase
 	{
 public:
-    enum { iUid = 0x102822E2 };
+    enum { iUid = PDPCprImplUid };
 	static CPDPConnectionProviderFactory* NewL(TAny* aParentContainer);
 
 protected:
--- a/telephonyprotocols/pdplayer/inc/PDPProvision.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPProvision.h	Mon Mar 15 12:45:06 2010 +0200
@@ -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"
@@ -30,6 +30,7 @@
 #include <etelqos.h>
 #include <comms-infras/metadata.h>
 #include <metadatabase.h>		// TMDBElementId
+#include "pdp.hrh"
 
 namespace ESock 
 	{
@@ -45,7 +46,7 @@
 public:
     enum 
     {
-    EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
+    EUid = PDPScprImplUid,  //Same as PDPSCPR, who's gonna use it.
     ETypeId = 1,
     };
 	
@@ -88,7 +89,7 @@
 public:
     enum 
     {
-    EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
+    EUid = PDPScprImplUid,  //Same as PDPSCPR, who's gonna use it.
     ETypeId = 2,
     };
     
@@ -111,7 +112,7 @@
 public:
     enum 
     {
-    EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
+    EUid = PDPScprImplUid,  //Same as PDPSCPR, who's gonna use it.
     ETypeId = 3,
     };
 	static CDefaultPacketQoSProvision* NewL(ESock::CCommsDatIapView* aIapView);
@@ -132,7 +133,7 @@
 public:
     enum 
     {
-    EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
+    EUid = PDPScprImplUid,  //Same as PDPSCPR, who's gonna use it.
     ETypeId = 4,
     };
 	static CImsExtProvision* NewLC(ESock::CCommsDatIapView* aIapView);
--- a/telephonyprotocols/pdplayer/inc/PDPSCPRFactory.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPSCPRFactory.h	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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,11 +24,12 @@
 #define SYMBIAN_PDPSCPR_FACTORY_H
 
 #include <comms-infras/ss_subconnprov.h>
+#include "pdp.hrh"
 
 class CPDPSubConnectionProviderFactory : public ESock::CSubConnectionProviderFactoryBase
 	{
 public:
-    enum { iUid = 0x102822E0 };
+    enum { iUid = PDPScprImplUid };
 	static CPDPSubConnectionProviderFactory* NewL(TAny* aParentContainer);
 
 protected:
--- a/telephonyprotocols/pdplayer/inc/PDPSCPRStates.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPSCPRStates.h	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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"
@@ -102,7 +102,8 @@
 //Provision
 //-=========================================================
 DECLARE_SMELEMENT_HEADER( TSelfInit, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, PDPSCprStates::TContext)
-	virtual void DoL();
+	virtual void SetupProvisionCfgL();
+    virtual void DoL();
 DECLARE_SMELEMENT_FOOTER( TSelfInit)
 
 DECLARE_AGGREGATED_TRANSITION2(
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/inc/pdp.hrh	Mon Mar 15 12:45:06 2010 +0200
@@ -0,0 +1,65 @@
+// 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"
+// 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:
+// PDP Connection Provider class definition.
+// 
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef __PDP_HRH__
+#define __PDP_HRH__
+
+// this is not exported because we don't want to encourage
+// anyone outside of CF to load these objects via ECOM.
+
+// ecom plugin dll uid
+#define PDPLayerDLLUid 0x102822EF
+
+// Tier Manager
+
+// ecom 3pc tier manager impl uid
+#define TierManagerInterfaceUid 0x10281DD7
+
+// ecom 3pc pdp tier manager impl uid
+#define PDPTierManagerImplUid 0x2001A35B
+
+// MCPR
+
+// ecom 3pc tier manager impl uid
+#define McprInterfaceUid 0x10274546
+
+// ecom 3pc pdp tier manager impl uid
+#define PDPMcprImplUid 0x102822F0
+
+// CPR
+
+// ecom 3pc tier manager impl uid
+#define CprInterfaceUid 0x102070EE
+
+// ecom 3pc pdp tier manager impl uid
+#define PDPCprImplUid 0x102822E2
+
+// SCPR
+
+// ecom 3pc tier manager impl uid
+#define ScprInterfaceUid 0x10204301
+
+// ecom 3pc pdp tier manager impl uid
+#define PDPScprImplUid 0x102822E0
+
+
+#endif
--- a/telephonyprotocols/pdplayer/inc/pdpmcpr.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/pdpmcpr.h	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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"
@@ -63,6 +63,7 @@
 	
 protected:
     CPdpMetaConnectionProvider(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
+    void ConfigurePDPLayerL();
     void SetAccessPointConfigFromDbL();
     void FillInLCPConfig();
     void FillInAuthConfig();
--- a/telephonyprotocols/pdplayer/inc/pdpmcprfactory.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/pdpmcprfactory.h	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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,11 +24,12 @@
 #define SYMBIAN_PDPMCPR_FACTORY_H
 
 #include <comms-infras/ss_metaconnprov.h>
+#include "pdp.hrh"
 
 class CPdpMetaConnectionProviderFactory : public ESock::CMetaConnectionProviderFactoryBase
 	{
 public:
-    enum { iUid = 0x102822F0 };
+    enum { iUid = PDPMcprImplUid };
 	static CPdpMetaConnectionProviderFactory* NewL(TAny* aParentContainer);
 
 protected:
--- a/telephonyprotocols/pdplayer/inc/pdptiermanagerfactory.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/pdptiermanagerfactory.h	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 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"
@@ -22,10 +22,12 @@
 #define SYMBIAN_PDPTIERMANAGERFACTORY_H
 
 #include <comms-infras/ss_tiermanager.h>
+#include "pdp.hrh"
+
 class CPDPTierManagerFactory : public ESock::CTierManagerFactoryBase
 	{
 public:
-    enum { EUid = 0x2001A35B };
+    enum { EUid = PDPTierManagerImplUid };
 	static CPDPTierManagerFactory* NewL(TAny* aParentContainer);
 
 protected:
--- a/telephonyprotocols/pdplayer/src/102822EF.rss	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/102822EF.rss	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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"
@@ -20,20 +20,22 @@
 */
 
 #include <ecom/registryinfo.rh>
+#include "pdp.hrh"
 
 RESOURCE REGISTRY_INFO theInfo
 {
-dll_uid =  0x102822EF;
+dll_uid =  PDPLayerDLLUid;
+
 interfaces = 
     {
     INTERFACE_INFO
         {
-        interface_uid =  0x10281DD7;
+        interface_uid =  TierManagerInterfaceUid;
         implementations =
             {
            IMPLEMENTATION_INFO
                 {
-                implementation_uid = 0x2001A35B;
+                implementation_uid = PDPTierManagerImplUid;
                 version_no = 1;
                 display_name = "PDP Tier Manager";
                 default_data = "PDPTierManager";
@@ -44,12 +46,12 @@
 
     INTERFACE_INFO
         {
-        interface_uid =  0x10274546;
+        interface_uid =  McprInterfaceUid;
         implementations = 
             {
            IMPLEMENTATION_INFO
                 {
-                implementation_uid = 0x102822F0;
+                implementation_uid = PDPMcprImplUid;
                 version_no = 1;
                 display_name = "PDP Meta Connection Provider Factory";
                 default_data = "PDPMCprFactory";
@@ -60,12 +62,12 @@
 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
     INTERFACE_INFO
         {
-        interface_uid = 0x102070EE;
+        interface_uid = CprInterfaceUid;
         implementations = 
             {
            IMPLEMENTATION_INFO
                 {
-                implementation_uid = 0x102822E2;
+                implementation_uid = PDPCprImplUid;
                 version_no = 1;
                 display_name = "PDP Connection Provider Factory";
                 default_data = "PDPConnProvdFactory";
@@ -76,12 +78,12 @@
 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
     INTERFACE_INFO
         {
-        interface_uid = 0x10204301;
+        interface_uid = ScprInterfaceUid;
         implementations = 
             {
            IMPLEMENTATION_INFO
                 {
-                implementation_uid = 0x102822E0;
+                implementation_uid = PDPScprImplUid;
                 version_no = 1;
                 display_name = "PDP Sub-Connection Provider Factory";
                 default_data = "PdpSubConnectionProviderFactory";
--- a/telephonyprotocols/pdplayer/src/PDPConfig.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/PDPConfig.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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"
@@ -337,6 +337,9 @@
 	if (!fromServer)
 	    {
     	aIapView->GetTextL(KCDTIdWCDMAIPAddr | KCDTIdOutgoingGprsRecord, buf);
+    	TInetAddr addr;
+    	User::LeaveIfError(addr.Input(*buf));
+    	// sending ASCII to MA but checking the validity of the address above.
     	aPdpAddress.Copy(*buf);
     	delete buf;
     	buf = NULL;
@@ -363,10 +366,15 @@
     	if (!fromServer)
     	    {
     	    aIapView->GetTextL(KCDTIdWCDMAIPNameServer1 | KCDTIdOutgoingGprsRecord, buf);
+            TInetAddr addr;
+            User::LeaveIfError(addr.Input(*buf));
+            // sending ASCII to MA but checking the validity of the address above.
     	    aDns1.Copy(*buf);
         	delete buf;
         	buf = NULL;
     	    aIapView->GetTextL(KCDTIdWCDMAIPNameServer2 | KCDTIdOutgoingGprsRecord, buf);
+    	    User::LeaveIfError(addr.Input(*buf));
+            // sending ASCII to MA but checking the validity of the address above.
         	aDns2.Copy(*buf);
     	    delete buf;
         	buf = NULL;
@@ -379,10 +387,15 @@
     	if (!fromServer)
     	    {
     	    aIapView->GetTextL(KCDTIdWCDMAIP6NameServer1 | KCDTIdOutgoingGprsRecord, buf);
-    	    aDns1.Copy(*buf);
+            TInetAddr addr;
+            User::LeaveIfError(addr.Input(*buf));
+            // sending ASCII to MA but checking the validity of the address above.
+            aDns1.Copy(*buf);
     	    delete buf;
     		buf = NULL;
     	    aIapView->GetTextL(KCDTIdWCDMAIP6NameServer2 | KCDTIdOutgoingGprsRecord, buf);
+            User::LeaveIfError(addr.Input(*buf));
+            // sending ASCII to MA but checking the validity of the address above.
           	aDns2.Copy(*buf);
         	delete buf;
             buf = NULL;
--- a/telephonyprotocols/pdplayer/src/PDPSCPRStates.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/PDPSCPRStates.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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"
@@ -175,9 +175,97 @@
 //Provisioning
 //-=========================================================
 DEFINE_SMELEMENT(TSelfInit, NetStateMachine::MStateTransition, PDPSCprStates::TContext)
+// This is should be revisited in future releases, basic idea is that information
+// that can be modified should have a visibility that is to that node's
+// level and not further (i.e. changes here will affect this connection
+// only, not every connection that uses this MCPR)
+//      MCPR - AccessPointConfig() contains information that is used by
+//             all connections under that MCPR and is unchanging
+//       CPR - Again for all connections under that CPR and is unchanging
+//      SCPR - Connection specific information (i.e. can change and does change)
+//        DC - No point - just reads information.
+// Here we've moved basically all of the configuration information that was in
+// the MCPR [that could be moved] this is because some of it changes / is overwritten
+// with information that comes out of etel/modem.  This also has the added benefit of
+// freeing up memory in cases where the connection is torn down but the MCPR lies 
+// around for availability purposes.  In the future, this code (or something like it)
+// should be moved into the PDP.CPR when it exists.
+
+void TSelfInit::SetupProvisionCfgL()
+    {
+    CPDPSubConnectionProvider &tNode = static_cast<CPDPSubConnectionProvider&>(iContext.Node());
+    
+    const TProviderInfoExt* providerInfoExt = static_cast<const TProviderInfoExt*>(tNode.AccessPointConfig().FindExtension(
+            STypeId::CreateSTypeId(TProviderInfoExt::EUid, TProviderInfoExt::ETypeId)));
+    
+    // this should always be here, however, a bit of defensive programming
+    // never hurt..
+    if (providerInfoExt == NULL)
+        {
+        User::Leave(KErrCorrupt);
+        }
+    
+    RMetaExtensionContainer mec;
+    mec.Open(tNode.AccessPointConfig());
+    CleanupClosePushL(mec);
+
+    CCommsDatIapView* iapView = CCommsDatIapView::NewLC(providerInfoExt->iProviderInfo.APId());
+  
+    mec.AppendExtensionL(CIPConfig::NewFromGPRSOutLC(iapView));
+    CleanupStack::Pop();
+
+    mec.AppendExtensionL(CBCAProvision::NewLC(iapView));
+    CleanupStack::Pop();
+
+    mec.AppendExtensionL(CImsExtProvision::NewLC(iapView));
+    CleanupStack::Pop();
+    
+    CGPRSProvision* gprsProvision = CGPRSProvision::NewLC(iapView);
+    mec.AppendExtensionL(gprsProvision);
+    CleanupStack::Pop(gprsProvision);
+    
+    //It's not legal for the qos defaults to be absent.
+    CDefaultPacketQoSProvision* defaultQoS = NULL;
+    TRAPD(ret, defaultQoS = CDefaultPacketQoSProvision::NewL(iapView));   
+    if ((KErrNone == ret) && defaultQoS)           
+        {
+        CleanupStack::PushL(defaultQoS);
+        mec.AppendExtensionL(defaultQoS);
+        CleanupStack::Pop(defaultQoS);
+        }
+    else
+        {
+        if (KErrNoMemory == ret)
+            {
+            User::Leave(KErrNoMemory);
+            }
+        else
+            {
+            User::Leave(KErrCorrupt);
+            }          
+        }    
+    
+    CRawIpAgentConfig* rawIpAgentConfig = CRawIpAgentConfig::NewLC(iapView, &gprsProvision->GetScratchContextAs<TPacketDataConfigBase>());
+    mec.AppendExtensionL(rawIpAgentConfig);
+    CleanupStack::Pop();
+    
+    CleanupStack::PopAndDestroy();          // CloseIapView();  
+    tNode.AccessPointConfig().Close();
+    tNode.AccessPointConfig().Open(mec);
+    CleanupStack::PopAndDestroy(&mec); 
+    }
+
 void TSelfInit::DoL()
     {
     CPDPSubConnectionProvider &tNode = static_cast<CPDPSubConnectionProvider&>(iContext.Node());
+
+    TRAP(tNode.iProvisionFailure,SetupProvisionCfgL());
+
+    // Don't want any failure here to be masked by successful configuration later on.
+    // A leave here will not cause a roll back of the connection but it will show an
+    // Error -> message in the SVG diagram.  The provision failure error code will 
+    // cause the connection rollback.
+    User::LeaveIfError(tNode.iProvisionFailure);
     
     // if the FSM interface is null, this means that we're initializing a secondary context
     // as this code is common for both
--- a/telephonyprotocols/pdplayer/src/mbmsengine.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/mbmsengine.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -286,7 +286,7 @@
 	//Open phone
 	User::LeaveIfError(iPhone.Open(iTelServer,iPhoneInfo.iName));
 	//Get phone status
-	iPhone.GetStatus(iPhoneStatus);
+	User::LeaveIfError(iPhone.GetStatus(iPhoneStatus));
 
 	SetActive();
 	iPhoneState = EInitialising;
--- a/telephonyprotocols/pdplayer/src/pdpmcpr.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/pdpmcpr.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// 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"
@@ -30,6 +30,7 @@
 #include "pdpmcprstates.h"
 #include "PDPProvision.h"
 #include "psdavailabilitylistener.h"
+#include "pdp.hrh"
 
 using namespace Messages;
 using namespace MeshMachine;
@@ -106,7 +107,43 @@
 void CPdpMetaConnectionProvider::ConstructL()
     {
     CAgentMetaConnectionProvider::ConstructL();
-    SetAccessPointConfigFromDbL();
+    
+    const TLayerConfig* layerCfg = static_cast<const TLayerConfig*>(AccessPointConfig().FindExtension(
+        STypeId::CreateSTypeId(TLayerConfig::EUid,TLayerConfig::ETypeId)));
+
+    // defensive programming.  If the layer cfg isn't here
+    // then this is really corrupt.
+    
+    if (layerCfg == NULL)
+        {
+        User::Leave(KErrCorrupt);
+        }
+    
+    // these constants and all of the implementation ids should be in a header file
+    // and included in the .rss / ecom files.
+    
+    // Any layer that uses an outbound PDP.SCPR will have information that is overwritten by
+    // the network (for example, negotiated parameters), this configuration information is 
+    // local to the connection and should not be created here.  So this check is to ensure 
+    // that legacy behaviour is maintained for any layer that uses this MCPR but not a 
+    // PDP.SCPR.  But the PDP.SCPR behaviour has been modified to create the information
+    // that is local to that connection.
+    
+    if (layerCfg->SCprUid().iUid == PDPScprImplUid)
+        {
+        // the PDP layer MCPR is being used in conjunction with a PDP.SCPR
+        // in this case we can rightly assume that the PDP.SCPR will create
+        // the access point config for that connection.
+        // code from the PDP.SCPR will need to be moved into the PDP.CPR when
+        // that component becomes available for use.
+        ConfigurePDPLayerL();
+        }
+    else
+        {
+        // non-PDP.SCPR specific behaviour
+        // this is legacy for any layers that are constructed expecting the previous behaviour
+        SetAccessPointConfigFromDbL();
+        }
     }
 
 CPdpMetaConnectionProvider::CPdpMetaConnectionProvider(CMetaConnectionProviderFactoryBase& aFactory, const TProviderInfo& aProviderInfo)
@@ -133,6 +170,38 @@
     User::LeaveIfError(ctx.iReturn);
 	}
 
+
+void CPdpMetaConnectionProvider::ConfigurePDPLayerL()
+    {
+    RMetaExtensionContainer mec;
+    mec.Open(AccessPointConfig());
+    CleanupClosePushL(mec);
+    
+    CCommsDatIapView* iapView = OpenIapViewLC();
+
+
+    mec.AppendExtensionL(CTSYProvision::NewLC(iapView));
+    CleanupStack::Pop();
+
+    mec.AppendExtensionL(CPppLcpConfig::NewLC(iapView));
+    CleanupStack::Pop();
+    mec.AppendExtensionL(CPppAuthConfig::NewLC(iapView));
+    CleanupStack::Pop();
+
+    CPppProvisionInfo* agentProvision = new (ELeave) CPppProvisionInfo;
+    CleanupStack::PushL(agentProvision);
+    agentProvision->SetIsDialIn(KErrNotSupported);
+    agentProvision->SetNotificationData(NULL);
+    mec.AppendExtensionL(agentProvision);
+    CleanupStack::Pop(agentProvision);
+
+    CleanupStack::PopAndDestroy();          // CloseIapView();
+
+    iAccessPointConfig.Close();
+    iAccessPointConfig.Open(mec);
+    CleanupStack::PopAndDestroy(&mec);
+    }
+
 void CPdpMetaConnectionProvider::SetAccessPointConfigFromDbL()
     {
     RMetaExtensionContainer mec;
--- a/telephonyprotocols/pdplayer/src/pdptiermanager.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/pdptiermanager.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -287,7 +287,7 @@
 	{
 	iContextName.Copy(aContextName);
 	User::LeaveIfError(iPacketContext.OpenExistingContext(iPacketService, iContextName));
-	iPacketContext.GetStatus(iContextStatus);
+	User::LeaveIfError(iPacketContext.GetStatus(iContextStatus));
 
 	if (iContextStatus == RPacketContext::EStatusDeleted)
 		{
--- a/telephonyprotocols/pdplayer/src/psdavailabilitylistener.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/psdavailabilitylistener.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -196,7 +196,7 @@
 	User::LeaveIfError(iPhone.Open(iTelServer, phoneInfo.iName));
 
 	RPhone::TStatus phoneStatus;
-	iPhone.GetStatus(phoneStatus);
+	User::LeaveIfError(iPhone.GetStatus(phoneStatus));
 
 	if(phoneStatus.iMode==RPhone::EModeUnknown)
 		{
--- a/telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1102,7 +1102,10 @@
 		
 		case EActivateStep:
 			{
-            aContext.PacketContext().GetStatus(aContext.ContextStatus());
+            if (aContext.PacketContext().GetStatus(aContext.ContextStatus()) != KErrNone)
+                {
+                aContext.ContextStatus() = RPacketContext::EStatusInactive;
+                }
             
             switch (aContext.ContextStatus())
             	{
--- a/telephonyprotocols/pdplayer/umts/test/te_spud/src/SpudUnitTestStepBase.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spud/src/SpudUnitTestStepBase.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -574,7 +574,7 @@
 	RPacketContext::TContextStatus contextStatus1 = RPacketContext::EStatusUnknown;
 
 	aPacketContext.NotifyStatusChange(status, contextStatus);
-	aPacketContext.GetStatus(contextStatus1);
+	TEST(aPacketContext.GetStatus(contextStatus1) == KErrNone);
 	INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForGivenContextStatus: contextStatus1 = %d"), contextStatus1);
 	if (contextStatus1 != RPacketContext::EStatusDeleted)
 		{
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide.ini	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide.ini	Mon Mar 15 12:45:06 2010 +0200
@@ -424,7 +424,7 @@
 [PrimaryActivationEndUpWithInactiveContext3]
 SimTsyTestNum = 105
 PrimaryIapId1 = 2
-PrimaryActivationErr1 = -65536
+PrimaryActivationErr1 = -2
 
 [PrimaryActivationEndUpWithInactiveContext4]
 SimTsyTestNum = 106
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide_config_9x.txt	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide_config_9x.txt	Mon Mar 15 12:45:06 2010 +0200
@@ -2736,7 +2736,7 @@
 SetContextConfigGPRS = 0,Test,,0,2,0,1,RasUser,,,,,,1
 # TRel99ContextConfig = <TName iContextName>,  <TUint iActivatePause>, <TUint iActivateErrorCode>, <TUint iDeactivatePause>, 
 # <TUint iDeactivateErrorCode>, <TUint iDeletionPause>, <TUint iDeletionErrorCode> <TBool iConnectToNtRas>
-R99ContextConfig = PRIMARY1, 0, -401, 0, 0, 0, 0, 0
+R99ContextConfig = PRIMARY1, 0, -402, 0, 0, 0, 0, 0
 
 
 # TFTfilter = 0<id> 1<evaluationPrecedenceIndex> 2<srcAddr> 3<srcAddrSubnetMask>  4<protocolNumberOrNextHeader>
--- a/telephonyprotocols/pdplayer/umts/test/te_spudRSubConn/src/te_spudRSubConnSteps.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudRSubConn/src/te_spudRSubConnSteps.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -354,7 +354,11 @@
 TBool CSpudRSubConnTestStepBase::ApplyQoSParametersL(RSubConnection& aPdpContext)
 	{
 	TInt qosParamSet = 0;
-	ASSERT(GetIntFromConfig(ConfigSection(), _L("QoSParamSet"), qosParamSet));
+    if (!GetIntFromConfig(ConfigSection(), _L("QoSParamSet"), qosParamSet))
+        {
+        User::Leave(KErrNotFound);
+        }
+		
 	ASSERT(qosParamSet >= 0);
 
 	switch(qosParamSet)
@@ -774,7 +778,11 @@
 	WaitForCompletionL(peerStartReq, KErrNone, _L(">>>>>Starting PPP Peer for SPUD primary context"));
 
 	TInt stopTypeInt = -1;  
-	ASSERT(GetIntFromConfig(ConfigSection(), _L("StopType"), stopTypeInt));
+	if(!GetIntFromConfig(ConfigSection(), _L("StopType"), stopTypeInt))
+	    {
+        User::Leave(KErrNotFound);
+	    }
+		
 	RConnection::TConnStopType stopType = static_cast<RConnection::TConnStopType>(stopTypeInt);
 	INFO_PRINTF2(_L("Stopping Spud with stop type= %d (0 = EStopNormal, 1 = EStopAuthoritative)"), stopType);
 	ASSERT(RConnection::EStopNormal == stopType || RConnection::EStopAuthoritative == stopType);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/rawipnif/data/epocrawip.ini	Mon Mar 15 12:45:06 2010 +0200
@@ -0,0 +1,15 @@
+PlatSecDiagnostics ON
+PlatSecEnforcement ON 
+PlatSecProcessIsolation ON 
+PlatSecEnforceSysBin ON
+
+BTraceW32File r:\epoc32\winscw\c\logs\btrace.log
+BTrace0 0x00000008
+BTrace6 0x0000001c
+BTraceMode 3
+
+startupmode 1
+
+rawip_KMaxSendQueueLen 0x5
+rawip_KMaxTxIPPacketSize 0x5de
+rawip_KMaxRxIPPacketSize 0x7d2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/rawipnif/data/replaceepocrawipini.bat	Mon Mar 15 12:45:06 2010 +0200
@@ -0,0 +1,19 @@
+REM Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+REM All rights reserved.
+REM This component and the accompanying materials are made available
+REM under the terms of "Eclipse Public License v1.0"
+REM which accompanies this distribution, and is available
+REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
+REM
+REM Initial Contributors:
+REM Nokia Corporation - initial contribution.
+REM
+REM Contributors:
+REM
+REM Description:
+REM
+
+@echo off
+echo Replacing epoc.ini with rawip version
+copy epoc.ini epoc_backup.ini
+copy z\testdata\configs\epocrawip.ini %EPOC_INI%
\ No newline at end of file
--- a/telephonyprotocols/rawipnif/group/BLD.INF	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/group/BLD.INF	Mon Mar 15 12:45:06 2010 +0200
@@ -34,7 +34,11 @@
 
 RawIpNif.iby		/epoc32/rom/include/rawipnif.iby
 
+PRJ_TESTEXPORTS
 
+// epoc.ini alternative and batchfile for replacement
+../DATA/epocrawip.ini z:/testdata/configs/epocrawip.ini
+../DATA/replaceepocrawipini.bat z:/testdata/configs/replaceepocrawipini.bat
 PRJ_MMPFILES
 
 RawIPNif.mmp
--- a/telephonyprotocols/rawipnif/group/RawIpNif.iby	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/group/RawIpNif.iby	Mon Mar 15 12:45:06 2010 +0200
@@ -41,4 +41,16 @@
 
 #endif // _DEBUG
 
+#ifdef _ZERO_COPY_NETWORKING
+// patch data for CBcaController::BaseConstructL API
+patchdata rawip2.dll@KMaxSendQueueLen 0x5
+patchdata rawip2.dll@KMaxTxIPPacketSize 0x5de
+patchdata rawip2.dll@KMaxRxIPPacketSize 0x7d2
+#else
+// patch data for CBcaController::BaseConstructL API
+patchdata rawip.dll@KMaxSendQueueLen 0x5
+patchdata rawip.dll@KMaxTxIPPacketSize 0x5de
+patchdata rawip.dll@KMaxRxIPPacketSize 0x7d2
+#endif //_ZERO_COPY_NETWORKING
+
 #endif // __RAWIP_IBY__
--- a/telephonyprotocols/rawipnif/inc/BcaController.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/inc/BcaController.h	Mon Mar 15 12:45:06 2010 +0200
@@ -104,7 +104,8 @@
     MControllerObserver& iObserver;
 protected:
 	CBttLogger* iTheLogger;
-	TInt iMaxPacketSise;
+	TInt iMaxTxPacketSize;
+	TInt iMaxRxPacketSize;
 	
 private:
 	// Flow control flags
--- a/telephonyprotocols/rawipnif/inc/BcaIoController.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/inc/BcaIoController.h	Mon Mar 15 12:45:06 2010 +0200
@@ -214,7 +214,9 @@
 		/** Bca IAP is set*/
 		EIAPSet,
 		/** Bca stack is set*/
-		EBcaStackSet
+		EBcaStackSet,
+		/** Bca channel is open */
+		EBcaOpened
 		};
 	
 private:
--- a/telephonyprotocols/rawipnif/inc/Constants.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/inc/Constants.h	Mon Mar 15 12:45:06 2010 +0200
@@ -50,8 +50,10 @@
 	/** Bca in unkonwn State */
 	KBcaUnkownState,
 	/** BCA not exist*/
-	KBcaNotExist 	
-	};
+	KBcaNotExist,
+    /** BCA not exist*/
+    KBcaAlreadyExists
+    };
 
 
 const TUint16 KIp4FrameType = 0x21;
--- a/telephonyprotocols/rawipnif/src/BcaController.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/src/BcaController.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -22,16 +22,20 @@
 #include <e32uid.h>
 #include <nifmbuf.h>
 #include <es_ini.h>
+#include <e32svr.h>
+#include <u32hal.h>
 #include "BcaController.h"
 
-_LIT(KRawIpIniFile, "rawip.ini");
-_LIT(KLinkLit, "link");
-_LIT(KHighmarkLit, "highmark");
-_LIT(KPacketLit, "packet");
-_LIT(KMaxPacketSizeLit, "maxippacketsize");
 //In order not to flow off SPUD everytime we set the default to 1
 const TUint KDefaultBufferSize=1;
 
+#ifdef __EABI__
+// Patch data is used and KMaxTxIPPacketSize and KMaxRxIPPacketSize can be modified to a different value in RawIpNif.iby file
+extern const TInt KMaxSendQueueLen = KDefaultBufferSize;
+extern const TInt KMaxTxIPPacketSize = KMaxIPPacket + KIPTagHeaderLength;
+extern const TInt KMaxRxIPPacketSize = KMaxIPPacket + KIPTagHeaderLength;
+#endif
+
 CBcaController::CBcaController(MControllerObserver& aObserver,
 	CBttLogger* aTheLogger)
 /**
@@ -42,7 +46,7 @@
 	  iTxFlowControl(EFlowControlOff), 
 	  iTxContextActive(ETrue), 
 	  iSendState(EIdle),
-	  iMaxSendQueueLen(1),
+	  iMaxSendQueueLen(KDefaultBufferSize),
 	  iNumPacketsInSendQueue(0)
 	{
 	iSendQueue.Init();
@@ -66,35 +70,27 @@
 	{
 	_LOG_L1C1(_L8("CBcaController::BaseConstructL"));
 	
-	// Default value for the pakcket size
-	iMaxPacketSise = KMaxIPPacket + KIPTagHeaderLength;
-
 #ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
-	iIPTagHeader = new (ELeave) CIPTagHeader(iTheLogger);
+    iIPTagHeader = new (ELeave) CIPTagHeader(iTheLogger);
 #endif // RAWIP_HEADER_APPENDED_TO_PACKETS
-
-	CESockIniData* iniData = NULL;
-	TRAPD(res, iniData = CESockIniData::NewL(KRawIpIniFile));
-	CleanupStack::PushL(iniData);
-	
-	if(res!=KErrNone)
-		{
-		_LOG_L1C2(_L8("RawIp ini file %S not found. Default values will be used."), &KRawIpIniFile);
-		CleanupStack::PopAndDestroy();
-		return;
-		}
-	
-	//here process the file
-	if(!iniData->FindVar(KLinkLit(), KHighmarkLit(), iMaxSendQueueLen))
-		{
-		iMaxSendQueueLen = KDefaultBufferSize;
-		}
-	if(!iniData->FindVar(KPacketLit(), KMaxPacketSizeLit(), iMaxPacketSise))
-		{
-		iMaxPacketSise = KMaxIPPacket + KIPTagHeaderLength;
-		}
-	
-	CleanupStack::PopAndDestroy();
+    
+#if defined (__EABI__)
+    // Default value for queue length
+    iMaxSendQueueLen = KMaxSendQueueLen;
+	// Default value for Tx and Rx packet size
+	iMaxTxPacketSize = KMaxTxIPPacketSize;
+	iMaxRxPacketSize = KMaxRxIPPacketSize;
+#else // WINS
+	// Set default values in case patch is not present in epocrawip.ini
+	iMaxSendQueueLen = KDefaultBufferSize;    
+	iMaxTxPacketSize = KMaxIPPacket + KIPTagHeaderLength;
+	iMaxRxPacketSize = KMaxIPPacket + KIPTagHeaderLength;
+	       
+	// for the emulator process is patched via the epocrawip.ini file
+	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KMaxSendQueueLen",&iMaxSendQueueLen);
+	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KMaxTxIPPacketSize",&iMaxTxPacketSize);
+	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KMaxRxIPPacketSize",&iMaxRxPacketSize);
+#endif
 	}
 
 void CBcaController::UpdateInternalFlowFlag(TFlowControl aValue)
@@ -404,7 +400,7 @@
  *  Indicator of whether the BufferQueue is full
  * @return TBool.  ETrue if bufferQueue is full, EFalse if queue is not full
  */
-	{
+	{    
 	iFullQueueFlag = iNumPacketsInSendQueue >= iMaxSendQueueLen;
 	return iFullQueueFlag;
 	}	
--- a/telephonyprotocols/rawipnif/src/BcaIoController.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyprotocols/rawipnif/src/BcaIoController.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -68,8 +68,8 @@
 	{
 	_LOG_L1C1(_L8("CBcaIoController::ConstructL"));
 	BaseConstructL();
-	iSender = CSender::NewL(*this, iTheLogger, iMaxPacketSise);
-	iReceiver = CReceiver::NewL(*this, iTheLogger, iMaxPacketSise);
+	iSender = CSender::NewL(*this, iTheLogger, iMaxTxPacketSize);
+	iReceiver = CReceiver::NewL(*this, iTheLogger, iMaxRxPacketSize);
 	iLoader = new (ELeave) CBcaControl(*this, iTheLogger);
 	}
 
@@ -92,7 +92,7 @@
 void CBcaIoController::SetBcaStackAndName(const TDesC& aBcaStack, const TDesC& aBcaName)
 	{
 	iBcaName.Set(aBcaName);
-	iBcaName.Set(aBcaStack);
+	iBcaStack.Set(aBcaStack);
 	}
 	
 
@@ -126,33 +126,8 @@
 	// Update module state
 	SendState(EShuttingDown);
 	
-	//It does nothing here.
-	iLoader->Cancel();
-	MBca* bca = iLoader->Bca();
-	if(bca)
-		{
-		if(aError == KErrConnectionTerminated )
-			{
-			_LOG_L1C1(_L8("This is an emergency shutdown, it kills the NIF immediately."));
-			// It is a emergency shutdown, it kills the NIF immediately.
-			bca->Close();
-			GetObserver().ShutDown(MControllerObserver::EBcaController, aError);
-			}
-	    
-		else
-			{
-			_LOG_L1C1(_L8("This is a graceful termination which takes a while."));
-			//It is a graceful termination which takes a while.
-			iLoader->ShutdownBca(aError); 	
-			}	
-		}
-	else //nothing to shutdown, just notify linklayer down.
-		{
-		_LOG_L1C1(_L8("Bca is not initialized, bring the linklayer down"));
-		GetObserver().ShutDown(MControllerObserver::EBcaController, aError);
-		}
-
-  	}
+    iLoader->ShutdownBca(aError);  
+	}
 
 void CBcaIoController::InitialiseBcaL()
 /**
@@ -235,9 +210,14 @@
 	Cancel();
 	if(iMBca)
 		{
+        //If the Bca is still open, close it
+        if(EBcaOpened == iState)
+            {
+            iMBca->Close();
+            }
+        //delete the BCA instance
 		iMBca->Release();	
 		}
-		
 	// Library will be Closed when iBcaDll is destroyed.
 	}
 
@@ -327,6 +307,8 @@
 				}
 			else
 				{
+                iState = EBcaOpened;
+                //Activate the receiver Active Object
 				iObserver.Receiver().StartListening();
 				_LOG_L1C1(_L8("CBcaIoController Is Initialised"));
 				TRAPD(err, iObserver.GetObserver().InitialiseL(MRawIPObserverBase::EBcaController,KErrNone));
@@ -343,6 +325,7 @@
 		case EClosing:
 			{
 			// linklayer shutdown
+			iState = EIdling;
 			iObserver.GetObserver().ShutDown(MControllerObserver::EBcaController, iError);
 			break;
 			}
@@ -368,20 +351,16 @@
 		{
 		case EIdling:
 		case EIAPSet:
+	    case EBcaStackSet:
 			if(iMBca)
 				{
 				iMBca->CancelIoctl();
 				}
 			iState = EIdling;
 			break;
-		case EBcaStackSet:
 		case EClosing:
-		    if(iMBca)
-			    {
-			    iMBca->Close();
-			    }
-			iState = EIdling;
-			break;
+            iState = EIdling;		    
+            break;    
 		default:
 			_LOG_L2C1(_L8("ERROR CBcaControl::DoCancel(): Unknown state"));
 			_BTT_PANIC(KNifName, KBcaUnkownState);
@@ -396,6 +375,20 @@
 	{
 	_LOG_L1C1(_L8("CBcaControl::StartLoad"));
 	
+	//iMBca should not be initialized at this point
+	__ASSERT_DEBUG(!iMBca,Panic(KBcaAlreadyExists));
+	
+	//We don't expect iMBca here, but if it occurs, we delete previous BCA Instance
+	if(iMBca)
+	    {
+        //If the state is still "open", close it first
+        if(EBcaOpened == iState)
+            {
+            iMBca->Close();
+            }
+        iMBca->Release();
+        }
+
 	// Loads Bca Dll and creates a Bca instance;
 	User::LeaveIfError(iBcaDll.iObj.Load(iObserver.BcaName()));
 	
@@ -437,13 +430,35 @@
 	{
 	__ASSERT_DEBUG(iMBca,Panic(KBcaNotExist));
 	Cancel();
-    iError = aError;
-    iState = EClosing;  
-    if(iMBca)
+        
+    //We should only call shutdown or close if we have successfully opened a BCA Channel
+    if((iMBca) && (EBcaOpened == iState))
         {
-        iMBca->Shutdown(iStatus);
-        SetActive();    
+        if(aError == KErrConnectionTerminated )
+            {
+            _LOG_L1C1(_L8("This is an emergency shutdown, it kills the NIF immediately."));
+            // It is a emergency shutdown, it kills the NIF immediately.
+            iMBca->Close();
+            iState = EIdling;
+            iObserver.GetObserver().ShutDown(MControllerObserver::EBcaController, aError);
+            }
+        else
+            {
+            _LOG_L1C1(_L8("This is a graceful termination which takes a while."));
+            //It is a graceful termination which takes a while.
+            iError = aError;
+            iState = EClosing;
+            iMBca->Shutdown(iStatus);
+            SetActive();    
+            }
         }
+    else //nothing to shutdown, just notify linklayer down.
+        {
+        _LOG_L1C1(_L8("Bca is not initialized or opened, bring the linklayer down"));
+        iState = EIdling;
+        iObserver.GetObserver().ShutDown(MControllerObserver::EBcaController, aError);
+        }
+  
 	}
 
 /** Panic function for RawIpNif 
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmphonebookstoretsy.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmphonebookstoretsy.h	Mon Mar 15 12:45:06 2010 +0200
@@ -622,7 +622,7 @@
 		*
 		* @param aEntryData Array type to be filled
 		*/
-	   void CopyLtsyCacheToCtsyCache( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData );
+	   void CopyLtsyCacheToCtsyCacheL( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData );
         
         
 
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -141,7 +141,7 @@
 CMmCustomTsy::~CMmCustomTsy()
     {
 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy");
-    iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
+
 	iFeatureControl.Close();
 	
     // Delete subsystems
@@ -150,34 +150,19 @@
         delete iMmSubTsy[i];
         }
 
-    if ( iMmSecurityTsy )
-        {
-        // Delete SecurityTsy
-        delete iMmSecurityTsy;
-        }
-
-    if ( iMmCustomExtInterface )
-        {
-        // Delete GSM extensions
-        delete iMmCustomExtInterface;
-        }
-
-    if ( iTsyReqHandleStore )
-        {
-        // delete req handle store
-        delete iTsyReqHandleStore;
-        }
-
-    iMmSecurityTsy = NULL;
-    iMmCustomExtInterface = NULL;
-    iTsyReqHandleStore = NULL;
-    iISVDialNumberCheckObject = NULL;
-    iCFISCentRep = NULL;
+    // Delete SecurityTsy
+    delete iMmSecurityTsy;
+
+    // Delete GSM extensions
+    delete iMmCustomExtInterface;
+    
+    // delete req handle store
+    delete iTsyReqHandleStore;
 
     if ( iMmPhoneTsy )
         {
+        iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
         iMmPhoneTsy->SetCustomTsy( NULL );
-
         // unregister custom tsy in the message manager
         iMmPhoneTsy->MessageManager()->DeregisterTsyObject(this);
         }
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1161,7 +1161,7 @@
 #else
 	CArrayPtrSeg<CPhoneBookStoreEntry>* entryData;
 	aDataPackage->UnPackData(entryData);	
-	CopyLtsyCacheToCtsyCache(entryData);
+	CopyLtsyCacheToCtsyCacheL(entryData);
 #endif
 	
     CMmPhoneTsy::CNosBootState* bootState = iMmPhoneTsy->NosBootState();
@@ -3163,7 +3163,7 @@
  	}
 
 // ---------------------------------------------------------------------------
-// CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCache
+// CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCacheL
 // This method copies Ltsy Cache to Ctsy Cache
 // This is only done when NOT using the dispatcher as the Ltsy creates the array and destroys
 // the memory before CTSY is completely done with it. It now has to be copied over to CTSY domain
@@ -3171,7 +3171,7 @@
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------
 //
-void CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCache( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData )
+void CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCacheL( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData )
 	{
 	if (iPBStoreCache!=NULL)
 		{
@@ -3231,7 +3231,7 @@
 					(phoneBookStoreEntry->iAnr)->AppendL((*anr)[anrCount]);
 					}	
 				}
-						
+			
 			iPBStoreCache->AppendL(phoneBookStoreEntry);
 			CleanupStack::Pop( phoneBookStoreEntry );
 			}
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -2108,7 +2108,18 @@
     RMobilePhone::TMobilePhoneRegistrationStatus* aStatus ) 
     {
 TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkRegistrationStatusL Handle: %d", aTsyReqHandle);
-    if ( RMobilePhone::ERegistrationUnknown == iNWRegistrationStatus )
+    
+	// If the modem is not ready (Common TSY has not received EMmTsyBootNotifyModemStatusReadyIPC
+	// from LTSY), we don't need to ask. Update registration status and complete client immediately. 
+	if (!iMmPhoneTsy->IsModemStatusReady())
+		{
+		iNWRegistrationStatus = RMobilePhone::ERegistrationUnknown;
+		*aStatus = iNWRegistrationStatus;
+		iMmPhoneTsy->ReqCompleted( aTsyReqHandle, KErrNone );
+		return KErrNone;
+		}
+	
+	if (RMobilePhone::ERegistrationUnknown == iNWRegistrationStatus)	// modem is ready
         {
         TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->
             GetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneGetNetworkRegistrationStatus );
@@ -2124,21 +2135,9 @@
             }
         else
             {
-            TInt ret(KErrGeneral);
-            // verify that modem is ready
-            if ( iMmPhoneTsy->IsModemStatusReady() )
-                {
-                //get mode specific information 
-                TFLOGSTRING("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Sending request to LTSY" );
-                ret = iMmPhoneTsy->iMmPhoneExtInterface->
-                    GetNetworkRegistrationStatusL();
-                }
-            else
-                {
-                // modem is not ready. Client to be completed with error code.
-                TFLOGSTRING("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Modem not ready" );            
-                ret = KErrNotReady;
-                }
+			//get mode specific information 
+			TInt ret ( iMmPhoneTsy->iMmPhoneExtInterface->
+					GetNetworkRegistrationStatusL() );
 
             if ( KErrNone != ret )
                 {
--- a/telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -330,7 +330,9 @@
 EXPORT_C CPhoneFactoryBase* LibEntry()
     {
 TFLOGSTRING("TSY: CPhoneFactoryBase::LibEntry()...");
-    CMmPhoneFactoryTsy* factory = CMmPhoneFactoryTsy::NewL(); 
+    // return NULL if instantiation fails
+    CMmPhoneFactoryTsy* factory(NULL);
+    TRAP_IGNORE(factory = CMmPhoneFactoryTsy::NewL()); 
     return factory; 
     }
 
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_phoneidentity_individual.script	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_phoneidentity_individual.script	Mon Mar 15 12:45:06 2010 +0200
@@ -91,9 +91,9 @@
 START_TESTCASE BA-CTSY-PID-MGPI-0001f
 //!@SYMTestCaseID BA-CTSY-PID-MGPI-0001f
 //!@SYMComponent  telephony_ctsy
-//!@SYMTestCaseDesc test reading from deviceattributes.ini not encoded as UNICODE Little Endian
+//!@SYMTestCaseDesc test reading from deviceattributes.ini encoded in an invalid format
 //!@SYMTestPriority High
-//!@SYMTestActions Calls GetPhoneId when deviceattributes.ini not using the right encoding.
+//!@SYMTestActions Calls GetPhoneId when deviceattributes.ini not using a valid encoding.
 //!@SYMTestExpectedResults Pass
 //!@SYMTestType CT
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneIdentityFU.TestGetPhoneId0001fL
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsynetworkcontrolfu.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsynetworkcontrolfu.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -5276,16 +5276,19 @@
 	TRequestStatus requestStatus;
     RMobilePhone::TMobilePhoneRegistrationStatus status;
     
-    // Initial test to verify that GetNetworkRegistrationStatus completes 
-    // with an error if the modem is not ready (i.e., before the LTSY sends
+    // Initial test to verify that GetNetworkRegistrationStatus behaves 
+	// correctly when the modem is not ready (i.e., before the LTSY sends
     // a EMmTsyBootNotifyModemStatusReadyIPC notification to CTSY)
     TInt err = iPhone.Open(iTelServer,KMmTsyPhoneName);
     ASSERT_EQUALS(KErrNone, err);
 
     iPhone.GetNetworkRegistrationStatus(requestStatus, status);
+    
+    // If the modem is not ready, the request should complete immediately
+    // with KErrNone, and registration status should be "Unknown"
     User::WaitForRequest(requestStatus);
-    ASSERT_EQUALS(KErrNotReady, requestStatus.Int());
-
+    ASSERT_EQUALS(KErrNone, requestStatus.Int());
+    ASSERT_EQUALS(RMobilePhone::ERegistrationUnknown, status);
 	iPhone.Close();
 	
 	OpenPhoneL(); // whole phone bootup procedure for rest of tests
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyphoneidentityfu.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyphoneidentityfu.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -427,9 +427,9 @@
 /**
 @SYMTestCaseID BA-CTSY-PID-MGPI-0001f
 @SYMComponent  telephony_ctsy
-@SYMTestCaseDesc test reading from deviceattributes.ini not encoded as UNICODE Little Endian
+@SYMTestCaseDesc test reading from deviceattributes.ini encoded in an invalid format
 @SYMTestPriority High
-@SYMTestActions Calls GetPhoneId when deviceattributes.ini not using the right encoding.
+@SYMTestActions Calls GetPhoneId when deviceattributes.ini not using a valid encoding.
 @SYMTestExpectedResults Pass
 @SYMTestType CT
 */
Binary file telephonyserverplugins/common_tsy/test/component/testdata/TestGetPhoneId0001f.ini has changed
--- a/telephonyserverplugins/common_tsy/test/integration/group/integration_test.pkg	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/group/integration_test.pkg	Mon Mar 15 12:45:06 2010 +0200
@@ -1,1 +1,61 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\testdata\ctsyintegration_setup.ini"-"c:\testdata\configs\ctsyintegration_setup.ini"
+// note using NTN version of config data here:
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\testdata\ctsyintegration_ntn_data.ini"-"c:\testdata\configs\ctsyintegration_data.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\testdata\uk_commdb.cfg"-"c:\testdata\configs\uk_commdb.cfg"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\testdata\testexecute.ini"-"c:\system\data\testexecute.ini"
+
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_airtimeduration_auto.script"-"c:\testdata\scripts\te_ctsyintegration_airtimeduration_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_alternatelineservice_auto.script"-"c:\testdata\scripts\te_ctsyintegration_alternatelineservice_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_apncontrollist_auto.script"-"c:\testdata\scripts\te_ctsyintegration_apncontrollist_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_broadcastmessaging_auto.script"-"c:\testdata\scripts\te_ctsyintegration_broadcastmessaging_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_callbarring_auto.script"-"c:\testdata\scripts\te_ctsyintegration_callbarring_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_callcontrol_auto.script"-"c:\testdata\scripts\te_ctsyintegration_callcontrol_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_callcost_auto.script"-"c:\testdata\scripts\te_ctsyintegration_callcost_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_callforwarding_auto.script"-"c:\testdata\scripts\te_ctsyintegration_callforwarding_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_callownership_auto.script"-"c:\testdata\scripts\te_ctsyintegration_callownership_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_callwaiting_auto.script"-"c:\testdata\scripts\te_ctsyintegration_callwaiting_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_conferencecallcontrol1_auto.script"-"c:\testdata\scripts\te_ctsyintegration_conferencecallcontrol1_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_conferencecallcontrol2_auto.script"-"c:\testdata\scripts\te_ctsyintegration_conferencecallcontrol2_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_conferencecallcontrol3_auto.script"-"c:\testdata\scripts\te_ctsyintegration_conferencecallcontrol3_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_customapi_auto.script"-"c:\testdata\scripts\te_ctsyintegration_customapi_auto.script"
 "\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_dtmf_auto.script"-"c:\testdata\scripts\te_ctsyintegration_dtmf_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_enstore_auto.script"-"c:\testdata\scripts\te_ctsyintegration_enstore_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_fixeddialling_auto.script"-"c:\testdata\scripts\te_ctsyintegration_fixeddialling_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_indicator_auto.script"-"c:\testdata\scripts\te_ctsyintegration_indicator_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_mailboxnumbers_auto.script"-"c:\testdata\scripts\te_ctsyintegration_mailboxnumbers_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_networkcontrol_auto.script"-"c:\testdata\scripts\te_ctsyintegration_networkcontrol_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_networksecurity_auto.script"-"c:\testdata\scripts\te_ctsyintegration_networksecurity_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_onstore_auto.script"-"c:\testdata\scripts\te_ctsyintegration_onstore_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_packetcontext_auto.script"-"c:\testdata\scripts\te_ctsyintegration_packetcontext_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_packetservice_auto.script"-"c:\testdata\scripts\te_ctsyintegration_packetservice_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_phonebookstore_auto.script"-"c:\testdata\scripts\te_ctsyintegration_phonebookstore_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_phonecapability_auto.script"-"c:\testdata\scripts\te_ctsyintegration_phonecapability_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_phoneidentity_auto.script"-"c:\testdata\scripts\te_ctsyintegration_phoneidentity_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_phonepower_auto.script"-"c:\testdata\scripts\te_ctsyintegration_phonepower_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_phonesecurity_auto.script"-"c:\testdata\scripts\te_ctsyintegration_phonesecurity_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_phonestore_auto.script"-"c:\testdata\scripts\te_ctsyintegration_phonestore_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_signalstrength_auto.script"-"c:\testdata\scripts\te_ctsyintegration_signalstrength_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_smsmessaging_auto.script"-"c:\testdata\scripts\te_ctsyintegration_smsmessaging_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_smspstore_auto.script"-"c:\testdata\scripts\te_ctsyintegration_smspstore_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_smsstore_auto.script"-"c:\testdata\scripts\te_ctsyintegration_smsstore_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_subscriberinfo_auto.script"-"c:\testdata\scripts\te_ctsyintegration_subscriberinfo_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_supplementaryservicecaps_auto.script"-"c:\testdata\scripts\te_ctsyintegration_supplementaryservicecaps_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_usernetworkaccess_auto.script"-"c:\testdata\scripts\te_ctsyintegration_usernetworkaccess_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_usimapplication_auto.script"-"c:\testdata\scripts\te_ctsyintegration_usimapplication_auto.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_ussdmessaging_auto.script"-"c:\testdata\scripts\te_ctsyintegration_ussdmessaging_auto.script"
--- a/telephonyserverplugins/common_tsy/test/integration/group/te_ctsyintegrationtestsuite.iby	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/group/te_ctsyintegrationtestsuite.iby	Mon Mar 15 12:45:06 2010 +0200
@@ -23,13 +23,15 @@
 // Test Harness Executables
 file=ABI_DIR\DEBUG_DIR\te_ctsyintegrationtestsuite.exe		SYSTEM_BINDIR\te_ctsyintegrationtestsuite.exe
 
+file=ABI_DIR\DEBUG_DIR\RpsCommon.dll	SYSTEM_BINDIR\RpsCommon.dll
+file=ABI_DIR\DEBUG_DIR\rpsmaster.dll	SYSTEM_BINDIR\rpsmaster.dll
 
 data=EPOCROOT##epoc32\data\z\TestData\configs\ctsyintegration_setup.ini 	testdata\configs\ctsyintegration_setup.ini
 data=EPOCROOT##epoc32\data\z\TestData\configs\ctsyintegration_trpat_setup.ini 	testdata\configs\ctsyintegration_trpat_setup.ini
 data=EPOCROOT##epoc32\data\z\TestData\configs\ctsyintegration_trpstubbed_setup.ini 	testdata\configs\ctsyintegration_trpstubbed_setup.ini
 data=EPOCROOT##epoc32\data\z\TestData\configs\ctsyintegration_data.ini 	testdata\configs\ctsyintegration_data.ini
 data=EPOCROOT##epoc32\data\z\TestData\configs\uk_commdb.cfg		testdata\configs\uk_commdb.cfg
-
+data=EPOCROOT##epoc32\data\z\testdata\configs\testexecute.ini		system\data\testexecute.ini
 
 data=EPOCROOT##epoc32\data\z\testdata\scripts\te_ctsy_trpat_test_setup.script		testdata\scripts\te_ctsy_trpat_test_setup.script
 data=EPOCROOT##epoc32\data\z\testdata\scripts\te_ctsy_trpstubbed_test_setup.script	testdata\scripts\te_ctsy_trpstubbed_test_setup.script
--- a/telephonyserverplugins/common_tsy/test/integration/inc/cctsyinidata.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/inc/cctsyinidata.h	Mon Mar 15 12:45:06 2010 +0200
@@ -35,6 +35,7 @@
 _LIT(KIniSectionSoneraGprs, "SoneraGprsSettings");
 _LIT(KIniSectionO2Gprs, "O2GprsSettings");
 _LIT(KIniSectionThreeGprs, "ThreeGprsSettings");
+_LIT(KIniSectionNTNGprs, "NTNGprsSettings");
 
 _LIT(KIniSectionOrangePasswords, "OrangePasswords");
 _LIT(KIniSectionVodafonePasswords, "VodafonePasswords");
@@ -44,6 +45,7 @@
 _LIT(KIniSectionElisaPasswords, "ElisaPasswords");
 _LIT(KIniSectionDNAPasswords, "DNAPasswords");
 _LIT(KIniSectionSoneraPasswords, "SoneraPasswords");
+_LIT(KIniSectionNTNPasswords, "NTNPasswords");
 _LIT(KIniSectionBoardParams, "BoardParams"); // contains board specific parameters like phonelock
 _LIT(KIniSectionSIMParams, "SIMParams"); // contains SIM specific parameters like PUK1, PUK2
 
--- a/telephonyserverplugins/common_tsy/test/integration/inc/cctsyintegrationtestsmsmessaging.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/inc/cctsyintegrationtestsmsmessaging.h	Mon Mar 15 12:45:06 2010 +0200
@@ -40,6 +40,7 @@
 _LIT(KNetworkVodafone,"Vodafone");
 _LIT(KNetworkOrange,"Orange");
 _LIT(KNetworkTMobile,"TMobile");
+_LIT(KNetworkNTN,"NTN");
 
 
 class CCTSYIntegrationTestSmsMessagingBase : public CCTSYIntegrationTestSuiteStepBase
--- a/telephonyserverplugins/common_tsy/test/integration/inc/tnetworktsytesthelper.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/inc/tnetworktsytesthelper.h	Mon Mar 15 12:45:06 2010 +0200
@@ -30,6 +30,7 @@
 	EOperatorDNA,
 	EOperatorSonera,
 	EOperatorAnite,
+	EOperatorNTN,
 	EOperatorUnknown
 	};
 	
--- a/telephonyserverplugins/common_tsy/test/integration/scripts_implemented/te_ctsyintegration_customapi_auto.script	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/scripts_implemented/te_ctsyintegration_customapi_auto.script	Mon Mar 15 12:45:06 2010 +0200
@@ -25,5 +25,5 @@
 //!@SYMTestExpectedResults Pass - Place holder - fill this in when writing test
 //!@SYMTestType CIT
 //!@SYMTestCaseDependencies live/automatic
-RUN_TEST_STEP 100 TE_CTSYIntegrationTestSuite CCTSYIntegrationTestCustomAPI0050 c:\ctsy\ctsyintegration_data.ini
+RUN_TEST_STEP 100 TE_CTSYIntegrationTestSuite CCTSYIntegrationTestCustomAPI0050 c:\testdata\configs\ctsyintegration_data.ini
 END_TESTCASE BA-CTSY-INT-CAPI-0050
--- a/telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestcallwaiting.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestcallwaiting.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -1003,23 +1003,31 @@
 	TInt noOfEntries = cwList->Enumerate();
 	ASSERT_TRUE( noOfEntries >=  2, _L("CRetrieveMobilePhoneCWList::Enumerate returned incorrect information"))
 
+	const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(0);
+	const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry1 = cwList->GetEntryL(1);
 	// Check CMobilePhoneCWList::GetEntryL with aIndex=0 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=EVoiceService and iStatus=ECallWaitingStatusActive
-	const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(0);	
-	ASSERT_TRUE((cwInfoEntry.iServiceGroup  ==  RMobilePhone::EVoiceService 
-				|| cwInfoEntry.iServiceGroup  ==  RMobilePhone::ETelephony) , 
-				_L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup"))
-	ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, 
-				_L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus"));
-	
 	// Check CMobilePhoneCWList::GetEntryL with aIndex=1 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=ECircuitDataService and iStatus=ECallWaitingStatusActive
-	const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry1 = cwList->GetEntryL(1);	
-	ASSERT_TRUE( ( cwInfoEntry1.iServiceGroup == RMobilePhone::ECircuitDataService
-				|| cwInfoEntry1.iServiceGroup == RMobilePhone::ESyncData
-				|| cwInfoEntry1.iServiceGroup == RMobilePhone::EAsyncData), 
-				_L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup"))
-	ASSERT_EQUALS(cwInfoEntry1.iStatus, RMobilePhone::ECallWaitingStatusActive, 
-				_L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus"))	
-		
+	// or opposite.
+	TBool serviceGroupFlag1(EFalse);
+	TBool serviceGroupFlag2(EFalse);
+	serviceGroupFlag1 = ((cwInfoEntry.iServiceGroup  ==  RMobilePhone::EVoiceService 
+            || cwInfoEntry.iServiceGroup  ==  RMobilePhone::ETelephony)
+            && ( cwInfoEntry1.iServiceGroup == RMobilePhone::ECircuitDataService
+            || cwInfoEntry1.iServiceGroup == RMobilePhone::ESyncData
+            || cwInfoEntry1.iServiceGroup == RMobilePhone::EAsyncData) );
+	serviceGroupFlag2 = ((cwInfoEntry1.iServiceGroup  ==  RMobilePhone::EVoiceService 
+            || cwInfoEntry1.iServiceGroup  ==  RMobilePhone::ETelephony)
+            && ( cwInfoEntry.iServiceGroup == RMobilePhone::ECircuitDataService
+            || cwInfoEntry.iServiceGroup == RMobilePhone::ESyncData
+            || cwInfoEntry.iServiceGroup == RMobilePhone::EAsyncData) );
+	
+	ASSERT_TRUE((serviceGroupFlag1 || serviceGroupFlag2), 
+            _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup"));
+    ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, 
+            _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus"));
+    ASSERT_EQUALS(cwInfoEntry1.iStatus, RMobilePhone::ECallWaitingStatusActive, 
+            _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus"));
+	
 	//
 	// TEST END
 	//
--- a/telephonyserverplugins/common_tsy/test/integration/src/tnetworktsytesthelper.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/src/tnetworktsytesthelper.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -562,50 +562,65 @@
  		{
  		reqResult = reqStatus.Int();
  		}
-	DEBUG_PRINTF2(_L("Current network is %S"), &(aPhoneNetwork().iShortName));
-	if( aPhoneNetwork().iShortName.Find(_L("O2")) >=0 )
-		{
-		aOperatorName = EOperatorO2;
-		}
-	else if ( aPhoneNetwork().iShortName.Find(_L("voda")) >=0 )
-		{
-		aOperatorName = EOperatorVodafone;
-		}
-	else if ( aPhoneNetwork().iShortName.Find(_L("Orange")) >=0 )
-		{
-		aOperatorName = EOperatorOrange;
-		}
-	else if ( aPhoneNetwork().iShortName.Find(_L("Elisa")) >=0 )
-		{
-		aOperatorName = EOperatorElisa;
-		}
-    else if ( aPhoneNetwork().iShortName.Find(_L("DNA")) >=0 )
-		{
-		aOperatorName = EOperatorDNA;
-		}
-	else if ( aPhoneNetwork().iShortName.Find(_L("dna")) >=0 )
-		{
-		aOperatorName = EOperatorDNA;
-		}
-	else if ( aPhoneNetwork().iShortName.Find(_L("SONERA")) >=0 )
-		{
-		aOperatorName = EOperatorSonera;
-		}
-	else if ( aPhoneNetwork().iShortName.Find(_L("T-Mobile")) >=0 
-			||	aPhoneNetwork().iShortName.Find(_L("One2One")) >=0)
-		{
-		aOperatorName = EOperatorTMobile;
-		}
-	else if( (aPhoneNetwork().iShortName.Find(_L("01")) >=0) || 
-			(aPhoneNetwork().iShortName.Find(_L("ANITE")) >=0) )
-		{
-		aOperatorName = EOperatorAnite;
-		}
-	else
-		{
-		aOperatorName = EOperatorUnknown;
-		}
-
+ 	
+ 	TPtrC ptrNetworkName;
+ 	if( aPhoneNetwork().iShortName.Size() > 0 )
+ 	    {
+        ptrNetworkName.Set(aPhoneNetwork().iShortName.Ptr(), aPhoneNetwork().iShortName.Length());
+ 	    }
+ 	else
+ 	    {
+        ptrNetworkName.Set(aPhoneNetwork().iDisplayTag.Ptr(), aPhoneNetwork().iDisplayTag.Length()); 	
+ 	    }
+ 	DEBUG_PRINTF2(_L("Current network is %S"), &ptrNetworkName);
+ 	
+    if( ptrNetworkName.Find(_L("O2")) >=0 )
+        {
+        aOperatorName = EOperatorO2;
+        }
+    else if ( ptrNetworkName.Find(_L("voda")) >=0 )
+        {
+        aOperatorName = EOperatorVodafone;
+        }
+    else if ( ptrNetworkName.Find(_L("Orange")) >=0 )
+        {
+        aOperatorName = EOperatorOrange;
+        }
+    else if ( ptrNetworkName.Find(_L("Elisa")) >=0 )
+        {
+        aOperatorName = EOperatorElisa;
+        }
+    else if ( ptrNetworkName.Find(_L("DNA")) >=0 )
+        {
+        aOperatorName = EOperatorDNA;
+        }
+    else if ( ptrNetworkName.Find(_L("dna")) >=0 )
+        {
+        aOperatorName = EOperatorDNA;
+        }
+    else if ( ptrNetworkName.Find(_L("SONERA")) >=0 )
+        {
+        aOperatorName = EOperatorSonera;
+        }
+    else if ( ptrNetworkName.Find(_L("T-Mobile")) >=0 
+            ||  ptrNetworkName.Find(_L("One2One")) >=0)
+        {
+        aOperatorName = EOperatorTMobile;
+        }
+    else if( (ptrNetworkName.Find(_L("01")) >=0) || 
+            (ptrNetworkName.Find(_L("ANITE")) >=0) )
+        {
+        aOperatorName = EOperatorAnite;
+        }
+    else if ( ptrNetworkName.Find(_L("NTN")) >=0 )
+        {
+        aOperatorName = EOperatorNTN;
+        }
+    else
+        {
+        aOperatorName = EOperatorUnknown;
+        }
+    
  	CleanupStack::PopAndDestroy(1);
 
  	return reqResult;
@@ -755,6 +770,9 @@
 		case EOperatorAnite:
 			aNetworkSection = &KIniSectionAnitePasswords;
 			break;
+		case EOperatorNTN:
+            aNetworkSection = &KIniSectionNTNPasswords;
+            break;
 		case EOperatorUnknown:
 		default:
 		    CHECK_TRUE_L( EFail, _L("Failed to identify current network"));
--- a/telephonyserverplugins/common_tsy/test/integration/src/tpacketservicetsytesthelper.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/integration/src/tpacketservicetsytesthelper.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -765,6 +765,11 @@
 		DEBUG_PRINTF1(_L("Retrieving Three GPRS settings"));
         section.Copy(KIniSectionThreeGprs);
         }
+    if(aInfo.iShortName.Find(_L("NTN")) != KErrNotFound)   // NTN
+        {
+        section.Copy(KIniSectionVodafoneGprs);
+        DEBUG_PRINTF1(_L("Retrieving NTN GPRS settings"));
+        }
 	else if( (aInfo.iShortName.Find(_L("01")) >=0) || 
 			(aInfo.iShortName.Find(_L("ANITE")) >=0) ) // Anite
 		{
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/common_tsy/test/integration/testdata/ctsyintegration_ntn_data.ini	Mon Mar 15 12:45:06 2010 +0200
@@ -0,0 +1,160 @@
+[VoiceNumbers]
+VoiceNumber1=99900
+VoiceNumber2=99900
+VoiceNumber3=99900
+VoiceNumber4=99900
+VoiceNumber5=99900
+VoiceNumber6=99900
+VoiceNumberInt1=99900
+VoiceNumberIntExHC=99900
+VoiceNumberDoesNotConnect=0
+SmsReceptor=01632960000
+
+
+[DataNumbers]
+DataNumber1=01632960000
+DataNumber2=0
+
+[FaxNumbers]
+FaxNumber1=0
+FaxNumber2=0
+
+[OwnNumbers]
+OwnVoiceNumber1=
+OwnVoiceNumber2=
+OwnDataNumber=
+OwnFaxNumber=
+
+[DefaultGprsSettings]
+ApnName= defapn
+Username= defuser
+Password= defpwd
+
+[OrangeGprsSettings]
+ApnName= orangeinternet
+Username= web
+Password= web
+
+[VodafoneGprsSettings]
+ApnName= internet
+Username= web
+Password= web
+
+[TMobileGprsSettings]
+ApnName= general.t-mobile.uk
+Username= user
+Password= one2one
+
+[DNAGprsSettings]
+ApnName= internet
+Username= 
+Password=
+
+[ElisaGprsSettings]
+ApnName= internet
+Username= 
+Password= 
+
+[SoneraGprsSettings]
+ApnName= internet	
+Username=
+Password=
+
+[NTNGprsSettings]
+ApnName= internet	
+Username=
+Password=
+
+[O2GprsSettings]
+ApnName= mobile.o2.co.uk
+Username= web
+Password= password
+
+[ThreeGprsSettings]
+ApnName= three.co.uk
+Username= guest
+Password= guest
+
+[OrangeGprsSettings 2]
+ApnName= orangewap
+Username= Orange
+Password= Multimedia
+
+[VodafoneGprsSettings 2]
+ApnName= wap.vodafone.co.uk
+Username= wap
+Password= wap
+
+[TMobileGprsSettings 2]
+ApnName= general.t-mobile.uk
+Username= user
+Password= one2one
+
+[O2GprsSettings 2]
+ApnName= wap.o2.co.uk
+Username= o2wap
+Password= password
+
+[ThreeGprsSettings 2]
+ApnName= three.co.uk
+Username= guest
+Password= guest
+
+[OrangePasswords]
+CallBarring1=
+Pin1=
+Pin2=
+
+[VodafonePasswords]
+CallBarring1=
+Pin1=
+Pin2=
+
+[O2Passwords]
+CallBarring1=
+Pin1=
+Pin2=
+
+[TMobilePasswords]
+CallBarring1=notSupported
+Pin1=
+Pin2=
+
+[DNAPasswords]
+CallBarring1=0000
+Pin1=
+Pin2=
+
+[ElisaPasswords]
+CallBarring1=notSupported
+Pin1=
+Pin2=
+
+[SoneraPasswords]
+CallBarring1=notSupported
+Pin1=
+Pin2=
+
+[NTNPasswords]
+CallBarring1=0000
+Pin1=1234
+Pin2=5678
+Puk1=11111111
+Puk2=22222222
+
+[SmsServiceCentre]
+Vodafone= +441632960000
+TMobile= +441632960000
+Orange= +441632960000
+O2= +441632960000
+DNA= +441632960000
+Elisa= +441632960000
+SONERA= +441632960000
+NTN= +358454400051
+
+[BoardParams]
+PhoneLock=
+
+[SIMParams]
+Puk1=
+Puk2=
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/common_tsy/test/integration/testdata/testexecute.ini	Mon Mar 15 12:45:06 2010 +0200
@@ -0,0 +1,11 @@
+[TestExecute]
+HTML     	 	= c:\logs\testexecute\
+XML      	 	= c:\logs\testexecute\
+LogLevel   	 	= FULL
+//DefaultScriptDir 	= z:\sampletest\
+JustInTimeDebug	 	= 0
+LogMode		 	= HTML
+RemotePanicDetection 	= OFF
+EnableIniAccessLog	= ON
+EnableTestsCountLog	= ON
+SystemStarter		= OFF
--- a/telephonyserverplugins/simtsy/inc/CSimCallForwarding.h	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/simtsy/inc/CSimCallForwarding.h	Mon Mar 15 12:45:06 2010 +0200
@@ -71,7 +71,7 @@
 	void ActivateL(RMobilePhone::TMobilePhoneCFCondition* aCF, RMobilePhone::TMobilePhoneCFChangeV1* aCFInfo );
 	void DeactivateL(RMobilePhone::TMobilePhoneCFCondition* aCF, RMobilePhone::TMobilePhoneCFChangeV1* aCFInfo );
 	void EraseL(RMobilePhone::TMobilePhoneCFCondition* aCF, RMobilePhone::TMobilePhoneCFChangeV1* aCFInfo );
-	void UpdateCFQuiescentCondition(TBool aActivate, RMobilePhone::TMobilePhoneCFCondition aCF);
+	void UpdateCFQuiescentConditionL(TBool aActivate, RMobilePhone::TMobilePhoneCFCondition aCF);
 		
 	const CTestConfigSection* CfgFile();
 
--- a/telephonyserverplugins/simtsy/src/CSimCallForwarding.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/simtsy/src/CSimCallForwarding.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -652,7 +652,7 @@
 	}
 	
 	
-void CSimCallForwarding::UpdateCFQuiescentCondition(TBool aActivate, 
+void CSimCallForwarding::UpdateCFQuiescentConditionL(TBool aActivate, 
 													RMobilePhone::TMobilePhoneCFCondition aCF)
 	{
 	// only the Call Forward Unconditional can alter any other CF condition
@@ -828,7 +828,7 @@
 	if(callForwardActivated)
 		{
 		// only need to check quiescent status if an activation has occurred
-		UpdateCFQuiescentCondition(ETrue, theNewEntry.iCondition);	
+		UpdateCFQuiescentConditionL(ETrue, theNewEntry.iCondition);	
 		}
 
 	CleanupStack::PopAndDestroy(thePrevCFList);
@@ -1000,7 +1000,7 @@
 	if(callForwardDeactivated)
 		{		
 		// pass a FALSE to the function to notify of a service de-activation
-		UpdateCFQuiescentCondition(EFalse, theNewEntry.iCondition);
+		UpdateCFQuiescentConditionL(EFalse, theNewEntry.iCondition);
 		}
 
 	// now delete the old memory	
--- a/telephonyserverplugins/simtsy/src/CSimPhone.cpp	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/simtsy/src/CSimPhone.cpp	Mon Mar 15 12:45:06 2010 +0200
@@ -2999,7 +2999,6 @@
     CTestConfig* configFile = NULL; 
 
     TRAPD(err, configFile = CTestConfig::NewLC(iFs, KConfigFileDir, KConfigFilename); CleanupStack::Pop(configFile));
-    CleanupStack::PushL(configFile);
     if( err != KErrNone || configFile->Section(iSectionName) != NULL )
         {
         err = KErrNone;
@@ -3008,7 +3007,7 @@
         {
         err = KErrNotFound;
         }
-    CleanupStack::PopAndDestroy(configFile);
+    delete configFile;
     return err;
     }
 /**
--- a/telephonyserverplugins/simtsy/test/Te_SimNetwork/Te_SimNetwork_config.txt	Fri Mar 12 15:49:38 2010 +0200
+++ b/telephonyserverplugins/simtsy/test/Te_SimNetwork/Te_SimNetwork_config.txt	Mon Mar 15 12:45:06 2010 +0200
@@ -143,6 +143,19 @@
 #  6 = Denied
 #  7 = Roaming
 
+
+NetworkMode= 5,2
+NetworkMode= 5,6
+#NetworkMode= <Duration>, <NetworkMode>
+# <NetworkMode>:
+#  0 = Unknown
+#  1 = Unregistered
+#  2 = GSM
+#  3 = AMPS
+#  6 = WCDMA
+#  7 = TDCDMA
+
+
 PacketRegStatus= 5,2
 PacketRegStatus= 2,1
 PacketRegStatus= 3,5