# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268649915 -7200 # Node ID 8b5d60ce1e945c97023ab355f3c4e157492fe2e1 # Parent 98a7181d2ce7ed7ddc3b0a475d42e0fca355514e Revision: 201010 Kit: 201010 diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/020.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/020.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/020.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,8 +14,6 @@ Description: CommDB Settings File - All Rights Reserved - --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/021.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/021.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/021.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/022.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/022.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/022.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/022_30.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/022_30.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/022_30.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/023.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/023.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/023.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/024.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/024.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/024.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/061_01.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_01.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_01.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved In the case of that IfAuthName or IfAuthPass is 'replaceme' or DefaultTelNum is '+442079460224' it needs to be changed to the proper value for testing diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/061_02.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_02.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_02.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/061_03.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_03.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_03.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved In the case of that IfAuthName or IfAuthPass is 'replaceme' or DefaultTelNum is '+442079460224' it needs to be changed to the proper value for testing diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/061_04.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_04.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/061_04.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved In the case of that IfAuthName or IfAuthPass is 'replaceme' or DefaultTelNum is '+442079460224' it needs to be changed to the proper value for testing diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/Corrupt.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/Corrupt.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/Corrupt.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/Default.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/Default.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/Default.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/Default1.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/Default1.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/Default1.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/Default7.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/Default7.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/Default7.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/default3.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/default3.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/default3.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/scripts/protect.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/scripts/protect.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/scripts/protect.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsconfig/commsdatabaseshim/ts_commdb/te_cdma2000Settings/config/te_cdmacommdbsettings.xml --- a/commsconfig/commsdatabaseshim/ts_commdb/te_cdma2000Settings/config/te_cdmacommdbsettings.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsconfig/commsdatabaseshim/ts_commdb/te_cdma2000Settings/config/te_cdmacommdbsettings.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwsupport/commselements/meshmachine/inc/mm_mutexpolicies.h --- a/commsfwsupport/commselements/meshmachine/inc/mm_mutexpolicies.h Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwsupport/commselements/meshmachine/inc/mm_mutexpolicies.h Mon Mar 15 12:45:15 2010 +0200 @@ -100,7 +100,11 @@ */ inline static TBool IsBlocked(const MeshMachine::TNodeContextBase& aContext) { - return aContext.iNode.CountActivities(ACTIVITYID) != 0; + TInt count = aContext.iNode.CountActivities(ACTIVITYID); + MESH_LOG((KMeshMachineSubTag, _L8("TActivityIdMutex: Node [%08x] Activity [%08x]: Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, + ACTIVITYID, count)); + + return count != 0; } }; @@ -192,11 +196,54 @@ */ inline static TBool IsBlocked(const MeshMachine::TNodeContextBase& aContext) { - TBool isBlocked = aContext.iNode.CountActivities(ACTIVITYID1) != 0; - isBlocked |= aContext.iNode.CountActivities(ACTIVITYID2) != 0; - isBlocked |= (ACTIVITYID3)? aContext.iNode.CountActivities(ACTIVITYID3) != 0 : EFalse; - isBlocked |= (ACTIVITYID4)? aContext.iNode.CountActivities(ACTIVITYID4) != 0 : EFalse; - isBlocked |= (ACTIVITYID5)? aContext.iNode.CountActivities(ACTIVITYID5) != 0 : EFalse; + + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [2] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, + ACTIVITYID2, aContext.iNode.CountActivities(ACTIVITYID2))); + if (ACTIVITYID3) + { + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [3] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, + ACTIVITYID3, aContext.iNode.CountActivities(ACTIVITYID3))); + if (ACTIVITYID4) + { + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [4] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, + ACTIVITYID4, aContext.iNode.CountActivities(ACTIVITYID4))); + if (ACTIVITYID5) + { + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [5] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, + ACTIVITYID5, aContext.iNode.CountActivities(ACTIVITYID5))); + } + } + } + TInt count = 0; + count = aContext.iNode.CountActivities(ACTIVITYID1); + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [1] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, ACTIVITYID1, count)); + TBool isBlocked = (count != 0); + + count = aContext.iNode.CountActivities(ACTIVITYID2); + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [2] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, ACTIVITYID2, count)); + isBlocked |= (count != 0); + + if (ACTIVITYID3) + { + count = aContext.iNode.CountActivities(ACTIVITYID3); + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [3] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, ACTIVITYID3, count)); + isBlocked |= (count != 0); + + if (ACTIVITYID4) + { + count = aContext.iNode.CountActivities(ACTIVITYID4); + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [4] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, ACTIVITYID4, count)); + isBlocked |= (count != 0); + + if (ACTIVITYID5) + { + count = aContext.iNode.CountActivities(ACTIVITYID5); + MESH_LOG((KMeshMachineSubTag, _L8("TActivitiesIdMutex: Node [%08x] Activity [%08x]: [5] Number of actid (%d) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, ACTIVITYID5, count)); + isBlocked |= (count != 0); + } + } + } + return isBlocked; } }; @@ -213,7 +260,9 @@ */ inline static TBool IsBlocked(const MeshMachine::TNodeContextBase& aContext) { - return aContext.iNode.CountAllActivities() != 0; + TInt count = aContext.iNode.CountAllActivities(); + MESH_LOG((KMeshMachineSubTag, _L8("Node [%08x] Activity [%08x]: Count all activities %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, count)); + return count != 0; } }; @@ -238,7 +287,9 @@ #ifdef __GCCXML__ return EFalse; #else - return aContext.iNode.CountClients(Messages::TClientType(TYPE,FLAGS)) != 0; + TInt count = aContext.iNode.CountClients(Messages::TClientType(TYPE,FLAGS)); + MESH_LOG((KMeshMachineSubTag, _L8("TClientMutex Node [%08x] Activity [%08x]: Count Clients (%x, %x) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, TYPE, FLAGS, count)); + return count != 0; #endif } }; @@ -264,7 +315,9 @@ #ifdef __GCCXML__ return EFalse; #else - return aContext.iNode.CountClients(Messages::TClientType(TYPE,FLAGS)) == 0; + TInt count = aContext.iNode.CountClients(Messages::TClientType(TYPE,FLAGS)); + MESH_LOG((KMeshMachineSubTag, _L8("TNoClientMutex Node [%08x] Activity [%08x]: Count Clients (%x, %x) = %d"), aContext.NodeId().Ptr(), aContext.iNodeActivity, TYPE, FLAGS, count)); + return count == 0; #endif } }; diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwsupport/commselements/meshmachine/src/mm_node.cpp --- a/commsfwsupport/commselements/meshmachine/src/mm_node.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwsupport/commselements/meshmachine/src/mm_node.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -438,6 +438,13 @@ for (TInt i = iActivities.Count() - 1; i>=0; i--) { aContext.iNodeActivity = iActivities[i]; + + // We dont want to abort already idle activities or they may error. + if(aContext.iNodeActivity->IsIdle()) + { + continue; + } + if (caller != aContext.iNodeActivity) { if (abortAll) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/commstools/svg/parse.ini --- a/commsfwtools/commstools/svg/parse.ini Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/commstools/svg/parse.ini Mon Mar 15 12:45:15 2010 +0200 @@ -1,7 +1,7 @@ # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" +# 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". # diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/commstools/utracedecoder/data/esockmessages.definition.txt --- a/commsfwtools/commstools/utracedecoder/data/esockmessages.definition.txt Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/commstools/utracedecoder/data/esockmessages.definition.txt Mon Mar 15 12:45:15 2010 +0200 @@ -1007,6 +1007,8 @@ ECFDCStopped = 4 ECFCommsBinderRequest = 5 ECFCommsBinderResponse = 6 + ECFCommsBindToComplete = 7 + END ENUM MESSAGE Start @@ -1039,6 +1041,10 @@ MESSAGEID = KServiceProviderRealmId:ECFCommsBinderResponse END MESSAGE +MESSAGE CommsBindToComplete + SIGNATURE = TSigNumber + MESSAGEID = KServiceProviderRealmId:ECFCommsBindToComplete +END MESSAGE // ss_nodemessages_subconn_controlclient.h CONST KSubConnCCRealmId = 0x10285F50 diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_by_record_id.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_by_record_id.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_by_record_id.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,11 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +15,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01_IAP_append.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01_IAP_append.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01_IAP_append.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,11 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01_IAP_append_tricky.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01_IAP_append_tricky.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/ced/te_ced/configs/te_ced_reference_table01_IAP_append_tricky.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,11 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +15,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/92schema/Contents.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/92schema/Contents.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/92schema/Contents.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -16,7 +16,6 @@ XML file with the definitions of the XML Schema files to be used by the CommDB Editor in order to learn the structure of the CommDB tables - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/93schema/Contents.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/93schema/Contents.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/93schema/Contents.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -16,8 +16,7 @@ XML file with the definitions of the XML Schema files to be used by the CommDB Editor in order to learn the structure of the CommDB tables - All Rights Reserved - + --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/94schema/Contents.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/94schema/Contents.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/94schema/Contents.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -16,7 +16,6 @@ XML file with the definitions of the XML Schema files to be used by the CommDB Editor in order to learn the structure of the CommDB tables - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/95schema/Contents.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/95schema/Contents.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/95schema/Contents.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -16,7 +16,6 @@ XML file with the definitions of the XML Schema files to be used by the CommDB Editor in order to learn the structure of the CommDB tables - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/base_schema/Contents.xml --- a/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/base_schema/Contents.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/com/symbian/commdb/base_schema/Contents.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -16,7 +16,6 @@ XML file with the definitions of the XML Schema files to be used by the CommDB Editor in order to learn the structure of the CommDB tables - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/bld.inf --- a/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/bld.inf Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/bld.inf Mon Mar 15 12:45:15 2010 +0200 @@ -26,3 +26,4 @@ option SRCDIR ../version1/src #endif end + diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.pl --- a/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.pl Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.pl Mon Mar 15 12:45:15 2010 +0200 @@ -368,8 +368,8 @@ print("Copy $winsCdb to $zDriveCre\n"); CopyFile($winsCdb, $zDriveCre); - #print("Copy $winsCdb to $romCdb\n"); - #CopyFile($winsCdb, $romCdb); + print("Copy $winsCdb to $romCdb\n"); + CopyFile($winsCdb, $romCdb); } sub CheckCedLog diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapper.cpp --- a/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapper.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapper.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -1602,29 +1602,24 @@ } } - CCDAccessPointRecord* ipprotoAP = NULL; - - if (!CommsDatMapperAndValidator::IsIPProtoAPAlreadyExistL(linkAPTagId, iSession.iOwner)) + CCDAccessPointRecord* ipProtoAP = CommsDatMapperAndValidator::LoadIPProtoAccessPoint(linkAPTagId, iSession.iOwner); + + if (!ipProtoAP) { //The IPProto AP is not existing yet. Generate one. - ipprotoAP = CommsDatMapperAndValidator::GenerateIPProtoAPL(IPProtoBaseTagId, - linkAPTagId, - iSession.iOwner); - - CleanupStack::PushL(ipprotoAP); + ipProtoAP = CommsDatMapperAndValidator::GenerateIPProtoAPL(IPProtoBaseTagId, linkAPTagId, iSession.iOwner); + CleanupStack::PushL(ipProtoAP); //save the generated AP record - ipprotoAP->StoreL(iSession.iOwner); + ipProtoAP->StoreL(iSession.iOwner); } else { //The IPProto AP is already exsiting. Use that one. - ipprotoAP = CommsDatMapperAndValidator::LoadTheAPL(linkAPTagId, iSession.iOwner); - - CleanupStack::PushL(ipprotoAP); + CleanupStack::PushL(ipProtoAP); } - TMDBElementId elemId = ipprotoAP->ElementId(); + TMDBElementId elemId = ipProtoAP->ElementId(); elemId &= KCDMaskHideAttrAndRes; TMDBElementId tableAndRecordBitMask = KCDMaskShowRecordType | KCDMaskShowRecordId; elemId &= tableAndRecordBitMask; @@ -1642,7 +1637,7 @@ CommsDatMapperAndValidator::ModifyDefaultTierRecordL(elemId, iSession.iOwner); } - CleanupStack::PopAndDestroy(ipprotoAP); + CleanupStack::PopAndDestroy(ipProtoAP); } void CCDMapperIAPPrioritySelectionPolicyRecord::DeleteIPProtoAPL(CMDBRecordLink*& aAPPriorityField) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapperAndValidatorUtils.cpp --- a/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapperAndValidatorUtils.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapperAndValidatorUtils.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -157,8 +157,7 @@ apRecordToBeCreated->iCpr.SetL(templateForTheAPRec->iCpr); apRecordToBeCreated->iSCpr.SetL(templateForTheAPRec->iSCpr); apRecordToBeCreated->iProtocol.SetL(templateForTheAPRec->iProtocol); - CMDBField* custFiel = &(apRecordToBeCreated->iCustomSelectionPolicy); - *custFiel = aLinkLevelAPTagId; + apRecordToBeCreated->iCustomSelectionPolicy.SetL(aLinkLevelAPTagId); apRecordToBeCreated->iCprConfig.SetL(aLinkLevelAPTagId); CleanupStack::PopAndDestroy(templateForTheAPRec); @@ -309,49 +308,72 @@ return recId; } + +/* +Populates an access point record with the first matching IP Proto Access Point record. + +@param aAccessPoint An access point record that will be populated with data from the + first matching record. This can have fields primed in order to + make the match more specific +@param aSession The commsdat session to use +@return ETrue if a matching IP Proto access point is found. EFalse if it is not. +@exception KErrCorrupt if the IP Proto Tier entry is missing from the database. + It can leave with other errors from other parts of commsdat/cenrep +*/ +TBool CommsDatMapperAndValidator::FindIPProtoAccessPointRecordL(CommsDat::CCDAccessPointRecord& aAccessPoint, CommsDat::CMDBSession& aSession) + { + // Find the IP Proto tier record - we can then use this information to more efficently find the ip proto access points + CMDBField tierRecord; + tierRecord.SetElementId(KCDTIdTierRecord | KCDTIdRecordTag); + tierRecord.SetL(EIPProtoTierId); + TBool found = tierRecord.FindL(aSession); + if (!found) + { + __FLOG_STATIC0(KLogComponent, KCDInfoLog, _L("CommsDatMapperAndValidator::FindIPProtoAccessPointRecordL - ERROR: IP Proto Tier entry missing!!")); + User::Leave(KErrCorrupt); + } + + TMDBElementId tierElement; // This is where the AP record will link if it is an IP Proto AP + tierElement = tierRecord.ElementId() & (KCDMaskShowType | KCDMaskShowRecordId); + + aAccessPoint.iTier = tierElement; + found = aAccessPoint.FindL(aSession); + + return found; + } + TBool CommsDatMapperAndValidator::IsIPProtoAPAlreadyExistL(TInt aLinkLevelTagId, CommsDat::CMDBSession& aSession) { - TBool ret = EFalse; - - CMDBField* ipprotoCustSelPolField = new(ELeave)CMDBField(KCDTIdCustomSelectionPolicy); - CleanupStack::PushL(ipprotoCustSelPolField); - - *ipprotoCustSelPolField = aLinkLevelTagId; - - if (ipprotoCustSelPolField->FindL(aSession)) - { - ret = ETrue; - } - - CleanupStack::PopAndDestroy(ipprotoCustSelPolField); - - return ret; + CCDAccessPointRecord* ap = (CCDAccessPointRecord*)CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord); + CleanupStack::PushL(ap); + + ap->iCustomSelectionPolicy = aLinkLevelTagId; + + TBool found = FindIPProtoAccessPointRecordL(*ap, aSession); + CleanupStack::PopAndDestroy(ap); + + return found; } TBool CommsDatMapperAndValidator::IsIPProtoAPAlreadyExistL(TInt aLinkLevelTagId, TInt aConnPrefElementId, CommsDat::CMDBSession& aSession) { - TBool ret = EFalse; - - CCDAccessPointRecord* apRec = static_cast(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); - CleanupStack::PushL(apRec); - - apRec->iCprConfig = aConnPrefElementId; - apRec->iCustomSelectionPolicy = aLinkLevelTagId; - - if (apRec->FindL(aSession)) - { - ret = ETrue; - } - - CleanupStack::PopAndDestroy(apRec); - - return ret; + CCDAccessPointRecord* ap = (CCDAccessPointRecord*)CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord); + CleanupStack::PushL(ap); + + ap->iCprConfig = aConnPrefElementId; + ap->iCustomSelectionPolicy = aLinkLevelTagId; + + TBool found = FindIPProtoAccessPointRecordL(*ap, aSession); + CleanupStack::PopAndDestroy(ap); + + return found; } -CommsDat::CCDAccessPointRecord* CommsDatMapperAndValidator::LoadTheAPL(TInt aLinkLevelTagId, + +CommsDat::CCDAccessPointRecord* CommsDatMapperAndValidator::LoadIPProtoAccessPoint(TInt aLinkLevelTagId, CommsDat::CMDBSession& aSession) { CCDAccessPointRecord* apRec = static_cast(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); @@ -359,17 +381,17 @@ apRec->iCustomSelectionPolicy = aLinkLevelTagId; - if(!apRec->FindL(aSession)) - { - //no records were found with the given customSelectionPolicy value - User::Leave(KErrNotFound); - } + if (!FindIPProtoAccessPointRecordL(*apRec, aSession)) + { + CleanupStack::PopAndDestroy(apRec); + return NULL; + } - CleanupStack::Pop(apRec); - + CleanupStack::Pop(apRec); // ownership of the AP record is given to the caller return apRec; } + /* All of the APPrioritySelectionPolicy fields are exemined checking that how many * fields, in different APPrioritySelPol records, are referencing the given AP * record. The recordSet->FindL with a primed record is not suitable here because @@ -482,6 +504,7 @@ return refCount; } + TBool CommsDatMapperAndValidator::IsIAPRecInDB(CommsDat::CMDBSession& aSession) { TBool ret = EFalse; diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapperAndValidatorUtils.h --- a/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapperAndValidatorUtils.h Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapperAndValidatorUtils.h Mon Mar 15 12:45:15 2010 +0200 @@ -29,6 +29,7 @@ #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY +#include #include #include //KAfInet //forward declarations @@ -127,7 +128,8 @@ static TBool IsIPProtoAPAlreadyExistL(TInt aLinkLevelTagId, TInt aConnPrefElementId, CommsDat::CMDBSession& aSession); - static CommsDat::CCDAccessPointRecord* LoadTheAPL(TInt aLinkLevelTagId, CommsDat::CMDBSession& aSession); + static inline CommsDat::CCDAccessPointRecord* LoadIPProtoAccessPointL(TInt aLinkLevelTagId, CommsDat::CMDBSession& aSession); + static CommsDat::CCDAccessPointRecord* LoadIPProtoAccessPoint(TInt aLinkLevelTagId, CommsDat::CMDBSession& aSession); static TInt CountReferenceToThisIPProtoAPL(TUint aElementId, CommsDat::CMDBSession& aSession); @@ -151,11 +153,23 @@ CommsDatMapperAndValidator& operator=(const CommsDatMapperAndValidator&); static void CheckTheAPPrioritySelPolFromConnPrefModL(CommsDat::CCDAPPrioritySelectionPolicyRecord*& aAPSelPolRec); + static TBool FindIPProtoAccessPointRecordL(CommsDat::CCDAccessPointRecord& aAccessPoints, CommsDat::CMDBSession& aSession); }; //CommsDatMapperAndValidator +inline CommsDat::CCDAccessPointRecord* CommsDatMapperAndValidator::LoadIPProtoAccessPointL(TInt aLinkLevelTagId, CommsDat::CMDBSession& aSession) + { + CommsDat::CCDAccessPointRecord* ap = LoadIPProtoAccessPoint(aLinkLevelTagId, aSession); + if (!ap) + { + User::Leave(KErrNotFound); + } + return ap; + } + } //end of namespace CommsDatInternal #endif //SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY #endif //COMMSDATMAPPERANDVALIDATORUTILS_H + diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/src/CommsDatValidator.cpp --- a/commsfwtools/preparedefaultcommsdatabase/src/CommsDatValidator.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/src/CommsDatValidator.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -1927,7 +1927,7 @@ else { //The IPProto AP is already exsiting. Use that one. - ipprotoAP = CommsDatMapperAndValidator::LoadTheAPL(iLinkAPTagId, iSession.iOwner); + ipprotoAP = CommsDatMapperAndValidator::LoadIPProtoAccessPointL(iLinkAPTagId, iSession.iOwner); CleanupStack::PushL(ipprotoAP); } @@ -2044,7 +2044,8 @@ * a new one should be generated. */ - if (!CommsDatMapperAndValidator::IsIPProtoAPAlreadyExistL(iLinkAPTagId, iSession.iOwner)) + apRecordToBeModified = CommsDatMapperAndValidator::LoadIPProtoAccessPoint(iLinkAPTagId, iSession.iOwner); + if (!apRecordToBeModified) { //ok, there is no AP with the given customSelPol field apRecordToBeModified = static_cast(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); @@ -2058,8 +2059,6 @@ { //there is already an AP with the given customSelPol field //delete the currently used IPProto AP - apRecordToBeModified = CommsDatMapperAndValidator::LoadTheAPL(iLinkAPTagId, iSession.iOwner); - CleanupStack::PushL(apRecordToBeModified); CCDAccessPointRecord* apRecordToBeDeleted = static_cast(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); @@ -2119,7 +2118,7 @@ { //the given IPProto is already existing with the received Link TagId (and cprConfig //field if the connpref is prompting). Let's use that one - apRecordToBeModified = CommsDatMapperAndValidator::LoadTheAPL(iLinkAPTagId, iSession.iOwner); + apRecordToBeModified = CommsDatMapperAndValidator::LoadIPProtoAccessPointL(iLinkAPTagId, iSession.iOwner); CleanupStack::PushL(apRecordToBeModified); diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/src/MetaDatabaseVisitorRecordLink.cpp --- a/commsfwtools/preparedefaultcommsdatabase/src/MetaDatabaseVisitorRecordLink.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/src/MetaDatabaseVisitorRecordLink.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -207,9 +207,10 @@ TInt err = TMDBVisitor::LoadL(aSession, (*iElementId & ~KCDMaskShowRecordId) | (aRecordId & KCDMaskShowRecordId), aAttributeFlags); if (iOwner->Type() == ELink && - err == KErrNone ) + err == KErrNone && + iLinkedRecord != NULL) { - if (iLinkedRecord != NULL && *iLinkedRecord != NULL) + if (*iLinkedRecord != NULL) { CheckLinkedRecordL(iTarget->iValue); diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/te_commsdat/configs/te_commsdat.xml --- a/commsfwtools/preparedefaultcommsdatabase/te_commsdat/configs/te_commsdat.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/te_commsdat/configs/te_commsdat.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/te_commsdat/configs/te_commsdat_Wifi_table.xml --- a/commsfwtools/preparedefaultcommsdatabase/te_commsdat/configs/te_commsdat_Wifi_table.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/te_commsdat/configs/te_commsdat_Wifi_table.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwutils/commsbufs/mbufmgrimpl/src/MBufPoolManager.cpp --- a/commsfwutils/commsbufs/mbufmgrimpl/src/MBufPoolManager.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwutils/commsbufs/mbufmgrimpl/src/MBufPoolManager.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -265,6 +265,8 @@ } } + ASSERT(selectedPoolChain != NULL); // AO should only be triggered once a pool selected for growth + // Might have wrapped round all the PoolChains if ( (iNextMBufSize == KNoOutstandingRequests) && (lowestRequest != growThisPoolChain) ) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsprocess/commsrootserverconfig/group/backup_registration.xml --- a/commsprocess/commsrootserverconfig/group/backup_registration.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/commsprocess/commsrootserverconfig/group/backup_registration.xml Mon Mar 15 12:45:15 2010 +0200 @@ -4,7 +4,7 @@ Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/CoreProviders/src/coremcprstates.cpp --- a/datacommsserver/esockserver/CoreProviders/src/coremcprstates.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/CoreProviders/src/coremcprstates.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -397,8 +397,7 @@ DEFINE_SMELEMENT(TAwaitingClientLeaveAndNoClients, NetStateMachine::MState, MCprStates::TContext) TBool TAwaitingClientLeaveAndNoClients::Accept() { - CoreStates::TAwaitingClientLeave clientLeave(iContext); - if (clientLeave.Accept()) + if (iContext.iMessage.IsMessage() || iContext.iMessage.IsMessage()) { TClientIter iter = iContext.Node().GetClientIter(TClientType(TCFClientType::ECtrl|TCFClientType::EData)); __ASSERT_DEBUG(iter[0], User::Panic(KSpecAssert_ESockCrPrvMCPRSC, 5)); diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/bwins/esocksvrU.DEF --- a/datacommsserver/esockserver/bwins/esocksvrU.DEF Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/bwins/esocksvrU.DEF Mon Mar 15 12:45:15 2010 +0200 @@ -1,6 +1,6 @@ EXPORTS ?ThreadEntrypoint@CWorkerThread@@SAHPAX@Z @ 1 NONAME ; int CWorkerThread::ThreadEntrypoint(void *) - ?GetVDataTableStatic@TMCprGetConnectionSetting@ESock@@SAPBUSVDataTableEntry@Meta@@XZ @ 2 NONAME ; struct Meta::SVDataTableEntry const * ESock::TMCprGetConnectionSetting::GetVDataTableStatic(void) + ?GetVDataTableStatic@TMCprGetConnectionSetting@ESock@@SAPBUSVDataTableEntry@Meta@@XZ @ 2 NONAME ; struct Meta::SVDataTableEntry const * ESock::TMCprGetConnectionSetting::GetVDataTableStatic(void) ?Write@RInternalSocket@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 3 NONAME ; void RInternalSocket::Write(class TDesC8 const &, class TRequestStatus &) ?WorkerId@ESockLogExternal@@SAHXZ @ 4 NONAME ; int ESockLogExternal::WorkerId(void) ??0CConnectionSettings@@QAE@XZ @ 5 NONAME ; CConnectionSettings::CConnectionSettings(void) @@ -472,7 +472,7 @@ ?DoL@TSendBindTo@CoreNetStates@@UAEXXZ @ 471 NONAME ; void CoreNetStates::TSendBindTo::DoL(void) ?DoL@TSendBindToComplete@ABindingActivity@CoreActivities@@UAEXXZ @ 472 NONAME ; void CoreActivities::ABindingActivity::TSendBindToComplete::DoL(void) ?DoL@TSendBindToComplete@CoreNetStates@@UAEXXZ @ 473 NONAME ; void CoreNetStates::TSendBindToComplete::DoL(void) - ?DoL@TSendBindToCompleteIfExpected@ABindingActivity@CoreActivities@@UAEXXZ @ 474 NONAME ; void CoreActivities::ABindingActivity::TSendBindToCompleteIfExpected::DoL(void) + ?DoL@TSendBindToCompleteIfExpected@ABindingActivity@CoreActivities@@UAEXXZ @ 474 NONAME ABSENT; void CoreActivities::ABindingActivity::TSendBindToCompleteIfExpected::DoL(void) ?DoL@TSendBinderResponse@CCommsBinderActivity@PRActivities@@UAEXXZ @ 475 NONAME ; void PRActivities::CCommsBinderActivity::TSendBinderResponse::DoL(void) ?DoL@TSendClientLeavingAndRemoveControlProvider@CoreNetStates@@UAEXXZ @ 476 NONAME ; void CoreNetStates::TSendClientLeavingAndRemoveControlProvider::DoL(void) ?DoL@TSendClientLeavingAndRemoveControlProviderIfNoServiceProviders@CoreNetStates@@UAEXXZ @ 477 NONAME ; void CoreNetStates::TSendClientLeavingAndRemoveControlProviderIfNoServiceProviders::DoL(void) @@ -808,7 +808,7 @@ ?GetVTablePtr@TSendBindToComplete@ABindingActivity@CoreActivities@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 807 NONAME ; class NetStateMachine::MStateTransition * CoreActivities::ABindingActivity::TSendBindToComplete::GetVTablePtr(class TDesC8 &, void *) ?GetVTablePtr@TSendBindToComplete@CBindToActivity@PRActivities@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 808 NONAME ; class NetStateMachine::MStateTransition * PRActivities::CBindToActivity::TSendBindToComplete::GetVTablePtr(class TDesC8 &, void *) ?GetVTablePtr@TSendBindToComplete@CoreNetStates@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 809 NONAME ; class NetStateMachine::MStateTransition * CoreNetStates::TSendBindToComplete::GetVTablePtr(class TDesC8 &, void *) - ?GetVTablePtr@TSendBindToCompleteIfExpected@ABindingActivity@CoreActivities@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 810 NONAME ; class NetStateMachine::MStateTransition * CoreActivities::ABindingActivity::TSendBindToCompleteIfExpected::GetVTablePtr(class TDesC8 &, void *) + ?GetVTablePtr@TSendBindToCompleteIfExpected@ABindingActivity@CoreActivities@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 810 NONAME ABSENT; class NetStateMachine::MStateTransition * CoreActivities::ABindingActivity::TSendBindToCompleteIfExpected::GetVTablePtr(class TDesC8 &, void *) ?GetVTablePtr@TSendBinderResponse@CCommsBinderActivity@PRActivities@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 811 NONAME ; class NetStateMachine::MStateTransition * PRActivities::CCommsBinderActivity::TSendBinderResponse::GetVTablePtr(class TDesC8 &, void *) ?GetVTablePtr@TSendClientLeavingAndRemoveControlProvider@CoreNetStates@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 812 NONAME ; class NetStateMachine::MStateTransition * CoreNetStates::TSendClientLeavingAndRemoveControlProvider::GetVTablePtr(class TDesC8 &, void *) ?GetVTablePtr@TSendClientLeavingAndRemoveControlProviderIfNoServiceProviders@CoreNetStates@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 813 NONAME ; class NetStateMachine::MStateTransition * CoreNetStates::TSendClientLeavingAndRemoveControlProviderIfNoServiceProviders::GetVTablePtr(class TDesC8 &, void *) @@ -1044,4 +1044,6 @@ ?TierImplId@CTierManagerBase@ESock@@QBE?AVTUid@@XZ @ 1043 NONAME ; class TUid ESock::CTierManagerBase::TierImplId(void) const ?GetVTablePtr@TCancelStart@CoreNetStates@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 1044 NONAME ; class NetStateMachine::MStateTransition * CoreNetStates::TCancelStart::GetVTablePtr(class TDesC8 &, void *) ?CountParameterSets@RCFParameterFamilyBundleC@ESock@@QBEIXZ @ 1045 NONAME ; unsigned int ESock::RCFParameterFamilyBundleC::CountParameterSets(void) const + ?Self@PRClientLeft@PRClientLeftActivity@@SAABUTNodeActivity@MeshMachine@@XZ @ 1046 NONAME ; struct MeshMachine::TNodeActivity const & PRClientLeftActivity::PRClientLeft::Self(void) + ?FirstTriple@PRClientLeft@PRClientLeftActivity@@SAABUTStateTriple@NetStateMachine@@XZ @ 1047 NONAME ; struct NetStateMachine::TStateTriple const & PRClientLeftActivity::PRClientLeft::FirstTriple(void) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/core_states/ss_corepractivities.cpp --- a/datacommsserver/esockserver/core_states/ss_corepractivities.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/core_states/ss_corepractivities.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -108,10 +108,51 @@ NODEACTIVITY_END() } + +namespace PRDestroyOrphansActivity +{ +DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityDestroyOrphans, PRDestroyOrphans, TCFMessage::TDestroyOrphans, CoreActivities::CDestroyOrphansActivity::New) + // Destroy non-Default Data clients first (as there can be references from non-Default Data clients to the Default Data client) + FIRST_NODEACTIVITY_ENTRY(MeshMachine::TAwaitingMessageState, PRStates::TOrphansOrNoTag) + NODEACTIVITY_ENTRY(KOrphans, PRStates::TDestroyFirstOrphan, MeshMachine::TAwaitingMessageState, MeshMachine::TTag) + THROUGH_NODEACTIVITY_ENTRY(KContinue, PRStates::TProcessClientLeft, PRStates::TOrphansBackwardsOrNoTag) + ROUTING_NODEACTIVITY_ENTRY(KNoTag, CDestroyOrphansActivity::TNoTagOrNoClients) + LAST_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing) + + // At this point, there are no Data or Control clients, so leave the Service Providers (if any) and destroy the node. + // (Can we just modify the above tuples so that they do not accept the very last TLeft, and thus leave it + // to MCPrDestroyActivity or PRClientLeftActivity to accept and do the destruction for us?). + + // If Control Provider is present, send a TIdle message. + THROUGH_NODEACTIVITY_ENTRY(KNoClients, CoreNetStates::TSendDataClientIdle, TNoTag) + // If Control Provider is present, terminate the activity (KNoTag), as + // Control Provider will send us a TDestroy in response to the TIdle message. + ROUTING_NODEACTIVITY_ENTRY(KNoTag, CDestroyOrphansActivity::TControlProviderNoTagOrNoClients) + LAST_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing) + + // No Control Provider - leave Service Providers (if any) and destroy the node. + ROUTING_NODEACTIVITY_ENTRY(KNoClients, CoreNetStates::TNoTagOrNoBearer) + THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendClientLeavingRequestToServiceProviders, TNoTag) + NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing, MeshMachine::TAwaitingLeaveComplete, CDestroyOrphansActivity::TNoTagOrNoTagBackwards) + + ROUTING_NODEACTIVITY_ENTRY(KNoBearer, TNoTag) + LAST_NODEACTIVITY_ENTRY(KNoTag, CDestroyOrphansActivity::TMarkNodeForDestruction) + // Node will be destroyed in CDestroyOrphansActivity::Destroy() +NODEACTIVITY_END() +} + namespace PRClientLeaveActivity {//This activity will wait for ECFActivityBinderRequest to complete -DEFINE_EXPORT_NODEACTIVITY(ECFActivityClientLeave, PRClientLeave, TNodeSignal::TNullMessageId) //May be waiting for both messages -NODEACTIVITY_ENTRY(KNoTag, PRStates::TProcessClientLeave, CoreStates::TAwaitingClientLeave, MeshMachine::TNoTag) +DEFINE_EXPORT_NODEACTIVITY(ECFActivityClientLeave, PRClientLeave, Messages::TEPeer::TLeaveRequest) + NODEACTIVITY_ENTRY(KNoTag, PRStates::TProcessClientLeave, MeshMachine::TAwaitingMessageState, MeshMachine::TNoTag) +NODEACTIVITY_END() +} + +namespace PRClientLeftActivity +{ +//This activity waits for TLeft which is a response to destroy, shouldn't really be needed +DEFINE_EXPORT_NODEACTIVITY(ECFActivityClientLeft, PRClientLeft, Messages::TEChild::TLeft) + NODEACTIVITY_ENTRY(KNoTag, PRStates::TProcessClientLeft, MeshMachine::TAwaitingMessageState, MeshMachine::TNoTag) NODEACTIVITY_END() } @@ -135,12 +176,9 @@ DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityDestroy, PRDestroy, TEChild::TDestroy, CoreActivities::CDestroyActivity::New) FIRST_NODEACTIVITY_ENTRY(MeshMachine::TAwaitingDestroy, CoreActivities::CDestroyActivity::TNoTagBlockedByActivitiesOrLeavingDataClient) - //Stop self first - NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, CoreStates::TNoTagOrNoClients) - - //The node mustn't go out of scope with clients present. The node must get rid of them first. - NODEACTIVITY_ENTRY(KNoTag, CoreActivities::CDestroyActivity::TMakeClientsLeaveOrProcessClientLeave, CoreStates::TAwaitingClientLeave, CDestroyActivity::TNoTagOrNoTagBackwards) - THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreActivities::CDestroyActivity::TProcessClientLeave, TTag) + ROUTING_NODEACTIVITY_ENTRY(KNoTag, PRStates::TNonLeavingNoTagOrNoClients) + NODEACTIVITY_ENTRY(KNoTag, PRStates::TDestroyFirstClient, MeshMachine::TAwaitingMessageState, MeshMachine::TTag) + THROUGH_NODEACTIVITY_ENTRY(KContinue, PRStates::TProcessClientLeft, PRStates::TNoTagBackwardsOrNoClients) THROUGH_NODEACTIVITY_ENTRY(KNoClients, PRStates::TProcessDestroy, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing, MeshMachine::TAwaitingLeaveComplete, CoreActivities::CDestroyActivity::TNoTagOrNoTagBackwards) @@ -296,6 +334,8 @@ THROUGH_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing, CoreNetStates::TNoTagOrUnbindOnStop) NODEACTIVITY_ENTRY(CoreNetStates::KUnbind, CoreNetStates::TSendClientLeavingRequestToServiceProvider, MeshMachine::TAwaitingLeaveComplete, MeshMachine::TNoTag) + // Note that if CMMCommsProviderBase::DestroyOrphanedDataClients() finds this activity running, it + // will do nothing and assume that destruction of orphans will be initiated below. THROUGH_NODEACTIVITY_ENTRY(KNoTag, PRStates::TDestroyOrphanedDataClients, MeshMachine::TNoTag) LAST_NODEACTIVITY_ENTRY(KNoTag, PRStates::TSendDataClientStopped) NODEACTIVITY_END() @@ -632,7 +672,7 @@ : CNodeRetryActivity(aActivitySig, aNode), APreallocatedOriginators<1>(iOriginators) { - //Mark the provider for deletion, so that it's not served by the factory from now on. + //Mark the provider for deletion, so that it's not served by the factory from now on. static_cast(iNode).MarkMeForDeletion(); } @@ -645,16 +685,6 @@ static_cast(iNode).DeleteMeNow(); } -TBool CDestroyActivity::Next(TNodeContextBase& aContext) - { - if (aContext.iMessage.IsMessage()) - { - return ETrue; - } - else - return CNodeActivityBase::Next(aContext); - } - EXPORT_DEFINE_SMELEMENT(CDestroyActivity::TNoTagOrNoTagBackwards, NetStateMachine::MStateFork, PRStates::TContext) EXPORT_C TInt CDestroyActivity::TNoTagOrNoTagBackwards::TransitionTag() { @@ -703,13 +733,18 @@ __ASSERT_DEBUG(iContext.Node().GetFirstClient(TClientType(TCFClientType::EData, TCFClientType::EActive|TCFClientType::EActivating|TCFClientType::EStarting|TCFClientType::EStarted))==NULL, User::Panic(KCorePrPanic, KPanicClientsStillPresent)); - TClientIter dciter = iContext.Node().GetClientIter(TClientType(TCFClientType::EData), TClientType(0, TCFClientType::ELeaving)); - RNodeInterface* dc = NULL; - while ((dc = dciter[0]) != NULL) //always inspect the first elem as we're invalidating the iterator with each hit. - { - dc->PostMessage(iContext.NodeId(), TEChild::TDestroy().CRef()); - dc->SetFlags(TCFClientType::ELeaving); - } + iContext.Node().PostToClients(iContext.NodeId(), + TEChild::TDestroy().CRef(), + TClientType(TCFClientType::EData), + TClientType(0, TCFClientType::ELeaving|TCFClientType::EDefault), + TClientType::ELeaving + ); + iContext.Node().PostToClients(iContext.NodeId(), + TEChild::TDestroy().CRef(), + TClientType(TCFClientType::EData), + TClientType(0, TCFClientType::ELeaving), + TClientType::ELeaving + ); } void CDestroyActivity::TMakeClientsLeaveOrProcessClientLeave::ProcessClientLeaveL() @@ -718,6 +753,114 @@ processClientLeave.DoL(); } +//-========================================================= +// +// Destroy Orphan Activity - will delete the node when destructed +// if TMarkNodeForDestruction tuple has been called. +// +//-========================================================= + +CNodeActivityBase* CDestroyOrphansActivity::New(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) + { + TAny* space = BorrowPreallocatedSpace(aNode, sizeof(CDestroyOrphansActivity)); + CDestroyOrphansActivity* self = new (space) CDestroyOrphansActivity(aActivitySig, aNode); + self->InsertPreallocatedDestroyActivity(); //Destructing preallocated activity + return self; + } + +CDestroyOrphansActivity::CDestroyOrphansActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) + : MeshMachine::CNodeActivityBase(aActivitySig, aNode), + MeshMachine::APreallocatedOriginators<1>(iOriginators) + { + } + +CDestroyOrphansActivity::~CDestroyOrphansActivity() + { + } + +void CDestroyOrphansActivity::Destroy() + { + ReturnPreallocatedSpace(this); + if (DestroyFlag() && iNode.CountActivities(ECFActivityDestroy) == 0) + { + static_cast(iNode).MarkMeForDeletion(); + this->~CDestroyOrphansActivity(); //Run the destructor + static_cast(iNode).DeleteMeNow(); + } + else + { + this->~CDestroyOrphansActivity(); //Run the destructor + } + } + +void CDestroyOrphansActivity::SetDestroyFlag() + { + iDestroyFlag = ETrue; + } + +TBool CDestroyOrphansActivity::DestroyFlag() const + { + return iDestroyFlag; + } + +DEFINE_SMELEMENT(CDestroyOrphansActivity::TMarkNodeForDestruction, NetStateMachine::MStateTransition, CDestroyOrphansActivity::TContext) +void CDestroyOrphansActivity::TMarkNodeForDestruction::DoL() +/** +Flag that the node should be destroyed when the activity completes. +*/ + { + CDestroyOrphansActivity* act = static_cast(iContext.Activity()); + ASSERT(act); + act->SetDestroyFlag(); + } + +// This is a copy from CDestroyActivity. +DEFINE_SMELEMENT(CDestroyOrphansActivity::TNoTagOrNoTagBackwards, NetStateMachine::MStateFork, CDestroyOrphansActivity::TContext) +TInt CDestroyOrphansActivity::TNoTagOrNoTagBackwards::TransitionTag() + { + if (iContext.iMessage.IsMessage()) + { + TClientIter iter = iContext.Node().GetClientIter(TClientType(TCFClientType::EData|TCFClientType::ECtrl)); + __ASSERT_DEBUG(iter[0], User::Panic(KSpecAssert_ESockCrStaCPRAC, 7)); //One leaving client must still be there. + return iter[1] == NULL ? MeshMachine::KNoTag : MeshMachine::KNoTag | NetStateMachine::EBackward; + } + else if (iContext.iMessage.IsMessage()) + { + __ASSERT_DEBUG(iContext.Node().GetFirstClient(TClientType(TCFClientType::ECtrl|TCFClientType::EData))==NULL, + User::Panic(KCorePrPanic, KPanicClientsStillPresent)); + if (iContext.Node().GetFirstClient(TClientType(TCFClientType::EServProvider))==NULL) + { + return NetStateMachine::EForward | MeshMachine::KNoTag; + } + return NetStateMachine::EBackward | MeshMachine::KNoTag; //Loop back to the same triple (& remove the peer) + } + __ASSERT_DEBUG(EFalse, User::Panic(KSpecAssert_ESockCrStaCPRAC, 8)); + return KNoTag; + } + +DEFINE_SMELEMENT(CDestroyOrphansActivity::TNoTagOrNoClients, NetStateMachine::MStateFork, CDestroyOrphansActivity::TContext) +TInt CDestroyOrphansActivity::TNoTagOrNoClients::TransitionTag() +/** +If the Destroy activity is not running and there are no data/control clients, return KNoClients, else return KNoTag. +*/ + { + if (iContext.Node().CountActivities(ECFActivityDestroy)) + { + return KNoTag; + } + CoreStates::TNoTagOrNoClients fork(iContext); + return fork.TransitionTag(); + } + + +DEFINE_SMELEMENT(CDestroyOrphansActivity::TControlProviderNoTagOrNoClients, NetStateMachine::MStateFork, CDestroyOrphansActivity::TContext) +TInt CDestroyOrphansActivity::TControlProviderNoTagOrNoClients::TransitionTag() +/** +If there is a Control Provider, return KNoTag, else return KNoClients +*/ + { + return iContext.Node().ControlProvider() ? KNoTag : KNoClients; + } //-========================================================= // @@ -794,8 +937,10 @@ //If you are not providing a clean error handling solution for your activity, //please use IsBinding() before calling this API! __ASSERT_DEBUG(!iOriginator.IsNull(), User::Panic(KSpecAssert_ESockCrStaCPRAC, 10)); //The iOriginator must be set. - RClientInterface::OpenPostMessageClose(iOurNode, iOriginator, TCFDataClient::TBindToComplete(aError).CRef()); - iOriginator.SetNull(); + + RClientInterface::OpenPostMessageClose(iOurNode, iOriginator, TCFServiceProvider::TBindToComplete(aError).CRef()); + + iOriginator.SetNull(); } EXPORT_DEFINE_SMELEMENT(ABindingActivity::TSendBindToComplete, NetStateMachine::MStateTransition, CoreStates::TContext) @@ -807,18 +952,6 @@ bindingActivity->ReplyToOriginator(iContext.iNodeActivity->Error()); } -EXPORT_DEFINE_SMELEMENT(ABindingActivity::TSendBindToCompleteIfExpected, NetStateMachine::MStateTransition, CoreStates::TContext) -EXPORT_C void ABindingActivity::TSendBindToCompleteIfExpected::DoL() - { - __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KCorePrPanic, KPanicNoActivity)); - __ASSERT_DEBUG(iContext.iNodeActivity->SupportsExtInterface(ABindingActivity::KInterfaceId), User::Panic(KSpecAssert_ESockCrStaCPRAC, 12)); - ABindingActivity* bindingActivity = reinterpret_cast(iContext.iNodeActivity->FetchExtInterfaceL(ABindingActivity::KInterfaceId)); - if (bindingActivity->IsBinding()) - { - bindingActivity->ReplyToOriginator(iContext.iNodeActivity->Error()); - } - } - void ABindingActivity::FinalReplyToOriginator(TInt aError) /** Intended to be called from derived class destructors to arrange for a TBindToComplete reply to be sent @@ -841,9 +974,11 @@ DECLARE_DEFINE_ACTIVITY_MAP(coreActivitiesPR) ACTIVITY_MAP_ENTRY(PRDataClientJoinActivity, PRDataClientJoin) ACTIVITY_MAP_ENTRY(PRControlClientJoinActivity, PRControlClientJoin) - ACTIVITY_MAP_ENTRY(PRClientLeaveActivity, PRClientLeave) + ACTIVITY_MAP_ENTRY(PRClientLeftActivity, PRClientLeft) + ACTIVITY_MAP_ENTRY(PRClientLeaveActivity, PRClientLeave) ACTIVITY_MAP_ENTRY(PRForwardStateChangeActivity, PRForwardStateChange) ACTIVITY_MAP_ENTRY(PRBindToActivity, PRBindTo) + ACTIVITY_MAP_ENTRY(PRDestroyOrphansActivity, PRDestroyOrphans) ACTIVITY_MAP_END_BASE(CoreActivities,coreActivitiesAll) //Activity Map provided by CorePr to be used by SCprs. @@ -894,6 +1029,7 @@ ACTIVITY_MAP_ENTRY(PRDataClientActiveActivity, PRDataClientActive) ACTIVITY_MAP_ENTRY(PRDataClientStatusChangeActivity, PRDataClientStatusChange) ACTIVITY_MAP_ENTRY(PRLegacyRMessage2HandlerActivity, PRLegacyRMessage2Handler) + ACTIVITY_MAP_ENTRY(PRDestroyActivity, PRDestroy) ACTIVITY_MAP_END_BASE(PRActivities,coreActivitiesPR) //Activity Map provided by CorePr to be used by TMs. @@ -1319,18 +1455,20 @@ //clients in at the current owner. for (TInt i = 0; i < iDataClients.Count(); i++) { - if (!(iDataClients[i].iDataClient.Flags() & TCFClientType::EActive)) + Messages::RNodeInterface& dataClient = iDataClients[i].iDataClient; + if (!(dataClient.Flags() & TCFClientType::EActive)) { #ifndef __GCCXML__ - //If the dataclient managed to report idle in the mean time, have him destroyed - RClientInterface::OpenPostMessageClose(iNode.Id(), iDataClients[i].iDataClient.RecipientId(), TEChild::TDestroy().CRef()); + //If the dataclient managed to report idle in the mean time, have him destroyed + RClientInterface::OpenPostMessageClose(iNode.Id(), dataClient.RecipientId(), TEChild::TDestroy().CRef()); + dataClient.SetFlags(TCFClientType::ELeaving); #endif } - iDataClients[i].iDataClient.ClearFlags(TCFClientType::EActivating); + dataClient.ClearFlags(TCFClientType::EActivating); #ifndef __GCCXML__ //Simulate client leaving on the new owner. - RClientInterface::OpenPostMessageClose(iDataClients[i].iDataClient.RecipientId(), iDataClients[i].iNewOwner, - TEChild::TLeft().CRef()); + RClientInterface::OpenPostMessageClose(dataClient.RecipientId(), iDataClients[i].iNewOwner, + TEChild::TLeft().CRef()); #endif } } @@ -1711,19 +1849,23 @@ intf->SendCustomFlowProvision(); } - + EXPORT_DEFINE_SMELEMENT(CCommsBinderActivity::TAwaitingBindToComplete, NetStateMachine::MState, PRStates::TContext) EXPORT_C TBool CCommsBinderActivity::TAwaitingBindToComplete::Accept() - { - CoreNetStates::TAwaitingBindToComplete awaitingBindToComplete(iContext); - if (awaitingBindToComplete.Accept()) - { + { + TCFServiceProvider::TBindToComplete* bindToComplete = message_cast(&iContext.iMessage); + if (bindToComplete) + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KCorePrPanic, KPanicNoActivity)); + iContext.iNodeActivity->SetError(bindToComplete->iValue); + CCommsBinderActivity* binderActivity = reinterpret_cast(iContext.iNodeActivity->FetchExtInterface(CCommsBinderActivity::KInterfaceId)); __ASSERT_DEBUG(binderActivity, User::Panic(KSpecAssert_ESockCrStaCPRAC, 30)); binderActivity->BindToComplete(); - iContext.Node().DestroyOrphanedDataClients(); - return ETrue; - } + iContext.Node().DestroyOrphanedDataClients(); + return ETrue; + } + return EFalse; } @@ -1911,7 +2053,7 @@ TClientType(TCFClientType::ECtrl), TClientType(0, TCFClientType::ELeaving)); RNodeInterface* ctrlClient = NULL; - while ( (ctrlClient = iter++) ) + while ( (ctrlClient = iter++) != NULL ) { // Let control clients know the node has gone down, other than those that originated Start (they will be errored by ~CNodeActivityBase)... if (FindOriginator(*ctrlClient) >= 0) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/core_states/ss_corepractivities.h --- a/datacommsserver/esockserver/core_states/ss_corepractivities.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/core_states/ss_corepractivities.h Mon Mar 15 12:45:15 2010 +0200 @@ -14,7 +14,6 @@ // Core PR Activities // // - /** @file @internalComponent @@ -27,12 +26,12 @@ #include #include #include +#include #include #include #include - namespace CoreErrorActivity { //If found in node activity map is ran by the MM whenewer an error is received //and not processed by its target activity @@ -54,6 +53,11 @@ DECLARE_EXPORT_NODEACTIVITY(PRClientLeave) } +namespace PRClientLeftActivity +{ //This activity does not need the activity object + DECLARE_EXPORT_NODEACTIVITY(PRClientLeft) +} + namespace PRDataClientIdleActivity { //TAwaitingDataClientIdle will only accept if no more clients joined to the node static const TInt KDataClientNotStarted = 1; // idle data client is not started @@ -172,9 +176,8 @@ IMPORT_C static MeshMachine::CNodeActivityBase* New(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); protected: - CDestroyActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); - virtual void Destroy(); - virtual TBool Next(MeshMachine::TNodeContextBase& aContext); + CDestroyActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); + virtual void Destroy(); //States, StateForks & StateTransitions protected: @@ -197,7 +200,7 @@ CoreNetStates::TSendLeaveCompleteIfRequest ) - typedef MeshMachine::TActivitiesIdMutex TAllStopActivityMutex; + typedef MeshMachine::TActivitiesIdMutex TAllStopActivityMutex; typedef MeshMachine::TActivityIdMutex TClientLeaveMutex; typedef MeshMachine::TClientMutex TLeavingDataClientMutex; typedef MeshMachine::TAggregatedMutex_OR TAllStopActivityOrLeavingDataClientMutex; @@ -216,6 +219,47 @@ static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); }; +//-========================================================= +// +// DestroyOrphans Activity - will delete the node when destructed +// if TMarkNodeForDestruction tuple has been called. +// +//-========================================================= + +NONSHARABLE_CLASS(CDestroyOrphansActivity) : public MeshMachine::CNodeActivityBase, protected MeshMachine::APreallocatedOriginators<1> + { +public: + typedef PRStates::TContext TContext; + + static CNodeActivityBase* New( const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode ); + void SetDestroyFlag(); + TBool DestroyFlag() const; + + DECLARE_SMELEMENT_HEADER( TMarkNodeForDestruction, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) + virtual void DoL(); + DECLARE_SMELEMENT_FOOTER( TMarkNodeForDestruction ) + + DECLARE_SMELEMENT_HEADER( TNoTagOrNoTagBackwards, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext ) + virtual TInt TransitionTag(); + DECLARE_SMELEMENT_FOOTER( TNoTagOrNoTagBackwards ) + + DECLARE_SMELEMENT_HEADER( TNoTagOrNoClients, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext ) + virtual TInt TransitionTag(); + DECLARE_SMELEMENT_FOOTER( TNoTagOrNoClients ) + + DECLARE_SMELEMENT_HEADER( TControlProviderNoTagOrNoClients, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext ) + virtual TInt TransitionTag(); + DECLARE_SMELEMENT_FOOTER( TControlProviderNoTagOrNoClients ) + + ~CDestroyOrphansActivity(); + +protected: + explicit CDestroyOrphansActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); + virtual void Destroy(); + +private: + TBool iDestroyFlag; // whether to destroy node on destruction of activity + }; //-========================================================= // @@ -287,9 +331,13 @@ //-========================================================= class ABindingActivity /* -The interface must be implemented by activities featuring (using) PRStates::TSendBindToComplete. -ABindingActivity can store the activityId and the originator expecting intermediate -TBindToComplete. The originator might have sent either a TBindTo or TCommsBinderResponse. +ABindingActivity is a helper class for activities requesting binders (sending TCFServiceProvider::TCommsBinderRequest) and, +following consumption of the binder, needing to respond to the recipient of TCFServiceProvider::TCommsBinderRequest with +TCFServiceProvider::TBindToComplete as implied by the TCFServiceProvider::TCommsBinderRequest protocol. Such activities, +after they receive TCFServiceProvider::TCommsBinderResponse need to remember the TNodeCtxId of the sender in order to +correctly respond with TCFServiceProvider::TBindToComplete. They can remember the sender of +TCFServiceProvider::TCommsBinderResponse by calling ABindingActivity::StoreOriginator and subsequently respond by using +ABindingActivity::TSendBindToComplete. */ { public: @@ -323,16 +371,7 @@ EXPORT_DECLARE_SMELEMENT_HEADER( TSendBindToComplete, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) IMPORT_C virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TSendBindToComplete ) - - EXPORT_DECLARE_SMELEMENT_HEADER( TSendBindToCompleteIfExpected, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) - IMPORT_C virtual void DoL(); - DECLARE_SMELEMENT_FOOTER( TSendBindToCompleteIfExpected ) - - DECLARE_AGGREGATED_TRANSITION2( - TSendBindToCompleteAndRequestCommsBinder, - TSendBindToComplete, - CoreNetStates::TRequestCommsBinder - ) + }; } //namespace CoreActivities diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/core_states/ss_coreprstates.cpp --- a/datacommsserver/esockserver/core_states/ss_coreprstates.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/core_states/ss_coreprstates.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -79,6 +79,8 @@ using namespace MeshMachine; using namespace Factories; +const TUint32 KOrphanExcludeFlags = TCFClientType::EActive|TCFClientType::EActivating|TCFClientType::ELeaving|TCFClientType::EStarted|TCFClientType::EStarting; + //-========================================================= // // Panics @@ -393,8 +395,7 @@ EXPORT_DEFINE_SMELEMENT(TAwaitingClientLeave, NetStateMachine::MState, CoreStates::TContext) EXPORT_C TBool TAwaitingClientLeave::Accept() { - return iContext.iMessage.IsMessage() - || iContext.iMessage.IsMessage(); + return iContext.iMessage.IsMessage() || iContext.iMessage.IsMessage(); } EXPORT_DEFINE_SMELEMENT(TDestroyOrphanedDataClients, NetStateMachine::MStateTransition, PRStates::TContext) @@ -520,7 +521,6 @@ __ASSERT_DEBUG(iContext.iPeer, User::Panic(KSpecAssert_ESockCrStaCPRSC, 13)); __ASSERT_DEBUG(iContext.iPeer->Type()==TCFClientType::EData, User::Panic(KSpecAssert_ESockCrStaCPRSC, 14)); - __CFLOG_VAR((KCoreProviderStatesTag, KCoreProviderStatesSubTag, _L8("TSendDestroyToSendingDataClient::DoL - iContext.iPeer->Flags(): %x"), iContext.iPeer->Flags())); if (!(iContext.iPeer->Flags() & (TCFClientType::EActivating|TCFClientType::EStarting|TCFClientType::ELeaving|TCFClientType::EStarted))) { @@ -529,7 +529,8 @@ iContext.Node().CountClients(TClientType(TCFClientType::EData), TClientType(0, TCFClientType::EDefault)) > 0)) { - iContext.iPeer->PostMessage(iContext.NodeId(), TEChild::TDestroy().CRef()); + // Send from null activity so no cancel message can ever get at it. + iContext.iPeer->PostMessage(Messages::TNodeCtxId(MeshMachine::KActivityNull, iContext.NodeId()), TEChild::TDestroy().CRef()); iContext.iPeer->SetFlags(TClientType::ELeaving); } else @@ -687,7 +688,7 @@ } if (iContext.iPeer) { - iContext.iPeer->ClearFlags(TCFClientType::EStopping); + iContext.iPeer->ClearFlags(TCFClientType::EStarted | TCFClientType::EStopping); } if (iContext.Node().CountClients(TClientType(TCFClientType::EData, TCFClientType::EStopping))) { @@ -909,7 +910,7 @@ if (cl) { __ASSERT_DEBUG(iContext.iNodeActivity, CorePrPanic(KPanicNoActivity)); - cl->PostMessage(TNodeCtxId(iContext.ActivityId(), iContext.NodeId()), TEChild::TLeft().CRef()); + iContext.iNodeActivity->PostToOriginators(TEChild::TLeft().CRef()); iContext.Node().RemoveClient(cl->RecipientId(),iContext); __ASSERT_DEBUG(iter[1] == NULL, User::Panic(KSpecAssert_ESockCrStaCPRSC, 19)); //But it is not possible to have two Control Providers! } @@ -1359,7 +1360,7 @@ EXPORT_C void TSendBindToComplete::DoL() { __ASSERT_DEBUG(iContext.iNodeActivity, CorePrPanic(KPanicNoActivity)); - iContext.iNodeActivity->PostToOriginators(TCFDataClient::TBindToComplete(iContext.iNodeActivity->Error()).CRef()); + iContext.iNodeActivity->PostToOriginators(TCFDataClient::TBindToComplete().CRef()); } EXPORT_DEFINE_SMELEMENT(TBindSelfToPresentBearer, NetStateMachine::MStateTransition, CoreNetStates::TContext) @@ -1506,18 +1507,7 @@ EXPORT_DEFINE_SMELEMENT(TAwaitingBindTo, NetStateMachine::MState, CoreStates::TContext) EXPORT_C TBool TAwaitingBindTo::Accept() { - const TCFDataClient::TBindTo* bindToMessage = message_cast(&iContext.iMessage); - if (bindToMessage) - { - //TBindTo is always a response. there's gotta be an activity. - if (iContext.iNodeActivity && iContext.iNodeActivity->SupportsExtInterface(ABindingActivity::KInterfaceId)) - { - ABindingActivity* bindingActivity = reinterpret_cast(iContext.iNodeActivity->FetchExtInterface(ABindingActivity::KInterfaceId)); - bindingActivity->StoreOriginator(iContext.iSender); - } - return ETrue; - } - return EFalse; + return iContext.iMessage.IsMessage(); } EXPORT_DEFINE_SMELEMENT(TAwaitingBindToOrCancel, NetStateMachine::MState, CoreStates::TContext) @@ -1612,14 +1602,7 @@ EXPORT_DEFINE_SMELEMENT(CoreNetStates::TAwaitingBindToComplete, NetStateMachine::MState, CoreNetStates::TContext) EXPORT_C TBool CoreNetStates::TAwaitingBindToComplete::Accept() { - TCFDataClient::TBindToComplete* bindToComplete = message_cast(&iContext.iMessage); - if (bindToComplete) - { - __ASSERT_DEBUG(iContext.iNodeActivity, CorePrPanic(KPanicNoActivity)); - iContext.iNodeActivity->SetError(bindToComplete->iValue); - return ETrue; - } - return EFalse; + return iContext.iMessage.IsMessage(); } EXPORT_DEFINE_SMELEMENT(TAwaitingProvision, NetStateMachine::MState, PRStates::TContext) @@ -1867,7 +1850,7 @@ EXPORT_DEFINE_SMELEMENT(TNoTagOrNoClients, NetStateMachine::MStateFork, CoreNetStates::TContext) TInt TNoTagOrNoClients::TransitionTag() /** -Returns KNoTag uif sender is marked EDefault, else CoreNetStates::KNonDefault. +Return KNoTag if there are data or control clients, else return KNoClients. */ { return iContext.Node().CountClients(TClientType(TCFClientType::EData | TCFClientType::ECtrl))? KNoTag : KNoClients; @@ -2185,3 +2168,128 @@ } } +//-========================================================= +// +// PRDestroyOrphans and PRDestroy +// +//-========================================================= + +void DestroyFirstClient(PRStates::TContext& aContext, const TClientType& aIncClientType, const TClientType& aExcClientType = TClientType::NullType()) +/** +Send a TDestroy to the first non-default data client, or to the default data client if there +are no non-default data clients. We need to destroy the non-default data clients before the default data +client because there can be internal references from non-default clients to the default data client. + +The include and exclude iteration parameters are used to narrow the data client list as the caller requires. +*/ + { + TClientIter iter = aContext.Node().GetClientIter(aIncClientType, aExcClientType); + + RNodeInterface* client = NULL; + RNodeInterface* defaultClient = NULL; + while ((client = iter++) != NULL) + { + if (!(client->Flags() & TCFClientType::EDefault)) + { + // Found a non-default data client, so destroy it. + break; + } + else + { + // Remember default data client. Destroy it only if no non-default data clients. + if (defaultClient == NULL) + { + defaultClient = client; + } + } + } + + if (client == NULL) + { + client = defaultClient; + } + // Should we panic if client is NULL? + if (client) + { + aContext.iNodeActivity->PostRequestTo(*client, TEChild::TDestroy().CRef()); + client->SetFlags(TClientType::ELeaving); + } + } + +DEFINE_SMELEMENT(TDestroyFirstOrphan, NetStateMachine::MStateTransition, PRStates::TContext) +void TDestroyFirstOrphan::DoL() +/** +Destroy first orphan data client +*/ + { + DestroyFirstClient(iContext, TClientType(TCFClientType::EData), TClientType(0, KOrphanExcludeFlags)); + } + +DEFINE_SMELEMENT(TDestroyFirstClient, NetStateMachine::MStateTransition, PRStates::TContext) +void TDestroyFirstClient::DoL() +/** +Destroy first data client +*/ + { + DestroyFirstClient(iContext, TClientType(TCFClientType::EData), TClientType(0, TCFClientType::ELeaving)); + } + +DEFINE_SMELEMENT(TOrphansOrNoTag, NetStateMachine::MStateFork, PRStates::TContext) +TInt TOrphansOrNoTag::TransitionTag() +/** +If there are orphan data clients present, return KOrphans, else return KNoTag +*/ + { + if (iContext.Node().CountClients( + TClientType(TCFClientType::EData), TClientType(0, KOrphanExcludeFlags))) + { + return KOrphans; + } + return KNoTag; + } + +DEFINE_SMELEMENT(TOrphansBackwardsOrNoTag, NetStateMachine::MStateFork, PRStates::TContext) +TInt TOrphansBackwardsOrNoTag::TransitionTag() +/** +If there are orphan data clients present, return KOrphans|EBackward, else return KNoTag +*/ + { + TOrphansOrNoTag orphansOrNoTag(iContext); + TInt tag = orphansOrNoTag.TransitionTag(); + if (tag == KOrphans) + { + tag = KOrphans | NetStateMachine::EBackward; + } + return tag; + } + +DEFINE_SMELEMENT(TNoTagBackwardsOrNoClients, NetStateMachine::MStateFork, PRStates::TContext) +TInt TNoTagBackwardsOrNoClients::TransitionTag() +/** +If there are (non-leaving) data clients present, return KNoTag|EBackward, else return KNoClients +*/ + { + TNonLeavingNoTagOrNoClients nonLeavingNoTagOrNoClients(iContext); + TInt tag = nonLeavingNoTagOrNoClients.TransitionTag(); + if (tag == KNoTag) + { + tag = KNoTag | NetStateMachine::EBackward; + } + return tag; + } + + +DEFINE_SMELEMENT(TNonLeavingNoTagOrNoClients, NetStateMachine::MStateFork, PRStates::TContext) +TInt TNonLeavingNoTagOrNoClients::TransitionTag() +/** +If there are (non-leaving) data clients left, return KNoTag, else return KNoClients +*/ + { + if (iContext.Node().CountClients( + TClientType(TCFClientType::EData), TClientType(0, TCFClientType::ELeaving))) + { + return KNoTag; + } + + return KNoClients; + } diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/core_states/ss_coreprstates.h --- a/datacommsserver/esockserver/core_states/ss_coreprstates.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/core_states/ss_coreprstates.h Mon Mar 15 12:45:15 2010 +0200 @@ -797,6 +797,8 @@ // //-========================================================= const TInt KParamsPresent = 4000; +const TInt KOrphans = 4001; +const TInt KContinue = 4002; //-========================================================= // @@ -817,6 +819,22 @@ // //-========================================================= +DECLARE_SMELEMENT_HEADER( TOrphansOrNoTag, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext) + virtual TInt TransitionTag(); +DECLARE_SMELEMENT_FOOTER( TOrphansOrNoTag ) + +DECLARE_SMELEMENT_HEADER( TOrphansBackwardsOrNoTag, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext) + virtual TInt TransitionTag(); +DECLARE_SMELEMENT_FOOTER( TOrphansBackwardsOrNoTag ) + +DECLARE_SMELEMENT_HEADER( TNoTagBackwardsOrNoClients, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext) + virtual TInt TransitionTag(); +DECLARE_SMELEMENT_FOOTER( TNoTagBackwardsOrNoClients ) + +DECLARE_SMELEMENT_HEADER( TNonLeavingNoTagOrNoClients, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext) + virtual TInt TransitionTag(); +DECLARE_SMELEMENT_FOOTER( TNonLeavingNoTagOrNoClients ) + //-========================================================= // //State Transitions @@ -871,6 +889,13 @@ CoreNetStates::TSendDataClientIdleIfNoClients ) +DECLARE_AGGREGATED_TRANSITION3( + TProcessClientLeft, + MeshMachine::TRemoveClient, + PRStates::TDestroyOrphanedDataClients, + CoreNetStates::TSendDataClientIdleIfNoClients + ) + DECLARE_AGGREGATED_TRANSITION4( TProcessDestroy, CoreStates::TAbortAllActivitiesNodeDeletion, @@ -960,6 +985,15 @@ CoreStates::TPostToOriginators ) +void DestroyFirstClient(const Messages::TClientType& aIncClientType, const Messages::TClientType& aExcClientType = Messages::TClientType::NullType()); + +DECLARE_SMELEMENT_HEADER( TDestroyFirstOrphan, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TDestroyFirstOrphan ) + +DECLARE_SMELEMENT_HEADER( TDestroyFirstClient, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TDestroyFirstClient ) } //namespace PRStates #endif //SYMBIAN_SS_COREPRSTATES_H diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/csock/CS_CLI.CPP --- a/datacommsserver/esockserver/csock/CS_CLI.CPP Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/csock/CS_CLI.CPP Mon Mar 15 12:45:15 2010 +0200 @@ -158,14 +158,19 @@ { } -EXPORT_C TInt RSocketServ::Connect(TUint aMessageSlots /* =8 */) +EXPORT_C TInt RSocketServ::Connect(TUint aAsyncMessageSlots /* = (TUint) -1 */) /** Opens a session to the socket server. -The number of message slots indicates how many asychronous operations are -allowed to be uncompleted at any one time by the combined resources opened -on the session. The result of having too few slots is not fatal. However, -operations may return KErrServerBusy indicating that no message slot was -available after a small time trying. +Each outstanding asynchronous request made upon the session (typically via +a subsession such as RSocket) requires a message slot. If there is no free slot +the request is immediately completed with KErrServerBusy. If a client specifies +a fixed number of slots then they form an inelastic pool exclusive to the +session. Alternatively a client can specify -1 to use the global free message +pool, which can grow upon demand but has poorer time bounds and can in principle +fail any request. For most clients the global pool will be appropriate since it +removes the need to accurately determine the worst case size. + +Note that in previous releases the default value was KESockDefaultMessageSlots (8). RHandleBase::Close() should be called once the session is no longer required. All resources which are opened using the session will be automatically closed @@ -174,7 +179,8 @@ When the last session which has open resources for a protocol is closed a protocol module will be unloaded automatically by the socket server. -@param aMessageSlots The number of message slots required. If not specified, 8. +@param aAsyncMessageSlots The number of message slots required. If not specified then -1 to +use the global pool of free messages. @return KErrNone if successful, otherwise another of the system-wide error codes. */ { @@ -184,7 +190,7 @@ #endif TSessionPref pref; - TInt r = Connect(pref, aMessageSlots); + TInt r = Connect(pref, aAsyncMessageSlots); // Because ESock is now loaded by the Comms Root Server which is generally started during // the boot this should commonly succeed; however for test code this is still a possibility @@ -194,7 +200,7 @@ r=StartC32(); if (r==KErrNone || r==KErrAlreadyExists) { - r = Connect(pref, aMessageSlots); + r = Connect(pref, aAsyncMessageSlots); } } @@ -215,17 +221,25 @@ iReserved4(0) {} -EXPORT_C TInt RSocketServ::Connect(const TSessionPref& aPref, TUint aMessageSlots) +EXPORT_C TInt RSocketServ::Connect(const TSessionPref& aPref, TUint aMessageSlots /* = (TUint) -1 */) /** Opens a session to the socket server. -The session prefs provides a hint to the server of which protocol the client intend to use. -This might result in better performance for the connection. +By providing session prefs the client states what services they require of the server. This +allows the server to configure the client connection in an optimal manner. Such a +configuration may not support all normal abilities of a session. For example a connection +opened specifying KAfInet for the address family will be able to create TCP sockets but +might not be able to create SMS sockets. -The number of message slots indicates how many asychronous operations are -allowed to be uncompleted at any one time by the combined resources opened -on the session. The result of having too few slots is not fatal. However, -operations may return KErrServerBusy indicating that no message slot was -available after a small time trying. +Each outstanding asynchronous request made upon the session (typically via +a subsession such as RSocket) requires a message slot. If there is no free slot +the request is immediately completed with KErrServerBusy. If a client specifies +a fixed number of slots then they form an inelastic pool exclusive to the +session. Alternatively a client can specify -1 to use the global free message +pool, which can grow upon demand but has poorer time bounds and can in principle +fail any request. For most clients the global pool will be appropriate since it +removes the need to accurately determine the worst case size. + +Note that in previous releases the default value was KESockDefaultMessageSlots (8). RHandleBase::Close() should be called once the session is no longer required. All resources which are opened using the session will be automatically closed @@ -235,7 +249,8 @@ protocol module will be unloaded automatically by the socket server. @param aPrefs Hint for server to create most optimal connection possible. -@param aMessageSlots The number of message slots required. If not specified, 8. +@param aAsyncMessageSlots The number of message slots required. If not specified then -1 to +use the global pool of free messages. @return KErrNone if successful, otherwise another of the system-wide error codes. */ { diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/eabi/esocksvrU.DEF --- a/datacommsserver/esockserver/eabi/esocksvrU.DEF Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/eabi/esocksvrU.DEF Mon Mar 15 12:45:15 2010 +0200 @@ -330,7 +330,7 @@ _ZTVN14CoreActivities16CDestroyActivity37TMakeClientsLeaveOrProcessClientLeaveE @ 329 NONAME _ZTVN14CoreActivities16CDestroyActivity22TNoTagOrNoTagBackwardsE @ 330 NONAME _ZTVN14CoreActivities16ABindingActivityE @ 331 NONAME - _ZTVN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpectedE @ 332 NONAME + _ZTVN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpectedE @ 332 NONAME ABSENT _ZN21CCommsMobilitySrvResp16NewCarrierActiveERPS_16TAccessPointInfoi @ 333 NONAME _ZN21CCommsMobilitySrvResp25PreferredCarrierAvailableERPS_16TAccessPointInfoS2_ii @ 334 NONAME _ZTVN14CoreActivities16ABindingActivity19TSendBindToCompleteE @ 335 NONAME @@ -607,8 +607,8 @@ _ZN14CoreActivities16ABindingActivity17ReplyToOriginatorEi @ 606 NONAME _ZN14CoreActivities16ABindingActivity19TSendBindToComplete12GetVTablePtrER6TDesC8Pv @ 607 NONAME _ZN14CoreActivities16ABindingActivity19TSendBindToComplete3DoLEv @ 608 NONAME - _ZN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpected12GetVTablePtrER6TDesC8Pv @ 609 NONAME - _ZN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpected3DoLEv @ 610 NONAME + _ZN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpected12GetVTablePtrER6TDesC8Pv @ 609 NONAME ABSENT + _ZN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpected3DoLEv @ 610 NONAME ABSENT _ZN14CoreActivities16ABindingActivityD0Ev @ 611 NONAME _ZN14CoreActivities16ABindingActivityD1Ev @ 612 NONAME _ZN14CoreActivities16ABindingActivityD2Ev @ 613 NONAME @@ -1374,7 +1374,7 @@ _ZTIN14CoreActivities14CErrorActivity21TSendErrorRecoveryReqE @ 1373 NONAME _ZTIN14CoreActivities14CErrorActivityE @ 1374 NONAME _ZTIN14CoreActivities16ABindingActivity19TSendBindToCompleteE @ 1375 NONAME - _ZTIN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpectedE @ 1376 NONAME + _ZTIN14CoreActivities16ABindingActivity29TSendBindToCompleteIfExpectedE @ 1376 NONAME ABSENT _ZTIN14CoreActivities16ABindingActivityE @ 1377 NONAME _ZTIN14CoreActivities16CDestroyActivity22TNoTagOrNoTagBackwardsE @ 1378 NONAME _ZTIN14CoreActivities16CDestroyActivity37TMakeClientsLeaveOrProcessClientLeaveE @ 1379 NONAME @@ -1945,6 +1945,6 @@ _ZTVN13CoreNetStates12TCancelStartE @ 1944 NONAME _ZN10CoreStates37TNoTagOrRecoverableErrorTagOrErrorTag13TransitionTagEv @ 1945 NONAME _ZNK5ESock25RCFParameterFamilyBundleC18CountParameterSetsEv @ 1946 NONAME - + _ZN20PRClientLeftActivity12PRClientLeft11FirstTripleEv @ 1947 NONAME + _ZN20PRClientLeftActivity12PRClientLeft4SelfEv @ 1948 NONAME - diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/group/BLD.INF --- a/datacommsserver/esockserver/group/BLD.INF Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/group/BLD.INF Mon Mar 15 12:45:15 2010 +0200 @@ -74,7 +74,8 @@ ../inc/ES_SOCK.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(es_sock.h) ../inc/ES_SOCK.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(es_sock.inl) ../inc/ES_VER.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(es_ver.h) -../inc/ss_activities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/ss_activities.h) +../inc/ss_activities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/ss_activities.h) +../inc/ss_internal_activities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/ss_internal_activities.h) ../inc/ss_common.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/ss_common.h) ../inc/ss_commsprov.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/ss_commsprov.h) ../inc/ss_commsprov_internal.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/ss_commsprov_internal.h) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/group/backup_registration.xml --- a/datacommsserver/esockserver/group/backup_registration.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/group/backup_registration.xml Mon Mar 15 12:45:15 2010 +0200 @@ -4,7 +4,7 @@ Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ES_SOCK.H --- a/datacommsserver/esockserver/inc/ES_SOCK.H Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ES_SOCK.H Mon Mar 15 12:45:15 2010 +0200 @@ -707,8 +707,8 @@ { public: IMPORT_C RSocketServ(); - IMPORT_C TInt Connect(TUint aMessageSlots=KESockDefaultMessageSlots); - IMPORT_C TInt Connect(const TSessionPref& aPref, TUint aMessageSlots=KESockDefaultMessageSlots); + IMPORT_C TInt Connect(TUint aMessageSlots = (TUint) -1); + IMPORT_C TInt Connect(const TSessionPref& aPref, TUint aMessageSlots = (TUint) -1); IMPORT_C TVersion Version() const; IMPORT_C TInt NumProtocols(TUint& aCount); IMPORT_C TInt GetProtocolInfo(TUint anIndex,TProtocolDesc& aProtocol); diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_activities.h --- a/datacommsserver/esockserver/inc/ss_activities.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_activities.h Mon Mar 15 12:45:15 2010 +0200 @@ -71,9 +71,8 @@ ECFActivityGoneUp = 25, ECFActivityAny = 26, - + ECFActivityClientLeft = 27, - //spare = 27, //spare = 28, //spare = 29, //spare = 30, diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_connstates.h --- a/datacommsserver/esockserver/inc/ss_connstates.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_connstates.h Mon Mar 15 12:45:15 2010 +0200 @@ -422,6 +422,10 @@ virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TSubscribeForAvailability ) + DECLARE_SMELEMENT_HEADER( TSetIdleIfStopOutstanding, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext) + virtual void DoL(); + DECLARE_SMELEMENT_FOOTER( TSetIdleIfStopOutstanding ) + DECLARE_SMELEMENT_HEADER(TAwaitingSelectCompleteOrError, MeshMachine::TState, NetStateMachine::MState, TContext) virtual TBool Accept(); DECLARE_SMELEMENT_FOOTER(TAwaitingSelectCompleteOrError) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_flowrequeststates.h --- a/datacommsserver/esockserver/inc/ss_flowrequeststates.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_flowrequeststates.h Mon Mar 15 12:45:15 2010 +0200 @@ -24,6 +24,7 @@ #include #include +#include "ss_nodemessages_dataclient.h" #include "ss_flowrequest.h" @@ -99,6 +100,9 @@ virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TLeaveSubConnection ) +DECLARE_SMELEMENT_HEADER( TSendClientLeavingAndRemoveControlProvider, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TSendClientLeavingAndRemoveControlProvider ) // @@ -146,6 +150,13 @@ virtual ~CFlowRequestActivity() { + if( !iBindToSender.IsNull() ) + { + TInt err = Error() ? Error() : KErrAbort; + Messages::RNodeInterface::OpenPostMessageClose(Messages::TNodeCtxId(ActivityId(), iNode.Id()), + iBindToSender, Messages::TEBase::TError(ESock::TCFDataClient::TBindToComplete::Id(), err).CRef()); + } + static_cast(iNode).iFlowParameters.Close(); __ASSERT_DEBUG(iNode.CountAllActivities()==0, User::Panic(KSpecAssert_ESocksflwrqststs, 1)); #ifndef __GCCXML__ @@ -153,12 +164,27 @@ iNode.Id(), Messages::TEChild::TDestroy().CRef()); #endif } + +public: + /* A node that has sent TCFDataClient::TBindTo. The response TCFDataClient::TBindToComplete + * must be sent to this node. + */ + Messages::TNodeCtxId iBindToSender; public: typedef MeshMachine::TNodeContext TContext; + +DECLARE_SMELEMENT_HEADER( TAwaitingBindTo, MeshMachine::TState, NetStateMachine::MState, TContext ) + virtual TBool Accept(); +DECLARE_SMELEMENT_FOOTER( TAwaitingBindTo ) + DECLARE_SMELEMENT_HEADER( TStoreFlowParams, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TStoreFlowParams ) + +DECLARE_SMELEMENT_HEADER( TSendBindToComplete, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TSendBindToComplete ) }; class CFlowRequestDestroyActivity : public MeshMachine::CNodeActivityBase, protected MeshMachine::APreallocatedOriginators<1> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_internal_activities.h --- a/datacommsserver/esockserver/inc/ss_internal_activities.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_internal_activities.h Mon Mar 15 12:45:15 2010 +0200 @@ -83,7 +83,7 @@ ECFActivityImplicitFlow = 112, ECFActivityConnectionFlow = 113, ECFActivitySubConnectionFlow = 114, - // spare = 115, + ECFActivityDestroyOrphans = 115, //CSubConnection / SCPR specific activities (could be reuse when other IDs exhausted) ECFActivityGetParamLength = 116, diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_nodemessages_dataclient.h --- a/datacommsserver/esockserver/inc/ss_nodemessages_dataclient.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_nodemessages_dataclient.h Mon Mar 15 12:45:15 2010 +0200 @@ -107,7 +107,7 @@ TBindTo sender may roll back a transaction by cancelling the reuqest (TCancel). */ typedef Messages::TMessageSigNodeIdNumberDefault TBindTo; - typedef Messages::TMessageSigNumberDefault TBindToComplete; + typedef Messages::TMessageSigVoid TBindToComplete; typedef Messages::TMessageSigVoid TCommitBindTo; /** diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_nodemessages_internal.h --- a/datacommsserver/esockserver/inc/ss_nodemessages_internal.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_nodemessages_internal.h Mon Mar 15 12:45:15 2010 +0200 @@ -232,7 +232,8 @@ ECFTransportNotification = 100, // For SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW - ECFProvisionConnectionInfo = 101 + ECFProvisionConnectionInfo = 101, + ECFDestroyOrphans = 102 }; protected: friend class ::CSockManData; @@ -351,6 +352,8 @@ fact until it is requested to do something (e.g.: TCFDataClient::Start) */ typedef TMessageSigConnectionInfoPtr TProvisionConnectionInfo; + + typedef Messages::TMessageSigVoid TDestroyOrphans; }; } //namespace ESock diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/inc/ss_nodemessages_serviceprovider.h --- a/datacommsserver/esockserver/inc/ss_nodemessages_serviceprovider.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/inc/ss_nodemessages_serviceprovider.h Mon Mar 15 12:45:15 2010 +0200 @@ -40,67 +40,61 @@ ECFStopped = 4, ECFCommsBinderRequest = 5, ECFCommsBinderResponse = 6, + ECFCommsBindToComplete = 7, }; protected: public: enum { ERealmId = 0x10285F4F }; //UID allocated on 4/6/08 from KUidNodeMessageRealms - /*========================================================================== - [Name]: TCommsBinderRequest - [Semantics]: A request for a dataclient. Recipient has to respond with TCommsBinderResponse carrying - one of its dataclients. + /** + A request for a dataclient. The recipient of TCommsBinderRequest has to respond with + TCommsBinderResponse carrying one of its data clients. Once the requestor (control client) + consumes the data client, the consumption is acknowledged back to the servicing node with + TCFServiceProvider::TBindToComplete. + + @li Type: Request for TCommsBinderResponse + @li Fallible: Yes - [Type]: Request for TCommsBinderResponse. - [Fallible]: Yes. - - [Structure]: - param: iValue - the semantics of this parameter depends on the recipient's plane: + @param iValue The semantics of this parameter depends on the recipient's plane: CPR : - dataclient type, i.e.: EAttachToDefault/ECreateNew/EWaitForIncoming SCPR: - protocol Id - could be left blank when not needed MCPR: - attach flags (normal/monitor) 0 for start only - iFamilyBundle - parameters to assist the finding/creation of dataclient - ===========================================================================*/ + @param iFamilyBundle parameters to assist the finding/creation of dataclient + */ typedef TMessageSigNumberDefaultFamilyBundleDefaultToNull TCommsBinderRequest; - - /*========================================================================== - [Name]: TCommsBinderResponse - [Semantics]: Sent to the control client as a response to TCommsBinderRequest and - as a request for TBindToComplete - - [Type]: Request for TBindToComplete. - Response to TCommsBinderRequest. - [Fallible]: Yes. + + /** + @li Type: Request for TCFServiceProvider::TBindToComplete + Response to TCFServiceProvider::TCommsBinderRequest + @li Fallible: Yes + @param iNodeId The requested binder + + */ + typedef Messages::TMessageSigNodeId TCommsBinderResponse; + + /** + Response to TCommsBinderResponse. + @li Type: Response to TCommsBinderResponse + @param iValue Result of data client consumption + */ + typedef Messages::TMessageSigNumberDefault TBindToComplete; - [Structure]: - param: iNodeId - the requested binder - ===========================================================================*/ - - typedef Messages::TMessageSigNodeId TCommsBinderResponse; - - /*========================================================================== - [Name]: TStart - [Semantics]: Request to start the stack. The recipient should start the stack below it - and start its own layer. - - [Type]: Request for TStarted. - [Fallible]: Yes. - - [Structure]: - ===========================================================================*/ + /** + Request to start the stack. The recipient should start the stack below it and start its own layer. + @li Type: Request for TStarted. + @li Fallible: Yes + */ typedef Messages::TMessageSigVoid TStart; typedef Messages::TMessageSigVoid TStarted; - /*========================================================================== - [Name]: TStop - [Semantics]: Request to stop the stack. The recipient should stop its own layer - and subsequently stop the stack below it. + /** + Request to stop the stack. The recipient should stop its own layer and subsequently stop the stack below it. - [Type]: Request for TStopped. - [Fallible]: No. + @li Type: Request for TStopped. + @li Fallible: No - [Structure]: - param: iValue - stop code (reason). - ===========================================================================*/ + @param: iValue - stop code (reason). + */ typedef Messages::TMessageSigNumber TStop; typedef Messages::TMessageSigNumber TStopped; }; @@ -117,28 +111,24 @@ public: enum { ERealmId = 0x10285F3F }; //UID allocated on 4/6/08 from KUidNodeMessageRealms - /*========================================================================== - [Name]: TGoneDown - [Semantics]: Notification about the stack below gone down. This is an equivallent of - of an unsolicited TStopped (i.e.: the stack below is notionally stopped). + /** + Notification about the stack below gone down. This is an equivallent of of an + unsolicited TStopped (i.e.: the stack below is notionally stopped). - [Type]: Notification + @li Type: Notification - [Structure]: - param iValue1 - reason for going down. + @param iValue1 - reason for going down. iValue2 - Access Point id as provisioned with CAccessPointConfig::ProviderInfo()::APId() - ===========================================================================*/ + */ typedef Messages::TMessageSigNumberDefaultNumberDefault TGoneDown; - /*========================================================================== - [Name]: TGoneUp - [Semantics]: Notification about the stack below gone up. This is an equivallent of - of an unsolicited TStarted (i.e.: the stack below is notionally started). + + /** + Notification about the stack below gone up. This is an equivallent of of an unsolicited + TStarted (i.e.: the stack below is notionally started). - [Type]: Notification + @li Type: Notification - [Structure]: - param None - ===========================================================================*/ + */ typedef Messages::TMessageSigVoid TGoneUp; }; diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/SS_RSLV.CPP --- a/datacommsserver/esockserver/ssock/SS_RSLV.CPP Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/SS_RSLV.CPP Mon Mar 15 12:45:15 2010 +0200 @@ -162,10 +162,16 @@ TRAP(err,BindToL(bindToMsg)); } - TCFDataClient::TBindToComplete bindCompleteMsg(err); - RClientInterface::OpenPostMessageClose(Id(), aSender, - bindCompleteMsg); + if(err == KErrNone) + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete().CRef()); + } + else + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TEBase::TError(aMessage.MessageId(), err).CRef()); + } + CompleteFlowRequestMessage(err); if (IsClosing()) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_conn.cpp --- a/datacommsserver/esockserver/ssock/ss_conn.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_conn.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -146,6 +146,10 @@ #ifdef SYMBIAN_NETWORKING_UPS THROUGH_NODEACTIVITY_ENTRY(CStartAttachActivity::KUpsErrorTag, TDoNothing, MeshMachine::TErrorTag) #endif + + // If there is a stop activity outstanding (it should be waiting for this activity to complete) then we will leave that to decide the fate of our service providers + THROUGH_NODEACTIVITY_ENTRY(KErrorTag, ConnActivities::CStartAttachActivity::TSetIdleIfStopOutstanding, MeshMachine::TErrorTag) + NODEACTIVITY_ENTRY(KErrorTag, CoreNetStates::TSendClientLeavingRequestToServiceProviders, MeshMachine::TAwaitingLeaveComplete, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSetIdleIfNoServiceProviders, MeshMachine::TAwaitingLeaveComplete, ConnectionCleanupActivities::TNoTagOrNoTagBackwards) LAST_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_connLegacy.cpp --- a/datacommsserver/esockserver/ssock/ss_connLegacy.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_connLegacy.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -168,6 +168,9 @@ User::Leave(error); } + // Make sure the MCPR knows that the CPR has a new control client + ipProtoCpr->ControlProvider()->PostMessage(ipProtoCpr->Id(), TCFControlProvider::TActive().CRef()); + iConnection.ServiceProvider()->SetFlags(TCFClientType::EStarted); } diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_connprov.cpp --- a/datacommsserver/esockserver/ssock/ss_connprov.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_connprov.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -143,6 +143,18 @@ return provider ? provider : CreateL(aQuery); } +LOCAL_C void RemoveClientAndDestroy(TAny* aConnProvider) + { + CConnectionProviderBase* connProv = static_cast(aConnProvider); + Messages::RNodeInterface* cntrProv = connProv->ControlProvider(); + if(cntrProv != NULL) + { + connProv->RemoveClient(cntrProv->RecipientId()); + } + + // cast needed because CConnectionProviderBase destructor is protected + delete static_cast(aConnProvider); + } EXPORT_C ACommsFactoryNodeId* CConnectionProviderFactoryBase::CreateL(TFactoryQueryBase& aQuery) /** Create a new instance of connection provider @@ -150,8 +162,7 @@ @return Pointer to the created connection provider or NULL if there's a failure */ { CConnectionProviderBase* provider = static_cast(DoCreateObjectL(aQuery)); - CleanupStack::PushL(provider); - + CleanupStack::PushL(TCleanupItem(RemoveClientAndDestroy, provider)); const TDefaultConnectionFactoryQuery& query = static_cast(aQuery); provider->AddClientL(address_cast(query.iMCprId), TClientType(TCFClientType::ECtrlProvider)); diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_connselect.cpp --- a/datacommsserver/esockserver/ssock/ss_connselect.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_connselect.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -104,13 +104,23 @@ break; case TEBase::TError::EId: { + TEBase::TError& error = message_cast(aCFMessage); if (iSelectionStatus==ERequestingCommsBinder) - { - CommsBinderRequestError(aSender, message_cast(aCFMessage)); - } + { + CommsBinderRequestError(aSender,error); + } + else if(error.iMsgId == TCFDataClient::TBindToComplete::Id()) + { + if (KErrNone==iOriginalError) + { + iOriginalError = error.iValue; + } + // Send TCFServiceProvider::TBindToComplete to complete BinderRequest + __ASSERT_DEBUG(!iTopMcprId.IsNull(), User::Panic(KSpecAssert_ESockSSockscnslc, 43)); //iTopMcprId must be selected by now! + RNodeInterface::OpenPostMessageClose(Id(), iTopMcprId, TCFServiceProvider::TBindToComplete(error.iValue).CRef()); + } else - { - TEBase::TError& error = message_cast(aCFMessage); + { if (error.iMsgId == TCFSelector::TSimpleSelect::Id() || error.iMsgId == TCFSelector::TSelect::Id()) { @@ -206,10 +216,13 @@ } else if ( aCFMessage.IsMessage() ) { - __ASSERT_DEBUG(KErrNone==message_cast(aCFMessage).iValue || iRequestingNode==aSender, User::Panic(KSpecAssert_ESockSSockscnslc, 12)); - __ASSERT_DEBUG(KErrNone==message_cast(aCFMessage).iValue || iSelectionStatus==ERequestingCommsBinder || iSelectionStatus==EIdle, User::Panic(KSpecAssert_ESockSSockscnslc, 13)); - __ASSERT_DEBUG(KErrNone==message_cast(aCFMessage).iValue || !iTopMcprId.IsNull(), User::Panic(KSpecAssert_ESockSSockscnslc, 14)); //iTopMcprId must be selected by now! - RNodeInterface::OpenPostMessageClose(Id(), iTopMcprId, aCFMessage); + __ASSERT_DEBUG(iRequestingNode==aSender, User::Panic(KSpecAssert_ESockSSockscnslc, 12)); + __ASSERT_DEBUG(iSelectionStatus==ERequestingCommsBinder || iSelectionStatus==EIdle, User::Panic(KSpecAssert_ESockSSockscnslc, 13)); + __ASSERT_DEBUG(!iTopMcprId.IsNull(), User::Panic(KSpecAssert_ESockSSockscnslc, 14)); //iTopMcprId must be selected by now! + + // Notify the service provider to complete binding activity (TCFServiceProvider::TCommsBinderRequest) + RNodeInterface::OpenPostMessageClose(Id(), iTopMcprId, TCFServiceProvider::TBindToComplete().CRef()); + } else if ( aCFMessage.IsMessage() ) { diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_connstates.cpp --- a/datacommsserver/esockserver/ssock/ss_connstates.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_connstates.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -1029,6 +1029,20 @@ return EFalse; } +DEFINE_SMELEMENT(CStartAttachActivity::TSetIdleIfStopOutstanding, NetStateMachine::MStateTransition, TContext) +void CStartAttachActivity::TSetIdleIfStopOutstanding::DoL() + { + __ASSERT_DEBUG(iContext.iNodeActivity, ConnPanic(KPanicNoActivity)); + ConnActivities::CStartAttachActivity& activity = static_cast(*iContext.iNodeActivity); + + // If there is a stop activity outstanding then we set this start activity idle + TInt numRunningStopActivities = iContext.Node().CountActivities(ESock::ECFActivityStop); + if (numRunningStopActivities > 0) + { + activity.SetIdle(); + } + } + #ifdef SYMBIAN_NETWORKING_UPS diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_flowrequest.cpp --- a/datacommsserver/esockserver/ssock/ss_flowrequest.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_flowrequest.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -53,7 +53,7 @@ FIRST_NODEACTIVITY_ENTRY(MeshMachine::TAwaitingDestroy, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRemoveRequestor, MeshMachine::TNoTag) //TCFSubConnFlowRequest adds subconnection as a control provider so remove if necessary - THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendClientLeavingAndRemoveControlProvider, MeshMachine::TNoTag) + THROUGH_NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TSendClientLeavingAndRemoveControlProvider, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TLeaveServiceProvidersOrSetIdle, MeshMachine::TNoTag) //TDestroyAwaitingLeaveCompleteLoop loops back to its own triple if more SPs NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSetIdleIfNoServiceProviders, MeshMachine::TAwaitingLeaveComplete, CoreActivities::CDestroyActivity::TNoTagOrNoTagBackwards) @@ -67,13 +67,14 @@ FIRST_NODEACTIVITY_ENTRY(FlowRequestStates::TAwaitingImplicitFlowRequest, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, CFlowRequestActivity::TStoreFlowParams, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRequestCSRCreation, CoreNetStates::TAwaitingCSRCreated, MeshMachine::TNoTag) - NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TSelectMetaPlane, CoreNetStates::TAwaitingBindTo, MeshMachine::TNoTag) + NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TSelectMetaPlane, CFlowRequestActivity::TAwaitingBindTo, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendControlClientJoinRequest, CoreStates::TAwaitingJoinComplete, MeshMachine::TNoTag) - NODEACTIVITY_ENTRY(KNoTag, CoreActivities::ABindingActivity::TSendBindToCompleteAndRequestCommsBinder, CoreNetStates::TAwaitingBinderResponse,MeshMachine::TNoTag) + THROUGH_NODEACTIVITY_ENTRY(KNoTag, CFlowRequestActivity::TSendBindToComplete,MeshMachine::TNoTag) + NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TRequestCommsBinder, CoreNetStates::TAwaitingBinderResponse,MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TJoinReceivedSCpr, CoreStates::TAwaitingJoinComplete, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreActivities::ABindingActivity::TSendBindToComplete, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRequestCommsBinderFromSCpr, CoreNetStates::TAwaitingBinderResponse, MeshMachine::TNoTag) - NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendBindTo, CoreNetStates::TAwaitingBindToComplete, MeshMachine::TNoTag) + NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendBindTo, TAcceptErrorState, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreActivities::ABindingActivity::TSendBindToComplete, MeshMachine::TNoTag) //Cleanup THROUGH_NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRemoveRequestor, MeshMachine::TNoTag) @@ -93,7 +94,7 @@ NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TJoinReceivedSCpr, CoreStates::TAwaitingJoinComplete, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreActivities::ABindingActivity::TSendBindToComplete, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRequestCommsBinderFromSCpr, CoreNetStates::TAwaitingBinderResponse, MeshMachine::TNoTag) - NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendBindTo, CoreNetStates::TAwaitingBindToComplete,MeshMachine::TNoTag) + NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendBindTo, TAcceptErrorState,MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreActivities::ABindingActivity::TSendBindToComplete, MeshMachine::TNoTag) //Cleanup THROUGH_NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRemoveRequestor, MeshMachine::TNoTag) @@ -111,13 +112,13 @@ // Send TNoBearer to CSubConnection and wait for TBindTo? THROUGH_NODEACTIVITY_ENTRY(KNoTag, CFlowRequestActivity::TStoreFlowParams, MeshMachine::TNoTag) NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TJoinSubConnection, CoreStates::TAwaitingJoinComplete, MeshMachine::TNoTag) - NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TSendNoBearer, MeshMachine::TAcceptErrorState, MeshMachine::TNoTagOrErrorTag) + NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TSendNoBearer, MeshMachine::TAcceptErrorState, MeshMachine::TNoTagOrErrorTag) // NoBearer Succeeded // Forward TBindTo to the socket itself. After all it is the one to do the binding - NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TForwardBindToMsgToOriginator, CoreNetStates::TAwaitingBindToComplete, MeshMachine::TNoTag) + NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TForwardBindToMsgToOriginator, TAcceptErrorState, MeshMachine::TNoTag) THROUGH_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TClearError, MeshMachine::TNoTag) // The socket will error the client. Allow the BindToComplete to finish naturally. - THROUGH_NODEACTIVITY_ENTRY(KNoTag, CoreActivities::ABindingActivity::TSendBindToComplete, MeshMachine::TNoTag) + THROUGH_NODEACTIVITY_ENTRY(KNoTag, CFlowRequestActivity::TSendBindToComplete, MeshMachine::TNoTag) // Cleanup THROUGH_NODEACTIVITY_ENTRY(KNoTag, FlowRequestStates::TRemoveRequestor, MeshMachine::TNoTag) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_flowrequeststates.cpp --- a/datacommsserver/esockserver/ssock/ss_flowrequeststates.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_flowrequeststates.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -158,6 +158,32 @@ CleanupStack::Pop(params); } +DEFINE_SMELEMENT(FlowRequestActivities::CFlowRequestActivity::TSendBindToComplete, NetStateMachine::MStateTransition, TContext) +void FlowRequestActivities::CFlowRequestActivity::TSendBindToComplete::DoL() + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KCFlowRequestPanic, KPanicNoActivity)); + CFlowRequestActivity& activity = static_cast(*iContext.iNodeActivity); + __ASSERT_DEBUG(!activity.iBindToSender.IsNull(), User::Panic(KSpecAssert_ESockSSockFlwRqS, 2)); + RClientInterface::OpenPostMessageClose(iContext.Node().Id(), activity.iBindToSender, TCFDataClient::TBindToComplete().CRef()); + activity.iBindToSender.SetNull(); + } + +DEFINE_SMELEMENT(FlowRequestActivities::CFlowRequestActivity::TAwaitingBindTo, NetStateMachine::MState, TContext) +TBool FlowRequestActivities::CFlowRequestActivity::TAwaitingBindTo::Accept() + { + TBool accept(EFalse); + if(iContext.iMessage.IsMessage()) + { + // store the node to which we send the response later on. + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KCFlowRequestPanic, KPanicNoActivity)); + CFlowRequestActivity& activity = static_cast(*iContext.iNodeActivity); + __ASSERT_DEBUG(activity.iBindToSender.IsNull(), User::Panic(KSpecAssert_ESockSSockFlwRqS, 3)); + activity.iBindToSender = iContext.iSender; + accept = ETrue; + } + + return accept; + } DEFINE_SMELEMENT(FlowRequestStates::TSendNoBearer, NetStateMachine::MStateTransition, FlowRequestStates::TContext) void FlowRequestStates::TSendNoBearer::DoL() @@ -255,3 +281,18 @@ } + +DEFINE_SMELEMENT(FlowRequestStates::TSendClientLeavingAndRemoveControlProvider, NetStateMachine::MStateTransition, FlowRequestStates::TContext) +void FlowRequestStates::TSendClientLeavingAndRemoveControlProvider::DoL() + { + TClientIter iter = iContext.Node().GetClientIter(TClientType(TCFClientType::ECtrlProvider)); + RNodeInterface* cl = iter[0]; + //It is perfectly possible that there is no Control Provider at all. + if (cl) + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KCFlowRequestPanic, KPanicNoActivity)); + cl->PostMessage(TNodeCtxId(iContext.ActivityId(), iContext.NodeId()), TEChild::TLeft().CRef()); + iContext.Node().RemoveClient(cl->RecipientId(),iContext); + __ASSERT_DEBUG(iter[1] == NULL, User::Panic(KCFlowRequestPanic, KPanicNoControlProvider)); //But it is not possible to have two Control Providers! + } + } diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_intsock.cpp --- a/datacommsserver/esockserver/ssock/ss_intsock.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_intsock.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -113,9 +113,17 @@ { TRAP(err,BindToL(bindToMsg)); } - - RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete(err).CRef()); - + + if(err == KErrNone) + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete().CRef()); + } + else + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TEBase::TError(aMessage.MessageId(), err).CRef()); + } + + CompleteFlowRequestMessage(err); SetFlowRequestPending(EFalse); diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_mmcommsprov.cpp --- a/datacommsserver/esockserver/ssock/ss_mmcommsprov.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_mmcommsprov.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -19,7 +19,9 @@ #include "ss_mmcommsprov.h" #include - +#include +#include "ss_nodemessages_internal.h" +#include "ss_internal_activities.h" #ifdef _DEBUG // Panic category for "absolutely impossible!" vanilla ASSERT()-type panics from this module @@ -112,17 +114,19 @@ void CMMCommsProviderBase::DestroyOrphanedDataClients() { - //Destroy orphaned data clients - RNodeInterface* dc; - TClientIter iter = GetClientIter(TClientType(TCFClientType::EData)); - while ((dc = iter++) != NULL) + // Note: If PRDataClientStopActivity is running, it will call PRStates::TDestroyOrphanedDataClients + // once it has stopped the data clients, so we don't need to start PRDestroyOrphans activity here. + // What was happening before was that we were destroying the Default data client before one or more + // non-Default clients. This causes problems due to internal references between some non-Default + // and Default data client types. + if (CountClients( + TClientType(TCFClientType::EData), + TClientType(0, TCFClientType::EActive|TCFClientType::EActivating|TCFClientType::ELeaving|TCFClientType::EStarted|TCFClientType::EStarting)) + && CountActivities(ECFActivityDestroyOrphans) == 0 + && CountActivities(ECFActivityDestroy) == 0 + && CountActivities(ECFActivityStopDataClient) == 0) { - if (!(dc->Flags()&(TCFClientType::EActive|TCFClientType::EActivating|TCFClientType::ELeaving|TCFClientType::EStarted|TCFClientType::EStarting))) - { - //AbortActivitiesOriginatedBy(dc->RecipientId(),aContext); - dc->PostMessage(Id(), TEChild::TDestroy().CRef()); - dc->SetFlags(TClientType::ELeaving); - } + RNodeInterface::OpenPostMessageClose(Id(), Id(), TCFMessage::TDestroyOrphans().CRef()); } } diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_sapshim.cpp --- a/datacommsserver/esockserver/ssock/ss_sapshim.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_sapshim.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -1089,7 +1089,7 @@ //before break, hence it tries to apply the new owner, during which time the new //owner starts and hence attempts to TBindTo his new child. The child hates it //as it arrives from an unknown node. The rejoin protocol needs rethinking. - RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete(KErrNone).CRef()); + RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete().CRef()); return; } CNetworkFlow::ReceivedL(aSender, aRecipient, aMessage); @@ -1161,7 +1161,16 @@ TRAPD(err,BindToL(bindToMsg)); // Ensure that TBindToComplete message gets sent before TIdle so that it gets to the destination // before destroy processing. - RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete(err).CRef()); + if(err == KErrNone) + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete().CRef()); + } + else + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TEBase::TError(aMessage.MessageId(), err).CRef()); + } + + ProcessDCIdleState(); // in case we were waiting to send idle //If we have received TDataClientStart before (when we did not yet have a bearer), //we complete the start here as well @@ -1809,7 +1818,7 @@ } PostNoBearer(); } - + ClearUseBearerErrors(); ClearDataClientRoutedGuard(); } else diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/ssock/ss_subconn.cpp --- a/datacommsserver/esockserver/ssock/ss_subconn.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/ssock/ss_subconn.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -301,6 +301,7 @@ ACTIVITY_MAP_ENTRY(SubConnectionNoBearer, SubConnNoBearer) ACTIVITY_MAP_ENTRY(SubConnectionLegacyRMessage2Activity, SubConnectionLegacyRMessage2) ACTIVITY_MAP_ENTRY(PRDataClientJoinActivity, PRDataClientJoin) + ACTIVITY_MAP_ENTRY(PRClientLeftActivity, PRClientLeft) ACTIVITY_MAP_ENTRY(PRClientLeaveActivity, PRClientLeave) ACTIVITY_MAP_END() } diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/CapTests/Connection/Common/Te_Cap_RConnDHCP.xml --- a/datacommsserver/esockserver/test/CapTests/Connection/Common/Te_Cap_RConnDHCP.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/CapTests/Connection/Common/Te_Cap_RConnDHCP.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/CapTests/Resolver/Common/Te_Cap_RES.xml --- a/datacommsserver/esockserver/test/CapTests/Resolver/Common/Te_Cap_RES.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/CapTests/Resolver/Common/Te_Cap_RES.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/CapTests/Socket/Common/Te_Cap_Esock.xml --- a/datacommsserver/esockserver/test/CapTests/Socket/Common/Te_Cap_Esock.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/CapTests/Socket/Common/Te_Cap_Esock.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File for GT0233 PREQ398 Raw IP NIF testing. - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/CapTests/Socket_transfer/Config/TE_Cap_Esock_transfer.xml --- a/datacommsserver/esockserver/test/CapTests/Socket_transfer/Config/TE_Cap_Esock_transfer.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/CapTests/Socket_transfer/Config/TE_Cap_Esock_transfer.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock.xml --- a/datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock_ethernet_MOMAP16xx.xml --- a/datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock_ethernet_MOMAP16xx.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock_ethernet_MOMAP16xx.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock_ethernet_wins.xml --- a/datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock_ethernet_wins.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_ESock/scriptfiles/te_esock_ethernet_wins.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_Ini/testdata/te_ini.xml --- a/datacommsserver/esockserver/test/TE_Ini/testdata/te_ini.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_Ini/testdata/te_ini.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnection/configs/DataMonitoring/DataMonitoring.ced.xml --- a/datacommsserver/esockserver/test/TE_RConnection/configs/DataMonitoring/DataMonitoring.ced.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnection/configs/DataMonitoring/DataMonitoring.ced.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/RConnectionNTRAS_Bad.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/RConnectionNTRAS_Bad.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/RConnectionNTRAS_Bad.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainethernet_MOMAP16xx.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainethernet_MOMAP16xx.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainethernet_MOMAP16xx.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainethernet_emulator.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainethernet_emulator.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainethernet_emulator.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainntras.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainntras.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainntras.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainudp.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainudp.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/ainudp.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/def143083.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/def143083.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/def143083.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm_ethernet_MOMAP16xx.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm_ethernet_MOMAP16xx.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm_ethernet_MOMAP16xx.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm_ethernet_emulator.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm_ethernet_emulator.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectioncmm_ethernet_emulator.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionconfigdaemon_MOMAP16xx.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionconfigdaemon_MOMAP16xx.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionconfigdaemon_MOMAP16xx.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionconfigdaemon_emulator.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionconfigdaemon_emulator.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionconfigdaemon_emulator.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_MOMAP16xx.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_MOMAP16xx.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_MOMAP16xx.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_emulator.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_emulator.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_emulator.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_emulator_test202_204.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_emulator_test202_204.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionethernet_emulator_test202_204.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionntras.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionntras.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionntras.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,8 +14,7 @@ Description: CommDB Settings File - All Rights Reserved - + --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp_ethernet_MOMAP16xx.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp_ethernet_MOMAP16xx.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp_ethernet_MOMAP16xx.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp_ethernet_emulator.xml --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp_ethernet_emulator.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/config/rconnectionudp_ethernet_emulator.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,10 +3,9 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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. @@ -14,7 +13,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_AllInterfaceNotification.cpp --- a/datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_AllInterfaceNotification.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_AllInterfaceNotification.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -1770,6 +1770,7 @@ // PASS SetTestStepResult(EPass); + return EPass; } TVerdict TE_RConnectionTestAllInterfaceNot210::doTestStepPreambleL() @@ -1810,11 +1811,12 @@ dummyNifEnableProperty.Set(0); // Dummy NIF not available - Start should fail dummyNifEnableProperty.Close(); + return EPass; } TVerdict TE_RConnectionTestAllInterfaceNot210::doTestStepPostambleL() { - + return EPass; } TE_RConnectionTestAllInterfaceNot210::~TE_RConnectionTestAllInterfaceNot210() diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp --- a/datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -12,7 +12,7 @@ // // Description: // This contains ESock Test cases from section 1 -// +// // // EPOC includes @@ -59,8 +59,8 @@ CleanupStack::Pop(); ss.Close(); - - SetTestStepResult(verdict); + + SetTestStepResult(verdict); return verdict; } @@ -71,7 +71,7 @@ _LIT(ret,"Test1.2"); return ret; } - + enum TVerdict CSocketTest1_2::InternalDoTestStepL( void ) { TVerdict verdict = EPass; @@ -91,7 +91,7 @@ // ss.__DbgMarkHeap(); // in ESOCKMT leak checking is best done by shutting down the server TUint numProtocols; ret = ss.NumProtocols(numProtocols); - Logger().WriteFormat(_L("NumProtocols returned %S, number %d"), + Logger().WriteFormat(_L("NumProtocols returned %S, number %d"), &EpocErrorToText(ret), numProtocols); TESTL(KErrNone == ret); @@ -101,10 +101,10 @@ RSocket sock1; TInt pdummyIndex = -1; Logger().WriteFormat(_L("Trying GetProtocolInfo until Dummy Protocol 1 is found")); - for (aIndex=1;aIndex<=numProtocols;aIndex++) + for (aIndex=1;aIndex<=numProtocols;aIndex++) { ret = ss.GetProtocolInfo(aIndex, protoInfo); - Logger().WriteFormat(_L("GetProtocolInfo returned %S"), &EpocErrorToText(ret)); + Logger().WriteFormat(_L("GetProtocolInfo returned %S"), &EpocErrorToText(ret)); TESTL(KErrNone == ret || KErrCannotFindProtocol == ret); Logger().WriteFormat(_L("Protocol Index %d corresponds to %S"), aIndex, &protoInfo.iName); if (protoInfo.iName == KDummyProtocol1Name()) @@ -122,7 +122,7 @@ Logger().WriteFormat(_L("Opening Socket for Family: %d, Sock: %d, protocol: %d"), protoInfo.iAddrFamily, protoInfo.iSockType, protoInfo.iProtocol); - + ret=sock1.Open(ss, protoInfo.iAddrFamily, protoInfo.iSockType, protoInfo.iProtocol); Logger().WriteFormat(_L("Open returned %S"), &EpocErrorToText(ret)); TESTL(KErrNone == ret); @@ -196,7 +196,7 @@ Logger().WriteFormat(_L("Attempting to create bad socket type")); RSocket sock; - ret = sock.Open(ss, 0, 0, 0); + ret = sock.Open(ss, 0, 0, 0); Logger().WriteFormat(_L("Open returned %S"), &EpocErrorToText(ret)); TESTL(KErrBadName == ret); @@ -213,7 +213,7 @@ _LIT(ret,"Test1.4"); return ret; } - + enum TVerdict CSocketTest1_4::InternalDoTestStepL( void ) { TVerdict verdict = EPass; @@ -238,7 +238,7 @@ ret = ss.FindProtocol(KDummyProtocol1Name(), protoInfo); Logger().WriteFormat(_L("FindProtocol returned %S"), &EpocErrorToText(ret)); TESTL(KErrNone == ret); - + CleanupStack::Pop(&ss); ss.Close(); SetTestStepResult(verdict); @@ -268,7 +268,7 @@ a.iNumSockets = KNumTestSockets; //Need to share logger across different threads Logger().ShareAuto(); - t.Create(_L("SocketThread1"), SocketThread, + t.Create(_L("SocketThread1"), SocketThread, KDefaultStackSize, KDefaultHeapSize, KDefaultHeapSize, &a); t.Resume(); s.Wait(); @@ -287,7 +287,7 @@ _LIT(ret,"Test1.6"); return ret; } - + enum TVerdict CSocketTest1_6::InternalDoTestStepL( void ) { TVerdict verdict = EPass; @@ -308,11 +308,11 @@ _LIT(ret,"Test1.7"); return ret; } - + enum TVerdict CSocketTest1_7::InternalDoTestStepL( void ) { TVerdict verdict = EPass; - + TInt numExhaustiveSockets = iNormalTest ? KNumExhaustiveSockets : 10; iNormalTest = EFalse; // normal test is only run once, the rest are OOM tests @@ -350,7 +350,7 @@ ret = KErrNone; while (KErrNone==ret && sockNum= sockCount1); Logger().WriteFormat(_L("Freeing sockets in creation order")); for (i=0; i desIn; - + socket1.Shutdown(RSocket::EImmediate,desOut,desIn, shutdownStatus); User::WaitForRequest(shutdownStatus); Logger().WriteFormat(_L("Socket 1 shutdown returned %S"), &EpocErrorToText(shutdownStatus.Int())); @@ -568,7 +568,7 @@ { verdict = EFail; } - + CleanupStack::PopAndDestroy(); //socket CleanupStack::PopAndDestroy(); //conn CleanupStack::PopAndDestroy(); //ss diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_Socket/SocketTestSection31.cpp --- a/datacommsserver/esockserver/test/TE_Socket/SocketTestSection31.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_Socket/SocketTestSection31.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -634,3 +634,85 @@ return TestStepResult(); } + +// Test step 31.5 +// Using fixed async request slot pool and system free request pool connections +// +const TDesC& CSocketTest31_5::GetTestName() + { + _LIT(ret,"Test31.5"); + return ret; + } + + +CSocketTest31_5::CSockReq* CSocketTest31_5::CSockReq::NewLC() + { + CSockReq* sockReq = new(ELeave) CSockReq; + CleanupStack::PushL(sockReq); + return sockReq; + } + +CSocketTest31_5::CSockReq::~CSockReq() + { + TInt ret = iReq.Int(); + iSock.Close(); + if(ret == KRequestPending) + { + User::WaitForRequest(iReq); + } + } + +TInt CSocketTest31_5::MakePendingRequestL() + { + CSockReq* req = CSockReq::NewLC(); + iSocks.AppendL(req); + CleanupStack::Pop(req); + + TInt idx = iSocks.Count() - 1; + TInt ret = req->iSock.Open(iSess, KDummyAddrFamily, KSockDatagram, KDummyOne); + Logger().WriteFormat(_L("sock[%d].Open() returned %S"), idx, &EpocErrorToText(ret)); + TESTL(KErrNone == ret); + req->iSock.Read(req->iData, req->iReq); + User::After(250 * 1000); // short delay to allow for almost-instant failure + Logger().WriteFormat(_L("sock[%d].Read() status %S"), idx, &EpocErrorToText(req->iReq.Int())); + return req->iReq.Int(); + } + +enum TVerdict CSocketTest31_5::InternalDoTestStepL( void ) + { + TVerdict verdict = EPass; + + Logger().WriteFormat(_L("Test Purpose: Test bounded and unbounded (default) async request slot pool.")); + + Logger().WriteFormat(_L("Trying %d pending requests against default (unbounded pool) connection"), KESockDefaultMessageSlots + 1); + TInt ret = iSess.Connect(); + CleanupClosePushL(iSess); + Logger().WriteFormat(_L("Connect returned %S"), &EpocErrorToText(ret)); + TESTL(KErrNone == ret); + for(TInt sockNum = 0; sockNum <= KESockDefaultMessageSlots; ++sockNum) + { + ret = MakePendingRequestL(); + TESTL(ret == KRequestPending); + } + iSocks.ResetAndDestroy(); + CleanupStack::PopAndDestroy(&iSess); + + Logger().WriteFormat(_L("Trying %d pending requests against old default (KESockDefaultMessageSlots pool) connection"), KESockDefaultMessageSlots + 1); + ret = iSess.Connect(KESockDefaultMessageSlots); + CleanupClosePushL(iSess); + Logger().WriteFormat(_L("Connect returned %S"), &EpocErrorToText(ret)); + TESTL(KErrNone == ret); + for(TInt sockNum = 0; sockNum < KESockDefaultMessageSlots; ++sockNum) + { + ret = MakePendingRequestL(); + TESTL(ret == KRequestPending); + } + ret = MakePendingRequestL(); + TESTL(ret == KErrServerBusy); + iSocks.ResetAndDestroy(); + CleanupStack::PopAndDestroy(&iSess); + + SetTestStepResult(EPass); + return TestStepResult(); + } + diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_Socket/SocketTestSection31.h --- a/datacommsserver/esockserver/test/TE_Socket/SocketTestSection31.h Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_Socket/SocketTestSection31.h Mon Mar 15 12:45:15 2010 +0200 @@ -49,6 +49,28 @@ virtual enum TVerdict InternalDoTestStepL( void ); }; +class CSocketTest31_5 : public CTestStepSocket + { +public: + static const TDesC &GetTestName(); + virtual enum TVerdict InternalDoTestStepL( void ); +private: + TInt MakePendingRequestL(); + + // Member data largely as convenience; not cleaned up by destructor + RSocketServ iSess; + class CSockReq : public CBase + { + public: + static CSockReq* NewLC(); + ~CSockReq(); + public: + RSocket iSock; + TRequestStatus iReq; + TBuf8<20> iData; + }; + RPointerArray iSocks; + }; #endif //__SOCKETTEST_31_H__ diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_Socket/TestSuiteSocket.cpp --- a/datacommsserver/esockserver/test/TE_Socket/TestSuiteSocket.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_Socket/TestSuiteSocket.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -232,6 +232,7 @@ ADD_TEST_STEP(CSocketTest31_2) ADD_TEST_STEP(CSocketTest31_3) ADD_TEST_STEP(CSocketTest31_4) + ADD_TEST_STEP(CSocketTest31_5) END_TEST_STEP_LIST } diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TE_Socket/scriptfiles/te_socket_tests.script --- a/datacommsserver/esockserver/test/TE_Socket/scriptfiles/te_socket_tests.script Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TE_Socket/scriptfiles/te_socket_tests.script Mon Mar 15 12:45:15 2010 +0200 @@ -568,3 +568,19 @@ RUN_TEST_STEP 100 TE_Socket Test31.4 TEST_COMPLETE END_TESTCASE COMINF-ESOCK-Socket-0175 + +START_TESTCASE COMINF-ESOCK-Socket-0176 +//! @SYMTestCaseID COMINF-ESOCK-Socket-0176 +//! @SYMTestCaseDesc Creating socket sessions with limited and unlimited (default) request slot pools +//! @SYMTestActions RSocketServ::Connect +//! @SYMTestExpectedResults pass +//! @SYMTestPriority Critical +//! @SYMTestType CT +//! @SYMComponent comms-infras_esock +//! @SYMDEF +// run test 31.5 +PRINT +RUN_TEST_STEP 100 TE_Socket Test31.5 +TEST_COMPLETE +END_TESTCASE COMINF-ESOCK-Socket-0176 + diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/ESock_TS_MultiHoming_3_Connection.script.assabet --- a/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/ESock_TS_MultiHoming_3_Connection.script.assabet Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/ESock_TS_MultiHoming_3_Connection.script.assabet Mon Mar 15 12:45:15 2010 +0200 @@ -1,7 +1,7 @@ // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_Test18_ced.xml --- a/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_Test18_ced.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_Test18_ced.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_Test21_ced.xml --- a/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_Test21_ced.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_Test21_ced.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_net0.xml --- a/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_net0.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_net0.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_net1.xml --- a/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_net1.xml Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/TS_MultiHoming/ScriptFiles/TS_MultiHoming_net1.xml Mon Mar 15 12:45:15 2010 +0200 @@ -3,7 +3,7 @@ Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" + 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". @@ -14,7 +14,6 @@ Description: CommDB Settings File - All Rights Reserved --> diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/providers/dummy/src/dummypr_extended_subconnprov.cpp --- a/datacommsserver/esockserver/test/providers/dummy/src/dummypr_extended_subconnprov.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/providers/dummy/src/dummypr_extended_subconnprov.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -158,7 +158,7 @@ __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KSpecAssert_ESockTestdmyprxt, 2)); CDummyBuildStackActivity* act = static_cast(iContext.iNodeActivity); - RClientInterface::OpenPostMessageClose(iContext.Node().Id(), act->iBinderSource, TCFDataClient::TBindToComplete().CRef()); + RClientInterface::OpenPostMessageClose(iContext.Node().Id(), act->iBinderSource, TCFServiceProvider::TBindToComplete().CRef()); } DEFINE_SMELEMENT(TCreateDataClient, NetStateMachine::MStateTransition, DummyExtendedSCPRStates::TContext) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/esockserver/test/providers/dummy/src/dummypr_network_flow.cpp --- a/datacommsserver/esockserver/test/providers/dummy/src/dummypr_network_flow.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/esockserver/test/providers/dummy/src/dummypr_network_flow.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -332,7 +332,16 @@ TCFDataClient::TBindTo& bindToMsg(static_cast(aMessage)); TRAPD(err,BindToL(bindToMsg)); ProcessDCIdleState(); // in case we were waiting to send idle - RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete(err).CRef()); + + if(err == KErrNone) + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TCFDataClient::TBindToComplete().CRef()); + } + else + { + RClientInterface::OpenPostMessageClose(Id(), aSender, TEBase::TError(aMessage.MessageId(), err).CRef()); + } + //If we have received TCDDataClient::TStart before (when we did not yet have a bearer), //we complete the start here as well if (iIsStarting) diff -r 98a7181d2ce7 -r 8b5d60ce1e94 datacommsserver/networkingdialogapi/src/ND_DLGSL.CPP --- a/datacommsserver/networkingdialogapi/src/ND_DLGSL.CPP Fri Mar 12 15:49:41 2010 +0200 +++ b/datacommsserver/networkingdialogapi/src/ND_DLGSL.CPP Mon Mar 15 12:45:15 2010 +0200 @@ -311,6 +311,7 @@ } TBuf tmpBuffer; + // coverity[var_deref_model] - ptrIapRecord guaranteed initialised by RecordFactoryL tmpBuffer = ptrIapRecord->iRecordName; iAgentDialogInput.iLabel.Format(KSelectPrompt,&tmpBuffer); iAgentDialogInput.iDialog = ENoYesDialog;