# HG changeset patch # User hgs # Date 1284386806 -3600 # Node ID c9776eadbffd9142fab80963241c0930fe73a151 # Parent ae47d0499beead37c71be7320751c3102dc3763a 201035_01 diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/NetMeta/doc_pub/NetMeta_Design_Document.doc Binary file commsfwsupport/commselements/NetMeta/doc_pub/NetMeta_Design_Document.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/StartServer/doc_pub/Start Server Design Document.doc Binary file commsfwsupport/commselements/StartServer/doc_pub/Start Server Design Document.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/StateMachine/doc_pub/State Machine Design Document.doc Binary file commsfwsupport/commselements/StateMachine/doc_pub/State Machine Design Document.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/bwins/commsfwu.def --- a/commsfwsupport/commselements/commsfw/bwins/commsfwu.def Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/commsfw/bwins/commsfwu.def Mon Sep 13 15:06:46 2010 +0100 @@ -26,8 +26,8 @@ ?CloseNonGracefully@CCFChannelPairRawBase@CommsFW@@QAEXXZ @ 25 NONAME ; public: void __thiscall CommsFW::CCFChannelPairRawBase::CloseNonGracefully(void) ?ConstructL@CCFModuleChannelHandler@CommsFW@@IAEXAAUTMsgQueuesTAG@?$RCFChannelBase@VTCFMessage@CommsFW@@$00@2@0@Z @ 26 NONAME ; protected: void __thiscall CommsFW::CCFModuleChannelHandler::ConstructL(struct CommsFW::RCFChannelBase::TMsgQueuesTAG &,struct CommsFW::RCFChannelBase::TMsgQueuesTAG &) ?Create@RCFChannelRawBase@CommsFW@@QAEHHHPAVRMsgQueueBase@@H@Z @ 27 NONAME ; public: int __thiscall CommsFW::RCFChannelRawBase::Create(int,int,class RMsgQueueBase *,int) - ?Create@RCFChannelRawBase@CommsFW@@QAEHPBVRMsgQueueBase@@W4TOwnerType@@PAV3@H@Z @ 28 NONAME ; public: int __thiscall CommsFW::RCFChannelRawBase::Create(class RMsgQueueBase const *,enum TOwnerType,class RMsgQueueBase *,int) - ?Create@RCFThread@CommsFW@@QAEHABVTDesC16@@P6AHPAX@ZHHH1@Z @ 29 NONAME ABSENT ; public: int __thiscall CommsFW::RCFThread::Create(class TDesC16 const &,int (__cdecl*)(void *),int,int,int,void *) + ?Create@RCFChannelRawBase@CommsFW@@QAEHPBVRMsgQueueBase@@W4TOwnerType@@PAV3@H@Z @ 28 NONAME ; public: int __thiscall CommsFW::RCFChannelRawBase::Create(class RMsgQueueBase const *,enum TOwnerType,class RMsgQueueBase *,int) + ?PreallocateQueueSpaceL@CCommsTransport@CommsFW@@QAEXH@Z @ 29 NONAME ; void CommsFW::CCommsTransport::PreallocateQueueSpaceL(int) ?Create@RCFThread@CommsFW@@QAEHABVTDesC16@@P6AHPAX@ZHPAVRHeap@@1@Z @ 30 NONAME ABSENT ; public: int __thiscall CommsFW::RCFThread::Create(class TDesC16 const &,int (__cdecl*)(void *),int,class RHeap *,void *) ?CreateRecv@CCFChannelPairRawBase@CommsFW@@QAEHH@Z @ 31 NONAME ; public: int __thiscall CommsFW::CCFChannelPairRawBase::CreateRecv(int) ?CreateRecv@CCFChannelPairRawBase@CommsFW@@QAEHPBVRMsgQueueBase@@W4TOwnerType@@@Z @ 32 NONAME ; public: int __thiscall CommsFW::CCFChannelPairRawBase::CreateRecv(class RMsgQueueBase const *,enum TOwnerType) @@ -97,6 +97,5 @@ ?SetDropTransportPending@CCommsTransport@CommsFW@@QAEXGH@Z @ 96 NONAME ; void CommsFW::CCommsTransport::SetDropTransportPending(unsigned short, int) ?SetLastRequestIdConcerningPeer@CCommsTransport@CommsFW@@QAEXGH@Z @ 97 NONAME ; void CommsFW::CCommsTransport::SetLastRequestIdConcerningPeer(unsigned short, int) ?WorkerId@CCommsTransport@CommsFW@@QBEGXZ @ 98 NONAME ; unsigned short CommsFW::CCommsTransport::WorkerId(void) const - ?GetVarFromIniData@CommsFW@@YAHABVTDesC8@@00AAH@Z @ 99 NONAME ; int CommsFW::GetVarFromIniData(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, int &) + ?GetVarFromIniData@CommsFW@@YAHABVTDesC8@@00AAH@Z @ 99 NONAME ; int CommsFW::GetVarFromIniData(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, int &) - diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/doc_pub/CFTransport Design Document.doc Binary file commsfwsupport/commselements/commsfw/doc_pub/CFTransport Design Document.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/doc_pub/Comms Framework API.doc Binary file commsfwsupport/commselements/commsfw/doc_pub/Comms Framework API.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/eabi/commsfwu.def --- a/commsfwsupport/commselements/commsfw/eabi/commsfwu.def Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/commsfw/eabi/commsfwu.def Mon Sep 13 15:06:46 2010 +0100 @@ -129,5 +129,5 @@ _ZN7CommsFW5PanicENS_18TCFTransportPanicsE @ 128 NONAME _ZNK7CommsFW15CCommsTransport15RegisteredCountEv @ 129 NONAME _ZN7CommsFW16CPerfMetricStore12RemoveClientEPv @ 130 NONAME + _ZN7CommsFW15CCommsTransport22PreallocateQueueSpaceLEi @ 131 NONAME - diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/inc/cftransport.h --- a/commsfwsupport/commselements/commsfw/inc/cftransport.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/commsfw/inc/cftransport.h Mon Sep 13 15:06:46 2010 +0100 @@ -288,6 +288,7 @@ IMPORT_C CommsFW::TId LastRequestIdConcerningPeer(TWorkerId aPeerId) const; IMPORT_C void SetDropTransportPending(TWorkerId aPeerId, TBool aDropPending); IMPORT_C TBool IsDropTransportPending(TWorkerId aPeerId) const; + IMPORT_C void PreallocateQueueSpaceL(TInt aMinUndeliveredMessages); IMPORT_C TWorkerId WorkerId() const; IMPORT_C Messages::MTransportSender& GetSender(); diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/src/cflog.cpp --- a/commsfwsupport/commselements/commsfw/src/cflog.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/commsfw/src/cflog.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -393,7 +393,7 @@ void CCFLog::ConstructL() { - iCsLock.CreateLocal(); + User::LeaveIfError(iCsLock.CreateLocal()); // construct initial cflogger will be first in session arrays RFileLogger* defaultflogger; diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/commsfw/src/cftransport.cpp --- a/commsfwsupport/commselements/commsfw/src/cftransport.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/commsfw/src/cftransport.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -225,9 +225,9 @@ public: enum { - KSelfSenderInitialQueueLength = 40, /** Initial size of self-sender queue (double what testing has observed) */ - KSelfSenderQueueGrowthStep = 40, /** Increment of self-sender queue size when full. PostMessage() functions panic if growth - required and fails; to minimise this risk ensure initial size adequate for all likely cases */ + KSelfSenderInitialQueueLength = 20, /** Initial size of self-sender queue */ + KSelfSenderQueuePreAllocationGrowthStep = 20, /** Additionl space to reserve each time we pre-allocate some queue space to avoind too much re-allocation */ + KSelfSenderQueueGrowthStep = 20 /** Increment of self-sender queue size when full. PostMessage() functions panic if growth required and fails */ }; static CTransportSelfSender* NewL(MMessageDispatcher& aDispatcher, TWorkerId aSelfId); @@ -264,6 +264,8 @@ { return EFalse; } + + void PreallocateQueueSpaceL(TInt aMinUndeliveredMessages); ~CTransportSelfSender(); protected: @@ -277,7 +279,7 @@ TInt DoPostMessage(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TDesC8& aMessage); TInt ProcessMessage(TCFMessage2& aMessage, TInt aFirstDispatchLeaveReason); void MaybeTriggerReceipt(); - TInt ResizeQueue(TInt aAdditionalChips); + void ResizeQueueL(TInt aAdditionalChips); private: TChipReceiver iReceiver; CCirBuf* iBuf; @@ -311,29 +313,43 @@ CleanupStack::Pop(self); return self; } +/* + * Preemptively allocate self sender queue length, given by aMinUndeliveredMessages. + * Note the current logic for queue enlargement is rather coarse, preferring linear growth by a fixed amount. + * A better approach would have been to implement a logarithmic increase for the queue length, which would have saved a bit more memory when the + */ +void CTransportSelfSender::PreallocateQueueSpaceL(TInt aMinUndeliveredMessages) + { + TInt currentLength = iBuf->Length(); + if (aMinUndeliveredMessages > currentLength) + { + TInt resizeBy = aMinUndeliveredMessages - currentLength; + __CFLOG_VAR(( KLogCommsFw, KLogFwTransport, _L8("CTransportSelfSender::PreallocateQueueSpaceL(%d) Trying to enlarge queue from %d to %d chips"), aMinUndeliveredMessages, currentLength, currentLength + resizeBy + KSelfSenderQueuePreAllocationGrowthStep )); + ResizeQueueL(resizeBy + KSelfSenderQueuePreAllocationGrowthStep); + __CFLOG_VAR(( KLogCommsFw, KLogFwTransport, _L8("CTransportSelfSender::PreallocateQueueSpaceL queue enlargement successful") )); + } + } -TInt CTransportSelfSender::ResizeQueue(TInt aAdditionalChips) +void CTransportSelfSender::ResizeQueueL(TInt aAdditionalChips) { + __CFLOG_VAR(( KLogCommsFw, KLogFwTransport, _L8("CTransportSelfSender::ResizeQueueL(%d)"), aAdditionalChips )); + TInt newLen = iBuf->Length() + aAdditionalChips; __ASSERT_ALWAYS(newLen > iBuf->Count(), Panic(ECFInvalidQueueSize)); + + if (iBuf->Count() == 0) + { + iBuf->SetLengthL(newLen); + return; + } // Create a new queue of the requisite size, copy the elements, and swap for the original // (there's no safe way to resize in-place). - CCirBuf* newBuf = new CCirBuf; - if(newBuf == NULL) - { - __CFLOG_VAR(( KLogCommsFw, KLogFwTransport, _L8("ERROR: CTransportSelfSender::ResizeQueue() unable to enlarge queue from %d chips to %d chips because error -4 occured"), iBuf->Length(), newLen )); - - return KErrNoMemory; - } - - TRAPD(ret, newBuf->SetLengthL(newLen)); - if(ret != KErrNone) - { - __CFLOG_VAR(( KLogCommsFw, KLogFwTransport, _L8("ERROR: CTransportSelfSender::ResizeQueue() unable to enlarge queue from %d chips to %d chips because error %d occured"), iBuf->Length(), newLen, ret )); - - return ret; - } + CCirBuf* newBuf = new (ELeave) CCirBuf; + CleanupStack::PushL(newBuf); + newBuf->SetLengthL(newLen); + CleanupStack::Pop(newBuf); + TCFMessage entry; while(iBuf->Remove(&entry)) { @@ -341,7 +357,6 @@ } delete iBuf; iBuf = newBuf; - return KErrNone; } void CTransportSelfSender::PostMessage(const TCFMessage& aMessage) @@ -349,21 +364,10 @@ TInt ret = DoPostMessage(aMessage); if(ret != KErrNone) { - ResizeQueue(KSelfSenderQueueGrowthStep); + TRAP_IGNORE(ResizeQueueL(KSelfSenderQueueGrowthStep)); ret = DoPostMessage(aMessage); - //For the benefit of OOM testing as we currently do it (only the sequential failure model) - //we attempt to resize the queue for the second time. - //In real scenarios this approach has very limited or no value as the OOM conditions do rarely - //resemble the ones of our sequential failure OOM testing. - //Therefore it would probably make sense to configure out the code for UREL and only keep - //it for _DEBUG. - if(ret != KErrNone) - { - ResizeQueue(KSelfSenderQueueGrowthStep); - ret = DoPostMessage(aMessage); - __ASSERT_ALWAYS(ret == KErrNone, Panic(ECFTransPeerDrainFailure)); // true, even though peer is us... - } } + __ASSERT_ALWAYS(ret == KErrNone, Panic(ECFTransPeerDrainFailure)); // true, even though peer is us... } void CTransportSelfSender::PostMessage(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TDesC8& aMessage) @@ -372,21 +376,10 @@ TInt ret = DoPostMessage(aPostFrom, aPostTo, aMessage); if(ret != KErrNone) { - ResizeQueue(KSelfSenderQueueGrowthStep); + TRAP_IGNORE(ResizeQueueL(KSelfSenderQueueGrowthStep)); ret = DoPostMessage(aPostFrom, aPostTo, aMessage); - //For the benefit of OOM testing as we currently do it (only the sequential failure model) - //we attempt to resize the queue for the second time. - //In real scenarios this approach has very limited or no value as the OOM conditions do rarely - //resemble the ones of our sequential failure OOM testing. - //Therefore it would probably make sense to configure out the code for UREL and only keep - //it for _DEBUG. - if(ret != KErrNone) - { - ResizeQueue(KSelfSenderQueueGrowthStep); - ret = DoPostMessage(aPostFrom, aPostTo, aMessage); - __ASSERT_ALWAYS(ret == KErrNone, Panic(ECFTransPeerDrainFailure)); // true, even though peer is us... - } } + __ASSERT_ALWAYS(ret == KErrNone, Panic(ECFTransPeerDrainFailure)); // true, even though peer is us... } @@ -453,7 +446,7 @@ } else { - ResizeQueue(KSelfSenderQueueGrowthStep); + TRAP_IGNORE(ResizeQueueL(KSelfSenderQueueGrowthStep)); err = DoPostMessage(*msgPtr); if(err != KErrNone) { @@ -961,6 +954,8 @@ { return GetSenderMandatory(aPeerId)->IsDropTransportPending(); } + + void PreallocateQueueSpaceL(TInt aMinUndeliveredMessages); void RunL(); // for deleting chippers posted to death row private: @@ -1410,6 +1405,15 @@ } } +void CCommsTransportImpl::PreallocateQueueSpaceL(TInt aMinUndeliveredMessages) + { +#ifndef SYMBIAN_NETWORKING_INTERTHREAD_TRANSPORT_ONLY + iSelfSender->PreallocateQueueSpaceL(aMinUndeliveredMessages); +#else + (void)aSize; // Do nothing +#endif + } + // EXPORT_C CCommsTransport* CCommsTransport::NewL(MWorkerThreadRegister& aThreadRegister, const CMetaDataVirtualCtorInPlace* aVirtCtor, CCFTransportHooks* /*aHooksWalker*/) @@ -1538,6 +1542,10 @@ return iImpl->IsDropTransportPending(aPeerId); } +EXPORT_C void CCommsTransport::PreallocateQueueSpaceL(TInt aMinUndeliveredMessages) + { + iImpl->PreallocateQueueSpaceL(aMinUndeliveredMessages); + } // diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/factories/bwins/factoriesu.def --- a/commsfwsupport/commselements/factories/bwins/factoriesu.def Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/factories/bwins/factoriesu.def Mon Sep 13 15:06:46 2010 +0100 @@ -28,4 +28,5 @@ ?SignalCreation@CFactoryBase@Factories@@AAEHAAVAFactoryObject@2@@Z @ 27 NONAME ; int Factories::CFactoryBase::SignalCreation(class Factories::AFactoryObject &) ?SignalDeletion@CFactoryBase@Factories@@AAEXAAVAFactoryObject@2@@Z @ 28 NONAME ; void Factories::CFactoryBase::SignalDeletion(class Factories::AFactoryObject &) ?Uid@CFactoryBase@Factories@@QBE?AVTUid@@XZ @ 29 NONAME ; class TUid Factories::CFactoryBase::Uid(void) const + ?InterfaceStateChange@CFactoryBase@Factories@@QAEXABVTDesC8@@@Z @ 30 NONAME ; void Factories::CFactoryBase::InterfaceStateChange(class TDesC8 const &) diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/factories/eabi/factoriesu.def --- a/commsfwsupport/commselements/factories/eabi/factoriesu.def Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/factories/eabi/factoriesu.def Mon Sep 13 15:06:46 2010 +0100 @@ -47,4 +47,5 @@ _ZTVN9Factories14AFactoryObjectE @ 46 NONAME _ZTVN9Factories17CFactoryContainerE @ 47 NONAME _ZTVN9Factories21CFactoryContainerNodeE @ 48 NONAME + _ZN9Factories12CFactoryBase20InterfaceStateChangeERK6TDesC8 @ 49 NONAME diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/factories/inc/factory.h --- a/commsfwsupport/commselements/factories/inc/factory.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/factories/inc/factory.h Mon Sep 13 15:06:46 2010 +0100 @@ -100,6 +100,9 @@ IMPORT_C void RegisterNotifierL(const IFactoryNotify& aFactoryNotify); IMPORT_C void DeRegisterNotifier(const IFactoryNotify& aFactoryNotify); + // Called by a node to indicate that an interface state change has taken place. The factory then propagates + // this to all observers that have registered to be notified. + IMPORT_C void InterfaceStateChange(const TDesC8& aInfo); protected: IMPORT_C explicit CFactoryBase(TUid aFactoryUid, CFactoryContainer& aParentContainer); diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/factories/inc/factorynotify.h --- a/commsfwsupport/commselements/factories/inc/factorynotify.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/factories/inc/factorynotify.h Mon Sep 13 15:06:46 2010 +0100 @@ -28,7 +28,7 @@ namespace Factories { -typedef void (*TInterfaceStateChangeFn)( TAny*, TDesC8& aInfo ); +typedef void (*TInterfaceStateChangeFn)( TAny*, const TDesC8& aInfo ); typedef TInt (*TFactoryNotifyFn)( TAny*, AFactoryObject& aObject, CFactoryBase& aFactory ); typedef void (*TAnyFn)(TAny*); @@ -50,7 +50,7 @@ { } - void InterfaceStateChange(TDesC8& aInfo) + void InterfaceStateChange(const TDesC8& aInfo) { if ( Check(1) ) { @@ -89,14 +89,14 @@ */ { public: - static void Notification(TAny* aThis, TDesC8& aInfo); + static void Notification(TAny* aThis, const TDesC8& aInfo); static void NotifyDeletion(TAny* aThis, AFactoryObject& aObject, CFactoryBase& aFactory); static TInt NotifyCreation(TAny* aThis, AFactoryObject& aObject, CFactoryBase& aFactory); }; template -void TFactoryNotify::Notification(TAny* aThis, TDesC8& aInfo) +void TFactoryNotify::Notification(TAny* aThis, const TDesC8& aInfo) { TCLIENT* me = (TCLIENT*)aThis; me->InterfaceStateChangeNotification(aInfo); diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/factories/src/factory.cpp --- a/commsfwsupport/commselements/factories/src/factory.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/factories/src/factory.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -432,6 +432,14 @@ return obj; } +EXPORT_C void CFactoryBase::InterfaceStateChange(const TDesC8& aInfo) + { + for (TInt i = iFactoryNotify.Count() - 1; i >= 0; --i) + { + iFactoryNotify[i].InterfaceStateChange(aInfo); + } + } + EXPORT_C AFactoryObject::AFactoryObject(CFactoryBase& aFactory) : iFactory(aFactory) { diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/bwins/meshmachineu.def --- a/commsfwsupport/commselements/meshmachine/bwins/meshmachineu.def Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/meshmachine/bwins/meshmachineu.def Mon Sep 13 15:06:46 2010 +0100 @@ -138,4 +138,5 @@ ?SetPostedTo@CNodeActivityBase@MeshMachine@@QAEXABVRNodeInterface@Messages@@@Z @ 137 NONAME ; void MeshMachine::CNodeActivityBase::SetPostedTo(class Messages::RNodeInterface const &) ?PostedToNodeId@CNodeActivityBase@MeshMachine@@QBEABVTNodeId@Messages@@XZ @ 138 NONAME ; class Messages::TNodeId const & MeshMachine::CNodeActivityBase::PostedToNodeId(void) const ?PostedToPeer@CNodeActivityBase@MeshMachine@@QBEPBVRNodeInterface@Messages@@XZ @ 139 NONAME ; class Messages::RNodeInterface const * MeshMachine::CNodeActivityBase::PostedToPeer(void) const + ?GetNextActivityCountL@CNodeParallelActivityBase@MeshMachine@@KAIABUTNodeActivity@2@ABVAMMNodeBase@2@@Z @ 140 NONAME ; unsigned int MeshMachine::CNodeParallelActivityBase::GetNextActivityCountL(struct MeshMachine::TNodeActivity const &, class MeshMachine::AMMNodeBase const &) diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/doc_pub/MeshMachineFundamentals.doc Binary file commsfwsupport/commselements/meshmachine/doc_pub/MeshMachineFundamentals.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/eabi/meshmachineu.def --- a/commsfwsupport/commselements/meshmachine/eabi/meshmachineu.def Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/meshmachine/eabi/meshmachineu.def Mon Sep 13 15:06:46 2010 +0100 @@ -206,4 +206,5 @@ _ZN11MeshMachine17CNodeActivityBase11SetPostedToERKN8Messages14RNodeInterfaceE @ 205 NONAME _ZNK11MeshMachine17CNodeActivityBase12PostedToPeerEv @ 206 NONAME _ZNK11MeshMachine17CNodeActivityBase14PostedToNodeIdEv @ 207 NONAME + _ZN11MeshMachine25CNodeParallelActivityBase21GetNextActivityCountLERKNS_13TNodeActivityERKNS_11AMMNodeBaseE @ 208 NONAME diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/inc/mm_activities.h --- a/commsfwsupport/commselements/meshmachine/inc/mm_activities.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/meshmachine/inc/mm_activities.h Mon Sep 13 15:06:46 2010 +0100 @@ -39,6 +39,20 @@ //-========================================================= // +//Panics +// +//-========================================================= +_LIT (KMMActivityPanic,"MMActivityPanic"); +enum + { + EPanicCorruptedContext = 1, + EPanicNoPreallocatedSpace = 2, + EPanicOutOfActivities = 3, + EPanicOutOfBounds + }; + +//-========================================================= +// // MACROS // //-========================================================= @@ -1048,7 +1062,7 @@ @param aNode The node to which this activity will belong. @return Generated unique component of activity id */ - static TUint GetNextActivityCountL( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ); + IMPORT_C static TUint GetNextActivityCountL( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ); /** For use by custom activity News to generate the unique part of the activity id. @param aActivitySig Context information about how the activity is to be started @@ -1065,6 +1079,15 @@ */ IMPORT_C CNodeParallelActivityBase( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aNextActivityCount ); +private: + /** + For use by custom activity NewLs to generate the unique part of the activity id. + @param aActivitySig Context information about how the activity is to be started + @param aNode The node to which this activity will belong. + @return Generated unique component of activity id + */ + static TUint DoGetNextActivityCountL( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ); + protected: /** The activity id. The id format is [8 bit unique id|8 bit activity sig]. @@ -1597,13 +1620,6 @@ static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); }; - -inline TUint CNodeParallelActivityBase::GetNextActivityCountL( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ) - { - //Historical. Method ceased to leave, but must keep the old, L-ending overload. - return GetNextActivityCount(aActivitySig, aNode); - } - //By default we reserve the space for preallocated activities generously, to fit even a synchronised activity preallocating space for up to 3 originators. //Any node, hosting specific activities that may need the preallocation mechanism can choose a more optimal amounts. //For efficiency reasons it is strongly recommended that any node (or family of nodes) is revisited and an optimal diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/inc/mm_nodepeer.h --- a/commsfwsupport/commselements/meshmachine/inc/mm_nodepeer.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/meshmachine/inc/mm_nodepeer.h Mon Sep 13 15:06:46 2010 +0100 @@ -65,20 +65,35 @@ return Peer().Type(); } - TUint32 Flags() const - { - return Peer().Flags(); - } + TUint32 Flags() const + { + // Non-client peers lack flags (a state early in relationship) + if(PeerPtr()) + { + return PeerPtr()->Flags(); + } + return 0; + } - TUint32 SetFlags(TUint32 aFlags) - { - return Peer().SetFlags(aFlags); - } + TUint32 SetFlags(TUint32 aFlags) + { + // We only require peer info to be present if an actual state change is occurring (as opposed to default handling) + if(aFlags) + { + return Peer().SetFlags(aFlags); + } + return Flags(); + } - TUint32 ClearFlags(TUint32 aFlags) - { - return Peer().ClearFlags(aFlags); - } + TUint32 ClearFlags(TUint32 aFlags) + { + // We only require peer info to be present if an actual state change is occurring (as opposed to default handling) + if(aFlags) + { + return Peer().ClearFlags(aFlags); + } + return Flags(); + } const RNodeInterface& Peer() const { diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/src/mm_activities.cpp --- a/commsfwsupport/commselements/meshmachine/src/mm_activities.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/meshmachine/src/mm_activities.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -38,20 +38,6 @@ //-========================================================= // -//Panics -// -//-========================================================= -_LIT (KMMActivityPanic,"MMActivityPanic"); -enum - { - EPanicCorruptedContext = 1, - EPanicNoPreallocatedSpace = 2, - EPanicOutOfActivities = 3, - EPanicOutOfBounds - }; - -//-========================================================= -// //TNodeActivityIter // //-========================================================= @@ -556,7 +542,7 @@ static const TUint32 iFull = ~0; static const TInt iCount = (SIZE + iSizeMask) / iSize; TBitmap(); - void SetBit(TUint aBitNum); + void SetBitL(TUint aBitNum); TInt GetFreeBit() const; private: @@ -573,10 +559,10 @@ } template -void TBitmap::SetBit(TUint aBitNum) +void TBitmap::SetBitL(TUint aBitNum) { const TInt index = aBitNum / iSize; - __ASSERT_ALWAYS(index < iCount,User::Panic(KMMActivityPanic,EPanicOutOfBounds)); + User::LeaveIfError(index < iCount ? KErrNone : KErrOverflow); iBits[index] |= 1 << (aBitNum & iSizeMask); } @@ -612,9 +598,22 @@ // //-========================================================= +EXPORT_C TUint CNodeParallelActivityBase::GetNextActivityCountL( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ) + { + return DoGetNextActivityCountL(aActivitySig, aNode); + } + +EXPORT_C TUint CNodeParallelActivityBase::GetNextActivityCount( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ) + { + // Version for infallible activities + TUint nextActivity(0); + TRAPD(err,nextActivity = DoGetNextActivityCountL(aActivitySig, aNode)); + __ASSERT_ALWAYS(err == KErrNone,User::Panic(KMMActivityPanic,EPanicOutOfActivities)); + return nextActivity; + } // For custom activities to implement New -EXPORT_C TUint CNodeParallelActivityBase::GetNextActivityCount( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ) +TUint CNodeParallelActivityBase::DoGetNextActivityCountL( const TNodeActivity& aActivitySig, const AMMNodeBase& aNode ) { TInt c = 1; @@ -628,12 +627,12 @@ if ((id&0xff) == aActivitySig.iId) { TInt8 uniqueid = id >> 8; - activityids.SetBit(uniqueid); + activityids.SetBitL(uniqueid); } } c = activityids.GetFreeBit(); - __ASSERT_ALWAYS(c>=0,User::Panic(KMMActivityPanic,EPanicOutOfActivities)); + User::LeaveIfError( c>=0 ? KErrNone : KErrOverflow); return c; } diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/meshmachine/src/mm_node.cpp --- a/commsfwsupport/commselements/meshmachine/src/mm_node.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/meshmachine/src/mm_node.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -735,7 +735,10 @@ if(!freeCellFound) { MESH_LOG((KMeshMachineSubTag, _L8("ERROR AMMNodeBase %08x:\tBorrowPreallocatedSpace - All %d preallocation cells have been allocated!"), this, maxPreallocatedActivities)); - __ASSERT_ALWAYS(freeCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceAlreadyTaken)); + __ASSERT_DEBUG(freeCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceAlreadyTaken)); + // Attempt to allocate some space from the heap now in a last attempt to continue processing. + TRAPD(err,ptr = User::AllocL(aSize)); + __ASSERT_ALWAYS(err, User::Panic(KMessagesPanic, EPreAllocationFailedPanic)); } return ptr; @@ -766,6 +769,8 @@ { MESH_LOG((KMeshMachineSubTag, _L8("ERROR AMMNodeBase %08x:\tReturnPreallocatedSpace - the returned pointer 0x%08X is invalid!"), this, aSpace)); __ASSERT_DEBUG(allocatedCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceReturnedOther)); + // May be returning a cell which was created in error recovery section of the Borrow in which case if must be "free"d. + User::Free(aSpace); } } diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/nodemessages/doc_pub/NodeMessages_Design.doc Binary file commsfwsupport/commselements/nodemessages/doc_pub/NodeMessages_Design.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/nodemessages/inc/nm_common.h --- a/commsfwsupport/commselements/nodemessages/inc/nm_common.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/nodemessages/inc/nm_common.h Mon Sep 13 15:06:46 2010 +0100 @@ -49,7 +49,9 @@ EMessageCastPanic, EConstructedObjectTooBig, EAddressNotValidPanic, - EClientNotValidPanic + EClientNotValidPanic, + EDeceasedNodePanic, + EPreAllocationFailedPanic }; diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/nodemessages/inc/nm_interfaces.h --- a/commsfwsupport/commselements/nodemessages/inc/nm_interfaces.h Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/nodemessages/inc/nm_interfaces.h Mon Sep 13 15:06:46 2010 +0100 @@ -416,6 +416,13 @@ iPreAllocSize=0; iPreAllocatedActivityChunk=NULL; } + ~TPreAllocStore() + { + if(iPreAllocatedActivityChunk != NULL) + { + User::Free(iPreAllocatedActivityChunk); + } + } TUint iPreAllocSize; TAny* iPreAllocatedActivityChunk; }; diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/nodemessages/src/nm_interfaces.cpp --- a/commsfwsupport/commselements/nodemessages/src/nm_interfaces.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/nodemessages/src/nm_interfaces.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -23,7 +23,6 @@ #include #include "nm_signals.h" - #ifdef _DEBUG // Panic category for "absolutely impossible!" vanilla ASSERT()-type panics from this module // (if it could happen through user error then you should give it an explicit, documented, category + code) @@ -140,10 +139,9 @@ iClientType = TClientType::NullType(); if(iPreAlloc!=NULL) { - delete iPreAlloc->iPreAllocatedActivityChunk; + delete iPreAlloc; + iPreAlloc = NULL; } - delete iPreAlloc; - iPreAlloc = NULL; } EXPORT_C void RNodeInterface::PostMessage(const TRuntimeCtxId& aPostFrom, const TNodeId::TRemainder& aPostTo, const TSignalBase& aMessage) const @@ -171,11 +169,28 @@ if(iPreAlloc!=NULL) // Memory already allocated for this client { - __ASSERT_DEBUG(iPreAlloc->iPreAllocatedActivityChunk != NULL, User::Panic(KSpecAssert_ElemNodeMessIntC, 5)); - return; + // If iPreAlloc is not NULL then it should be usable. Ensure that the memory chunk has been suitable allocated + __ASSERT_DEBUG(iPreAlloc->iPreAllocatedActivityChunk != NULL, User::Panic(KSpecAssert_ElemNodeMessIntC, 2)); + if(iPreAlloc->iPreAllocSize >= aAllocSize) + // Memory already preallocated of a sufficient size - this could happen if clients are re-added + { + return; + } + else + // Memory preallocated is too small. Free up the space and then attempt to reallocate + { + // Code path should never enter here as PreAllocL should not be called once the iPreAlloc memory space is allocated. + // However on the chance of production device entering here attempt to clear the preallocated space and reallocate a more suitable amount. + __ASSERT_DEBUG(EFalse, User::Panic(KSpecAssert_ElemNodeMessIntC, 3)); + delete iPreAlloc; + iPreAlloc = NULL; + } } - iPreAlloc = new (ELeave) TPreAllocStore(); - iPreAlloc->iPreAllocatedActivityChunk = User::AllocL(aAllocSize); + TPreAllocStore* preAlloc = new (ELeave) TPreAllocStore(); + CleanupStack::PushL(preAlloc); + preAlloc->iPreAllocatedActivityChunk = User::AllocL(aAllocSize); + CleanupStack::Pop(preAlloc); + iPreAlloc = preAlloc; iPreAlloc->iPreAllocSize = aAllocSize; } @@ -188,12 +203,15 @@ if(!(iPreAlloc && aSize <= iPreAlloc->iPreAllocSize)) { // By this stage the PreAllocL must have been triggered and memory space must have been allocated. - __ASSERT_DEBUG(EFalse, User::Panic(KSpecAssert_ElemNodeMessIntC, 3)); - delete iPreAlloc->iPreAllocatedActivityChunk; - iPreAlloc->iPreAllocatedActivityChunk = User::AllocL(aSize); + __ASSERT_DEBUG(EFalse, User::Panic(KSpecAssert_ElemNodeMessIntC, 4)); + TRAPD(err,PreAllocL(aSize)); + __ASSERT_ALWAYS(err, User::Panic(KMessagesPanic, EPreAllocationFailedPanic)); } TAny* preallocatedSpace = (RNodeInterface*)iPreAlloc->iPreAllocatedActivityChunk; - iPreAlloc->iPreAllocatedActivityChunk=NULL; + // Release ownership of the memory area + iPreAlloc->iPreAllocatedActivityChunk = NULL; + delete iPreAlloc; + iPreAlloc = NULL; return preallocatedSpace; } @@ -252,7 +270,7 @@ EXPORT_C void RRequestOriginator::Open(RRequestOriginator& aOriginalRequest) { - __ASSERT_DEBUG(aOriginalRequest.IsOpen(), User::Panic(KSpecAssert_ElemNodeMessIntC, 4)); + __ASSERT_DEBUG(aOriginalRequest.IsOpen(), User::Panic(KSpecAssert_ElemNodeMessIntC, 1)); iNode = aOriginalRequest.iNode; iRemainder = aOriginalRequest.iRemainder; aOriginalRequest.Close(); diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/nodemessages/src/nm_messages.cpp --- a/commsfwsupport/commselements/nodemessages/src/nm_messages.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/nodemessages/src/nm_messages.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -52,6 +52,7 @@ { const TNodeId& nodeId = address_cast(aRecipient); //This message type operates on nodes __ASSERT_DEBUG(nodeId.Ptr(), User::Panic(KSpecAssert_ElemNodeMessMesC, 1)); + __ASSERT_ALWAYS(nodeId.Node().NodeId() == nodeId, User::Panic(KMessagesPanic, EDeceasedNodePanic)); //Address reuse protection (Ptr() may match something existing, but not necesserily the intended addresee). nodeId.Node().ReceivedL(aSender, nodeId, *this); } diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/rootserver/doc_pub/Root Server API Reference.doc Binary file commsfwsupport/commselements/rootserver/doc_pub/Root Server API Reference.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/rootserver/doc_pub/Root Server Design Document.doc Binary file commsfwsupport/commselements/rootserver/doc_pub/Root Server Design Document.doc has changed diff -r ae47d0499bee -r c9776eadbffd commsfwsupport/commselements/serverden/src/sd_workersession.cpp --- a/commsfwsupport/commselements/serverden/src/sd_workersession.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwsupport/commselements/serverden/src/sd_workersession.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -62,6 +62,7 @@ EXPORT_C CSubSessionIx::~CSubSessionIx() { + iLock.Close(); User::Free(iIx); } @@ -693,6 +694,14 @@ EXPORT_C void CWorkerSubSession::ConstructL() { iSessionProxy = Player().CurrentSessionProxyL(); + // Try reserving enough space in the transport sender queue so that we don't overflow the queue + // when sending messages in bulk, which can happen in cases like closing the session without + // closing individual sub-sessions. Protyping reveals that with a high number of number of + // sub-sessions, a transport queue length twice the number of active sub-session is a safe bet + CCommsTransport* transport = iPlayer->WorkerThread().Transport(); + TInt numSubsession = iSession->SubSessions().ActiveCount() + 1; + const TInt numUndeliveredMessae = numSubsession * 2; + transport->PreallocateQueueSpaceL(numUndeliveredMessae); } EXPORT_C CWorkerSubSession::~CWorkerSubSession() diff -r ae47d0499bee -r c9776eadbffd commsfwtools/commstools/svg/parselog.pl --- a/commsfwtools/commstools/svg/parselog.pl Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwtools/commstools/svg/parselog.pl Mon Sep 13 15:06:46 2010 +0100 @@ -44,7 +44,7 @@ require 'getopts.pl'; -my $version = "2.2 (16/04/10)"; +my $version = "2.3 (16/06/10)"; # # Internal Options @@ -160,7 +160,7 @@ #OLD: #CFNode MetaConn a 47 W6: CIpTierManagerFactory 0c1822d0: created [MCFNode 0c1822d8] [96] #NEW: -#250,194,1,1864213751,0,0x00f3e114,ENodeMessages: CFactoryContainerNode 0e571204: created [MNode 0e571220] [44] +#250,194,1,1864213751,0,0x00f3e114,ENodeMessages: CFactoryContainerNode 0e571204: created [ANode 0e571220] [44] elsif (/.*created \[ANode=0x([0-9A-Fa-f]{8})\]/) { my ($name,$realaddr,$nodeaddr) = m/(\w+) ([0-9A-Fa-f]{8}):\tcreated \[ANode=0x([0-9A-Fa-f]{8})\]/; $realaddr =~ s/^0x//; @@ -223,7 +223,7 @@ print "l ^Shutting-down\n"; $lifeStage = 0; } -#1061,194,2,1212990838,0,0x00a1b488,ENodeMessages: [STARTBLOCK=Context] CNodeActivityBase 0d922584: StartL->starting activity Node: [MNode=0x0d9229e0] Sender: [Address=[iThread=0x0006] [iPtr=0x0d922338] ] Recipient: [Address=[iThread=0x0006] [iPtr=0x0d9229e0] ] aContext.iMessage: [Signature=0x00000000:0xfdfdfdfd] [STARTBLOCK=Activity] [Activity=MCprControlClientJoin] [CurrentTriple=Idle] [ENDBLOCK=Activity] [ENDBLOCK=Context] +#1061,194,2,1212990838,0,0x00a1b488,ENodeMessages: [STARTBLOCK=Context] CNodeActivityBase 0d922584: StartL->starting activity Node: [ANode=0x0d9229e0] Sender: [Address=[iThread=0x0006] [iPtr=0x0d922338] ] Recipient: [Address=[iThread=0x0006] [iPtr=0x0d9229e0] ] aContext.iMessage: [Signature=0x00000000:0xfdfdfdfd] [STARTBLOCK=Activity] [Activity=MCprControlClientJoin] [CurrentTriple=Idle] [ENDBLOCK=Activity] [ENDBLOCK=Context] elsif (/starting activity.*?\[ANode=0x([0-9A-Fa-f]{8})\].*\[Activity=(\w*)\]/) { if (!($opt_X & 1)) @@ -360,9 +360,9 @@ { print "t ", objectName($lastDispatchDestination), " (STRAY $1)\n"; } -#1077,194,2,1212991263,0,0x00a1b488,ENodeMessages: [STARTBLOCK=Context] CNodeActivityBase 0d922584: StartL->activity started Node: [MNode=0x0d9229e0] Sender: [Address=[iThread=0x0006] [iPtr=0x0d922338] ] Recipient: [Address=[iThread=0x0006] [iPtr=0x0d9229e0] ] aContext.iMessage: [Signature=0x00000000:0xfdfdfdfd] [STARTBLOCK=Activity] [Activity=MCprControlClientJoin] [CurrentTriple=MCprStates::TDecrementBlockingDestoryAndAddControlClientAndSendJoinCompleteIfRequest->NULL] [ENDBLOCK=Activity] [ENDBLOCK=Context] -#843,195,1,1212618492,0,0x00a1b488,EMeshMachine: CNodeActivityBase: Accept->First transition: ConnStates::TProcessStateChange->MeshMachine::TAwaitingStateChange [MNode=0x0b1ff948] -#897,194,2,1212884309,0,0x00a1b488,ENodeMessages: [STARTBLOCK=Activity] CNodeActivityBase 0d921eb8: Next->transition happened [MNode=0x0b1ff948] [Activity=ConnectionStart] [CurrentTriple=ConnStates::TSelectMetaPlane->TECABState] [ENDBLOCK=Activity] +#1077,194,2,1212991263,0,0x00a1b488,ENodeMessages: [STARTBLOCK=Context] CNodeActivityBase 0d922584: StartL->activity started Node: [ANode=0x0d9229e0] Sender: [Address=[iThread=0x0006] [iPtr=0x0d922338] ] Recipient: [Address=[iThread=0x0006] [iPtr=0x0d9229e0] ] aContext.iMessage: [Signature=0x00000000:0xfdfdfdfd] [STARTBLOCK=Activity] [Activity=MCprControlClientJoin] [CurrentTriple=MCprStates::TDecrementBlockingDestoryAndAddControlClientAndSendJoinCompleteIfRequest->NULL] [ENDBLOCK=Activity] [ENDBLOCK=Context] +#843,195,1,1212618492,0,0x00a1b488,EMeshMachine: CNodeActivityBase: Accept->First transition: ConnStates::TProcessStateChange->MeshMachine::TAwaitingStateChange [ANode=0x0b1ff948] +#897,194,2,1212884309,0,0x00a1b488,ENodeMessages: [STARTBLOCK=Activity] CNodeActivityBase 0d921eb8: Next->transition happened [ANode=0x0b1ff948] [Activity=ConnectionStart] [CurrentTriple=ConnStates::TSelectMetaPlane->TECABState] [ENDBLOCK=Activity] #1237,195,1,2340065279,0,0x00dfff38,EMeshMachine: CNodeActivityBase 0cb427ec: Next->match [ANode=0x0cb42c48] [Activity=MCprBinderRequest] [Triple=PRStates::TCreateDataClient->CoreNetStates::TAwaitingDataClientJoin] elsif (($opt_X & 2) == 0 && (/(StartL)->activity started.*?\[ANode=0x([0-9a-f]{8})\].*\[Activity=(\S*)\].*\[Triple=(\S*)\]/ || @@ -440,11 +440,11 @@ print "t ", objectName($activityNode{$actAddr}), " ($activityName{$actAddr}) Cancel(). Posted to ", objectName($postedToId), "\n"; } } - elsif (($opt_X & 4) == 0 && /UnparkState->unparked\s+\[MNode=0x([0-9a-fA-F]{8})\].*\[Activity=(\w+)\].*\[Triple=(.*?)\]/) + elsif (($opt_X & 4) == 0 && /UnparkState->unparked\s+\[ANode=0x([0-9a-fA-F]{8})\].*\[Activity=(\w+)\].*\[Triple=(.*?)\]/) { print "t ", objectName($1), " {50,200,50} (Unparked $2, $3)\n"; } - elsif (($opt_X & 4) == 0 && /ParkState->parked\s+\[MNode=0x([0-9a-fA-F]{8})\].*\[Activity=(\w+)\].*\[Triple=(.*?)\]/) { + elsif (($opt_X & 4) == 0 && /ParkState->parked\s+\[ANode=0x([0-9a-fA-F]{8})\].*\[Activity=(\w+)\].*\[Triple=(.*?)\]/) { print "t ", objectName($1), " {50,200,50} (Parked $2, $3)\n"; } elsif (/Synchronous call:/) { diff -r ae47d0499bee -r c9776eadbffd commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/bld.inf --- a/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/bld.inf Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/bld.inf Mon Sep 13 15:06:46 2010 +0100 @@ -13,6 +13,11 @@ // Description: // +PRJ_EXPORTS +createcommdbs.meta /epoc32/tools/makefile_templates/converged-comms/createcommdbs.meta +createcommdbs.mk /epoc32/tools/makefile_templates/converged-comms/createcommdbs.mk + + PRJ_PLATFORMS DEFAULT diff -r ae47d0499bee -r c9776eadbffd commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.meta Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,213 @@ + + + + + + +S60 Cross Referencer: mcl_201032_hw79 + + + + + + + + + +
+ +
+

Company confidential

+
+ + + + + + + + + + + + + + +
+ + + + + + +
+
+ + [ source navigation ]
+ [ diff markup ]
+ [ identifier search ]
+ [ general search ]
+
 
+ + + + + + + + + + + + +
 DFS7x.92  MCL - DFS7x.01  S60_3_23  pf_5250  requested
+ +  [ 92_201033_hw79 ]
+  [ 92ps1_201033_hw79 ]
+  [ 92att_201033_hw79 ]
+  [ 92_201032_hw79 ]
+  [ 92ps1_201032_hw79 ]
+  [ 92att_201032_hw79 ]
+  [ 92_201030_hw79 ]
+  [ 92ps1_201030_hw79 ]
+  [ 92_201022_hw79 ]
+  [ 92_201012_hw79 ]
+  [ mcl_201002_hw79 ]
+
+ +  [ mcl_201032_hw79 ]
+  [ mcl_201030_hw79 ]
+  [ mcl_201028_hw79 ]
+  [ mcl_201026_hw79 ]
+  [ mcl_201020_hw79 ]
+  [ mcl_201012_hw79 ]
+  [ mcl_201004_hw79 ]
+  [ mcl.01_201002_hw79 ]
+
+ +  [ S60_3_23_201024_RnD_gadget ]
+  [ S60_3_23_201022_RnD_gadget ]
+  [ S60_3_23_201010_RnD_gadget ]
+  [ S60_3_23_201002_RnD_gadget ]
+
+ +  [ pf_5250_prd_30.0.029 ]
+  [ pf_5250_prd_30.0.028 ]
+  [ pf_5250_prd_30.0.004 ]
+  [ pf_5250_201012 ]
+  [ pf_5250_201002 ]
+
+ +  [ NCP79_92_10w33_RC1 ]
+  [ NCP79_92ps1_10w33_RC1 ]
+  [ NCP79_92att_10w33_RC1 ]
+  [ NCP_TB10.1.10w32.013 ]
+  [ NCP79_92_10w32_RC1 ]
+  [ NCP79_92ps1_10w32_RC1 ]
+  [ NCP79_92att_10w32_RC1 ]
+  [ NCP110_10w32_RC ]
+  [ NCP110_10w30_RC2 ]
+  [ dfs110_11001_201028_hw110 ]
+
+
+ +
+
+001 # Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+002 # All rights reserved.
+003 # This component and the accompanying materials are made available
+004 # under the terms of "Eclipse Public License v1.0"
+005 # which accompanies this distribution, and is available
+006 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+007 #
+008 # Initial Contributors:
+009 # Nokia Corporation - initial contribution.
+010 # 
+011 # Contributors:
+012 #
+013 # Description:
+014 # Meta information for PDR generation
+015 #
+016 
+017 platform        win32
+018 makefile        gnumake
+019 techstream      converged-comms
+020 
+
+
+ + + + + + + + +
+ [ source navigation ] + [ diff markup ] + [ identifier search ] + [ general search ]
+
+ + + + +
+ This page was automatically generated by the + LXR engine. +
And brought to you by the + Delivery Tools. +
+
+ + +Current status: ready \ No newline at end of file diff -r ae47d0499bee -r c9776eadbffd commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commsfwtools/preparedefaultcommsdatabase/defaultcommdb/group/createcommdbs.mk Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,242 @@ + + + + + + +S60 Cross Referencer: mcl_201032_hw79 + + + + + + + + + +
+ +
+

Company confidential

+
+ + + + + + + + + + + + + + +
+ + + + + + +
+
+ + [ source navigation ]
+ [ diff markup ]
+ [ identifier search ]
+ [ general search ]
+
 
+ + + + + + + + + + + + +
 DFS7x.92  MCL - DFS7x.01  S60_3_23  pf_5250  requested
+ +  [ 92_201033_hw79 ]
+  [ 92ps1_201033_hw79 ]
+  [ 92att_201033_hw79 ]
+  [ 92_201032_hw79 ]
+  [ 92ps1_201032_hw79 ]
+  [ 92att_201032_hw79 ]
+  [ 92_201030_hw79 ]
+  [ 92ps1_201030_hw79 ]
+  [ 92_201022_hw79 ]
+  [ 92_201012_hw79 ]
+  [ mcl_201002_hw79 ]
+
+ +  [ mcl_201032_hw79 ]
+  [ mcl_201030_hw79 ]
+  [ mcl_201028_hw79 ]
+  [ mcl_201026_hw79 ]
+  [ mcl_201020_hw79 ]
+  [ mcl_201012_hw79 ]
+  [ mcl_201004_hw79 ]
+  [ mcl.01_201002_hw79 ]
+
+ +  [ S60_3_23_201024_RnD_gadget ]
+  [ S60_3_23_201022_RnD_gadget ]
+  [ S60_3_23_201010_RnD_gadget ]
+  [ S60_3_23_201002_RnD_gadget ]
+
+ +  [ pf_5250_prd_30.0.029 ]
+  [ pf_5250_prd_30.0.028 ]
+  [ pf_5250_prd_30.0.004 ]
+  [ pf_5250_201012 ]
+  [ pf_5250_201002 ]
+
+ +  [ NCP79_92_10w33_RC1 ]
+  [ NCP79_92ps1_10w33_RC1 ]
+  [ NCP79_92att_10w33_RC1 ]
+  [ NCP_TB10.1.10w32.013 ]
+  [ NCP79_92_10w32_RC1 ]
+  [ NCP79_92ps1_10w32_RC1 ]
+  [ NCP79_92att_10w32_RC1 ]
+  [ NCP110_10w32_RC ]
+  [ NCP110_10w30_RC2 ]
+  [ dfs110_11001_201028_hw110 ]
+
+
+ +
+
+001 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+002 # All rights reserved.
+003 # This component and the accompanying materials are made available
+004 # under the terms of "Eclipse Public License v1.0"
+005 # which accompanies this distribution, and is available
+006 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+007 #
+008 # Initial Contributors:
+009 # Nokia Corporation - initial contribution.
+010 #
+011 # Contributors:
+012 #
+013 # Description:
+014 # Envoke CED to create correct CommDB
+015 # 
+016 #
+017 
+018 do_nothing :
+019 
+020 
+021 #
+022 # The targets invoked by abld 
+023 #
+024 
+025 MAKMAKE : do_nothing
+026 
+027 RESOURCE : do_nothing
+028 
+029 SAVESPACE : BLD
+030 
+031 BLD : do_nothing
+032 
+033 FREEZE : do_nothing
+034 
+035 LIB : do_nothing
+036 
+037 CLEANLIB : do_nothing
+038 
+039 FINAL : 
+040         perl $(EXTENSION_ROOT)/createcommdbs.pl --command=build --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec
+041 
+042 CLEAN : 
+043         perl $(EXTENSION_ROOT)/createcommdbs.pl --command=clean --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec
+044 
+045 RELEASABLES : 
+046         @perl $(EXTENSION_ROOT)/createcommdbs.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec
+047         
+048 
+049 
+050 
+
+ + + + + + + + +
+ [ source navigation ] + [ diff markup ] + [ identifier search ] + [ general search ]
+
+ + + + +
+ This page was automatically generated by the + LXR engine. +
And brought to you by the + Delivery Tools. +
+
+ + +Current status: ready \ No newline at end of file diff -r ae47d0499bee -r c9776eadbffd commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/bld.inf --- a/commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/bld.inf Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/bld.inf Mon Sep 13 15:06:46 2010 +0100 @@ -13,6 +13,10 @@ // Description: // +PRJ_EXPORTS +installdefaultcommdb.meta /epoc32/tools/makefile_templates/converged-comms/installdefaultcommdb.meta +installdefaultcommdb.mk /epoc32/tools/makefile_templates/converged-comms/installdefaultcommdb.mk + PRJ_PLATFORMS DEFAULT diff -r ae47d0499bee -r c9776eadbffd commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/installdefaultcommdb.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/installdefaultcommdb.meta Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,213 @@ + + + + + + +S60 Cross Referencer: mcl_201032_hw79 + + + + + + + + + +
+ +
+

Company confidential

+
+ + + + + + + + + + + + + + +
+ + + + + + +
+
+ + [ source navigation ]
+ [ diff markup ]
+ [ identifier search ]
+ [ general search ]
+
 
+ + + + + + + + + + + + +
 DFS7x.92  MCL - DFS7x.01  S60_3_23  pf_5250  requested
+ +  [ 92_201033_hw79 ]
+  [ 92ps1_201033_hw79 ]
+  [ 92att_201033_hw79 ]
+  [ 92_201032_hw79 ]
+  [ 92ps1_201032_hw79 ]
+  [ 92att_201032_hw79 ]
+  [ 92_201030_hw79 ]
+  [ 92ps1_201030_hw79 ]
+  [ 92_201022_hw79 ]
+  [ 92_201012_hw79 ]
+  [ mcl_201002_hw79 ]
+
+ +  [ mcl_201032_hw79 ]
+  [ mcl_201030_hw79 ]
+  [ mcl_201028_hw79 ]
+  [ mcl_201026_hw79 ]
+  [ mcl_201020_hw79 ]
+  [ mcl_201012_hw79 ]
+  [ mcl_201004_hw79 ]
+  [ mcl.01_201002_hw79 ]
+
+ +  [ S60_3_23_201024_RnD_gadget ]
+  [ S60_3_23_201022_RnD_gadget ]
+  [ S60_3_23_201010_RnD_gadget ]
+  [ S60_3_23_201002_RnD_gadget ]
+
+ +  [ pf_5250_prd_30.0.029 ]
+  [ pf_5250_prd_30.0.028 ]
+  [ pf_5250_prd_30.0.004 ]
+  [ pf_5250_201012 ]
+  [ pf_5250_201002 ]
+
+ +  [ NCP79_92_10w33_RC1 ]
+  [ NCP79_92ps1_10w33_RC1 ]
+  [ NCP79_92att_10w33_RC1 ]
+  [ NCP_TB10.1.10w32.013 ]
+  [ NCP79_92_10w32_RC1 ]
+  [ NCP79_92ps1_10w32_RC1 ]
+  [ NCP79_92att_10w32_RC1 ]
+  [ NCP110_10w32_RC ]
+  [ NCP110_10w30_RC2 ]
+  [ dfs110_11001_201028_hw110 ]
+
+
+ +
+
+001 # Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+002 # All rights reserved.
+003 # This component and the accompanying materials are made available
+004 # under the terms of "Eclipse Public License v1.0"
+005 # which accompanies this distribution, and is available
+006 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+007 #
+008 # Initial Contributors:
+009 # Nokia Corporation - initial contribution.
+010 # 
+011 # Contributors:
+012 #
+013 # Description:
+014 # Meta information for PDR generation
+015 #
+016 
+017 platform        win32
+018 makefile        gnumake
+019 techstream      converged-comms
+020 
+
+
+ + + + + + + + +
+ [ source navigation ] + [ diff markup ] + [ identifier search ] + [ general search ]
+
+ + + + +
+ This page was automatically generated by the + LXR engine. +
And brought to you by the + Delivery Tools. +
+
+ + +Current status: ready \ No newline at end of file diff -r ae47d0499bee -r c9776eadbffd commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/installdefaultcommdb.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commsfwtools/preparedefaultcommsdatabase/installdefaultcommdb/group/installdefaultcommdb.mk Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,240 @@ + + + + + + +S60 Cross Referencer: mcl_201032_hw79 + + + + + + + + + +
+ +
+

Company confidential

+
+ + + + + + + + + + + + + + +
+ + + + + + +
+
+ + [ source navigation ]
+ [ diff markup ]
+ [ identifier search ]
+ [ general search ]
+
 
+ + + + + + + + + + + + +
 DFS7x.92  MCL - DFS7x.01  S60_3_23  pf_5250  requested
+ +  [ 92_201033_hw79 ]
+  [ 92ps1_201033_hw79 ]
+  [ 92att_201033_hw79 ]
+  [ 92_201032_hw79 ]
+  [ 92ps1_201032_hw79 ]
+  [ 92att_201032_hw79 ]
+  [ 92_201030_hw79 ]
+  [ 92ps1_201030_hw79 ]
+  [ 92_201022_hw79 ]
+  [ 92_201012_hw79 ]
+  [ mcl_201002_hw79 ]
+
+ +  [ mcl_201032_hw79 ]
+  [ mcl_201030_hw79 ]
+  [ mcl_201028_hw79 ]
+  [ mcl_201026_hw79 ]
+  [ mcl_201020_hw79 ]
+  [ mcl_201012_hw79 ]
+  [ mcl_201004_hw79 ]
+  [ mcl.01_201002_hw79 ]
+
+ +  [ S60_3_23_201024_RnD_gadget ]
+  [ S60_3_23_201022_RnD_gadget ]
+  [ S60_3_23_201010_RnD_gadget ]
+  [ S60_3_23_201002_RnD_gadget ]
+
+ +  [ pf_5250_prd_30.0.029 ]
+  [ pf_5250_prd_30.0.028 ]
+  [ pf_5250_prd_30.0.004 ]
+  [ pf_5250_201012 ]
+  [ pf_5250_201002 ]
+
+ +  [ NCP79_92_10w33_RC1 ]
+  [ NCP79_92ps1_10w33_RC1 ]
+  [ NCP79_92att_10w33_RC1 ]
+  [ NCP_TB10.1.10w32.013 ]
+  [ NCP79_92_10w32_RC1 ]
+  [ NCP79_92ps1_10w32_RC1 ]
+  [ NCP79_92att_10w32_RC1 ]
+  [ NCP110_10w32_RC ]
+  [ NCP110_10w30_RC2 ]
+  [ dfs110_11001_201028_hw110 ]
+
+
+ +
+
+001 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+002 # All rights reserved.
+003 # This component and the accompanying materials are made available
+004 # under the terms of "Eclipse Public License v1.0"
+005 # which accompanies this distribution, and is available
+006 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+007 #
+008 # Initial Contributors:
+009 # Nokia Corporation - initial contribution.
+010 #
+011 # Contributors:
+012 #
+013 # Description:
+014 # Envoke CED to install correct CommDB
+015 #
+016 
+017 do_nothing :
+018         rem do_nothing
+019 
+020 #
+021 # The targets invoked by abld 
+022 #
+023 
+024 MAKMAKE : do_nothing
+025 
+026 RESOURCE : do_nothing
+027 
+028 SAVESPACE : BLD
+029 
+030 BLD : do_nothing
+031 
+032 FREEZE : do_nothing
+033 
+034 LIB : do_nothing
+035 
+036 CLEANLIB : do_nothing
+037 
+038 FINAL : 
+039         perl $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=build --platform=$(PLATFORM) --variant=$(CFG) --platsec
+040 
+041 CLEAN : 
+042         perl $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=clean --platform=$(PLATFORM) --variant=$(CFG) --platsec
+043 
+044 RELEASABLES : 
+045         @perl $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --platsec
+046         
+047 
+048 
+
+ + + + + + + + +
+ [ source navigation ] + [ diff markup ] + [ identifier search ] + [ general search ]
+
+ + + + +
+ This page was automatically generated by the + LXR engine. +
And brought to you by the + Delivery Tools. +
+
+ + +Current status: ready \ No newline at end of file diff -r ae47d0499bee -r c9776eadbffd commsfwutils/commsbufs/mbufmgr/src/mb_chn.cpp --- a/commsfwutils/commsbufs/mbufmgr/src/mb_chn.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/commsfwutils/commsbufs/mbufmgr/src/mb_chn.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -618,10 +618,11 @@ return KErrNone; } -// overloading for TLS +// overloading intended to avoid TLS lookup of pool manager. Seemingly not really useful since most Split() +// operations will have an existing buffer to base a Copy() from EXPORT_C TInt RMBufChain::Split(TInt anOffset, RMBufChain& newChain, RMBufAllocator& /* aRMBufAllocator */) { - return RCommsBufChain::Split ( anOffset, newChain ); + return RMBufChain::Split ( anOffset, newChain ); } diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/CoreProviders/src/coretiernotificationactivity.cpp --- a/datacommsserver/esockserver/CoreProviders/src/coretiernotificationactivity.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/CoreProviders/src/coretiernotificationactivity.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -168,16 +168,16 @@ // set up a session with each collector for (TInt sessionId=0 ; sessionId, NetStateMachine::MStateTransition, TContext ) IMPORT_C virtual void DoL(); diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/UpsCoreProviders/src/upscpractivities.cpp --- a/datacommsserver/esockserver/UpsCoreProviders/src/upscpractivities.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/UpsCoreProviders/src/upscpractivities.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -92,12 +92,12 @@ { iFlags = aFlags; } -/* + TInt CDeferredCtrlClientJoinActivity::Flags() { return iFlags; } -*/ + EXPORT_DEFINE_SMELEMENT(CDeferredCtrlClientJoinActivity::TStoreControlClient, NetStateMachine::MStateTransition, CDeferredCtrlClientJoinActivity::TContext) EXPORT_C void CDeferredCtrlClientJoinActivity::TStoreControlClient::DoL() @@ -109,6 +109,7 @@ __ASSERT_DEBUG(act->Client() == TNodeId::NullId(), User::Panic(KSpecAssert_ESockUpsCoreProv, 2)); const TCFControlClient::TJoinRequest& msg = message_cast(iContext.iMessage); act->SetClient(msg.iNodeId); + act->SetFlags(msg.iClientType.Flags()); } EXPORT_DEFINE_SMELEMENT(CDeferredCtrlClientJoinActivity::TAddControlClientAndSendJoinComplete, NetStateMachine::MStateTransition, CDeferredCtrlClientJoinActivity::TContext) @@ -121,7 +122,7 @@ __ASSERT_DEBUG(act->Client() != TNodeId::NullId(), User::Panic(KSpecAssert_ESockUpsCoreProv, 3)); // Add control client - iContext.Node().AddClientL(act->Client(), TCFClientType(TCFClientType::ECtrl)); + iContext.Node().AddClientL(act->Client(), TCFClientType(TCFClientType::ECtrl, act->Flags())); // Send TJoinComplete RClientInterface::OpenPostMessageClose(iContext.NodeId(), act->Client(), TCFControlClient::TJoinComplete().CRef()); diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/bwins/esocksvrU.DEF --- a/datacommsserver/esockserver/bwins/esocksvrU.DEF Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/bwins/esocksvrU.DEF Mon Sep 13 15:06:46 2010 +0100 @@ -1055,4 +1055,9 @@ ?GetVDataTableStatic@TTierTypeIdFactoryQuery@ESock@@SAPBUSVDataTableEntry@Meta@@XZ @ 1054 NONAME ; struct Meta::SVDataTableEntry const * ESock::TTierTypeIdFactoryQuery::GetVDataTableStatic(void) ?AddClientL@CMMCommsProviderBase@ESock@@UAEPAVRNodeInterface@Messages@@ABVTNodeId@4@ABVTClientType@4@PAX@Z @ 1055 NONAME ; class Messages::RNodeInterface * ESock::CMMCommsProviderBase::AddClientL(class Messages::TNodeId const &, class Messages::TClientType const &, void *) ?ConstructL@ACFMMNodeBase@ESock@@IAEXH@Z @ 1056 NONAME ; void ESock::ACFMMNodeBase::ConstructL(int) + ?GetVTablePtr@TSendErrorRecoveryReq@CGoneDownActivity@PRActivities@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 1057 NONAME ; class NetStateMachine::MStateTransition * PRActivities::CGoneDownActivity::TSendErrorRecoveryReq::GetVTablePtr(class TDesC8 &, void *) + ?GetVTablePtr@TCancelAndCloseZone0ClientExtIfaces@CoreNetStates@@SAPAVMStateTransition@NetStateMachine@@AAVTDesC8@@PAX@Z @ 1058 NONAME ; class NetStateMachine::MStateTransition * CoreNetStates::TCancelAndCloseZone0ClientExtIfaces::GetVTablePtr(class TDesC8 &, void *) + ?GetVTablePtr@TIgnoreOrPropagate@CGoneDownActivity@PRActivities@@SAPAVMStateFork@NetStateMachine@@AAVTDesC8@@PAX@Z @ 1059 NONAME ; class NetStateMachine::MStateFork * PRActivities::CGoneDownActivity::TIgnoreOrPropagate::GetVTablePtr(class TDesC8 &, void *) + ?DoL@TCancelStart@CoreNetStates@@UAEXXZ @ 1060 NONAME ; void CoreNetStates::TCancelStart::DoL(void) + ?New@CGoneDownActivity@PRActivities@@SAPAVCNodeActivityBase@MeshMachine@@ABUTNodeActivity@4@AAVAMMNodeBase@4@@Z @ 1061 NONAME ; class MeshMachine::CNodeActivityBase * PRActivities::CGoneDownActivity::New(struct MeshMachine::TNodeActivity const &, class MeshMachine::AMMNodeBase &) diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/commsdataobjects/src/connectionqueryset.cpp --- a/datacommsserver/esockserver/commsdataobjects/src/connectionqueryset.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/commsdataobjects/src/connectionqueryset.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -37,7 +37,7 @@ EXPORT_START_ATTRIBUTE_TABLE_AND_FN(XConnectionQuerySet, CCommsDataObjectFactory::iUid, XConnectionQuerySet::iUid) REGISTER_ATTRIBUTE(XConnectionQuerySet, iQueries, TMetaObject) -END_ATTRIBUTE_TABLE() +END_ATTRIBUTE_TABLE_BASE(XCommsDataObject, 0) EXPORT_C XConnectionQueryBase* XConnectionQuerySet::FindQuery(const XConnectionQueryBase& aQuery) const diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/commsdataobjects/src/provinfoqueryset.cpp --- a/datacommsserver/esockserver/commsdataobjects/src/provinfoqueryset.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/commsdataobjects/src/provinfoqueryset.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -26,7 +26,7 @@ EXPORT_START_ATTRIBUTE_TABLE_AND_FN(XProviderInfoQuerySet, CCommsDataObjectFactory::iUid, XProviderInfoQuerySet::iUid) REGISTER_ATTRIBUTE(XProviderInfoQuerySet, iConnProviderInfo, TMeta) -END_ATTRIBUTE_TABLE() +END_ATTRIBUTE_TABLE_BASE(XCommsDataObject, 0) EXPORT_C XProviderInfoQuerySet::~XProviderInfoQuerySet() diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/core_states/ss_corepractivities.cpp --- a/datacommsserver/esockserver/core_states/ss_corepractivities.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/core_states/ss_corepractivities.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -1704,9 +1704,9 @@ { __ASSERT_DEBUG(iPendingBinder, User::Panic(KSpecAssert_ESockCrStaCPRAC, 22)); - PostRequestTo( - address_cast(FirstOriginator().RecipientId()), - TCFServiceProvider::TCommsBinderResponse(iPendingBinder->RecipientId()).CRef()); + PostRequestTo( + SoleOriginator().Peer(), + TCFServiceProvider::TCommsBinderResponse(iPendingBinder->RecipientId()).CRef()); iPendingBinder->SetFlags(TCFClientType::EActivating); } @@ -2118,7 +2118,7 @@ // //-========================================================= -MeshMachine::CNodeActivityBase* CGoneDownActivity::New(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) +EXPORT_C MeshMachine::CNodeActivityBase* CGoneDownActivity::New(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) { TAny* space = BorrowPreallocatedSpace(aNode, sizeof(CGoneDownActivity)); CGoneDownActivity* self = new (space) CGoneDownActivity(aActivitySig, aNode); @@ -2180,7 +2180,7 @@ return NetStateMachine::ACore::IsIdle(); } -DEFINE_SMELEMENT(CGoneDownActivity::TSendErrorRecoveryReq, NetStateMachine::MStateTransition, CGoneDownActivity::TContext) +EXPORT_DEFINE_SMELEMENT(CGoneDownActivity::TSendErrorRecoveryReq, NetStateMachine::MStateTransition, CGoneDownActivity::TContext) void CGoneDownActivity::TSendErrorRecoveryReq::DoL() { __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KCorePrPanic, KPanicNoActivity)); @@ -2203,7 +2203,7 @@ activity.ClearPostedTo(); } -DEFINE_SMELEMENT(CGoneDownActivity::TIgnoreOrPropagate, NetStateMachine::MStateFork, CGoneDownActivity::TContext) +EXPORT_DEFINE_SMELEMENT(CGoneDownActivity::TIgnoreOrPropagate, NetStateMachine::MStateFork, CGoneDownActivity::TContext) TInt CGoneDownActivity::TIgnoreOrPropagate::TransitionTag() { __ASSERT_DEBUG(iContext.iMessage.IsMessage(), User::Panic(KSpecAssert_ESockCrStaCPRAC, 38)); diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/core_states/ss_corepractivities.h --- a/datacommsserver/esockserver/core_states/ss_corepractivities.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/core_states/ss_corepractivities.h Mon Sep 13 15:06:46 2010 +0100 @@ -891,7 +891,7 @@ class CGoneDownActivity : public MeshMachine::CNodeRetryActivity, protected MeshMachine::APreallocatedOriginators<2> { public: - static MeshMachine::CNodeActivityBase* New(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); + IMPORT_C static MeshMachine::CNodeActivityBase* New(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); protected: CGoneDownActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); @@ -913,11 +913,11 @@ typedef MeshMachine::TNodeContext TContext; public: - DECLARE_SMELEMENT_HEADER( TIgnoreOrPropagate, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext ) + EXPORT_DECLARE_SMELEMENT_HEADER( TIgnoreOrPropagate, MeshMachine::TStateFork, NetStateMachine::MStateFork, TContext ) virtual TInt TransitionTag(); DECLARE_SMELEMENT_FOOTER( TIgnoreOrPropagate ) - DECLARE_SMELEMENT_HEADER( TSendErrorRecoveryReq, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) + EXPORT_DECLARE_SMELEMENT_HEADER( TSendErrorRecoveryReq, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TSendErrorRecoveryReq ) }; diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/core_states/ss_coreprstates.cpp --- a/datacommsserver/esockserver/core_states/ss_coreprstates.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/core_states/ss_coreprstates.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -232,8 +232,8 @@ // which is handled by another activity __ASSERT_DEBUG(msg.iClientType.Type() != (TUint32)TCFClientType::EData, User::Panic(KSpecAssert_ESockCrStaCPRSC, 3)); -// iContext.Node().AddClientL(msg.iNodeId, TClientType(TCFClientType::ECtrl,msg.iValue)); - iContext.Node().AddClientL(msg.iNodeId, TClientType(TCFClientType::ECtrl)); + iContext.Node().AddClientL(msg.iNodeId, TClientType(TCFClientType::ECtrl,msg.iClientType.Flags())); + //Send confirmation RClientInterface::OpenPostMessageClose(iContext.NodeId(), iContext.iSender, TCFPeer::TJoinComplete().CRef()); } @@ -764,7 +764,7 @@ //TODO: TNodePeerId should become internal. When this happens, FirstOriginator should return // RNodeInterface. iContext.iNodeActivity->PostRequestTo( - address_cast(iContext.iNodeActivity->SoleOriginator().RecipientId()), + iContext.iNodeActivity->SoleOriginator().Peer(), TCFDataClient::TBindTo(binderResponse.iNodeId).CRef()); } @@ -2127,7 +2127,7 @@ iContext.iNodeActivity->SetError(static_cast(iContext.iMessage).iValue); } -DEFINE_SMELEMENT(TCancelAndCloseZone0ClientExtIfaces, NetStateMachine::MStateTransition, CoreNetStates::TContext) +EXPORT_DEFINE_SMELEMENT(TCancelAndCloseZone0ClientExtIfaces, NetStateMachine::MStateTransition, CoreNetStates::TContext) void TCancelAndCloseZone0ClientExtIfaces::DoL() { //0 means we will cancel and close all open extensions! @@ -2182,7 +2182,7 @@ } EXPORT_DEFINE_SMELEMENT(TCancelStart, NetStateMachine::MStateTransition, CoreNetStates::TContext) -void TCancelStart::DoL() +EXPORT_C void TCancelStart::DoL() { CNodeActivityBase* startActivity = iContext.Node().FindActivityById(ECFActivityStart); if (startActivity) diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/core_states/ss_coreprstates.h --- a/datacommsserver/esockserver/core_states/ss_coreprstates.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/core_states/ss_coreprstates.h Mon Sep 13 15:06:46 2010 +0100 @@ -11,7 +11,7 @@ // Contributors: // // Description: -// Core PR States +// Core PR State // // @@ -759,19 +759,19 @@ IMPORT_C virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TCancelDataClientStart ) -DECLARE_SMELEMENT_HEADER( TCancelAndCloseZone0ClientExtIfaces, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) +EXPORT_DECLARE_SMELEMENT_HEADER( TCancelAndCloseZone0ClientExtIfaces, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TCancelAndCloseZone0ClientExtIfaces ) EXPORT_DECLARE_SMELEMENT_HEADER( TProcessOrForwardRMessage2Ext, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) - virtual void DoL(); + IMPORT_C virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TProcessOrForwardRMessage2Ext ) /** * Check if ECFActivityStart is running, and if so cancel it */ EXPORT_DECLARE_SMELEMENT_HEADER( TCancelStart, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, TContext ) - virtual void DoL(); + IMPORT_C virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TCancelStart ) DECLARE_AGGREGATED_TRANSITION2( diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/eabi/esocksvrU.DEF --- a/datacommsserver/esockserver/eabi/esocksvrU.DEF Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/eabi/esocksvrU.DEF Mon Sep 13 15:06:46 2010 +0100 @@ -1962,4 +1962,15 @@ _ZN5ESock20CMMCommsProviderBase10AddClientLERKN8Messages7TNodeIdERKNS1_11TClientTypeEPv @ 1961 NONAME _ZThn36_N5ESock20CMMCommsProviderBase10AddClientLERKN8Messages7TNodeIdERKNS1_11TClientTypeEPv @ 1962 NONAME _ZN5ESock13ACFMMNodeBase10ConstructLEi @ 1963 NONAME + _ZN12PRActivities17CGoneDownActivity18TIgnoreOrPropagate12GetVTablePtrER6TDesC8Pv @ 1964 NONAME + _ZN12PRActivities17CGoneDownActivity21TSendErrorRecoveryReq12GetVTablePtrER6TDesC8Pv @ 1965 NONAME + _ZN12PRActivities17CGoneDownActivity3NewERKN11MeshMachine13TNodeActivityERNS1_11AMMNodeBaseE @ 1966 NONAME + _ZN13CoreNetStates12TCancelStart3DoLEv @ 1967 NONAME + _ZN13CoreNetStates35TCancelAndCloseZone0ClientExtIfaces12GetVTablePtrER6TDesC8Pv @ 1968 NONAME + _ZTIN12PRActivities17CGoneDownActivity18TIgnoreOrPropagateE @ 1969 NONAME + _ZTIN12PRActivities17CGoneDownActivity21TSendErrorRecoveryReqE @ 1970 NONAME + _ZTIN13CoreNetStates35TCancelAndCloseZone0ClientExtIfacesE @ 1971 NONAME + _ZTVN12PRActivities17CGoneDownActivity18TIgnoreOrPropagateE @ 1972 NONAME + _ZTVN12PRActivities17CGoneDownActivity21TSendErrorRecoveryReqE @ 1973 NONAME + _ZTVN13CoreNetStates35TCancelAndCloseZone0ClientExtIfacesE @ 1974 NONAME diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/inc/SS_conn.H --- a/datacommsserver/esockserver/inc/SS_conn.H Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/inc/SS_conn.H Mon Sep 13 15:06:46 2010 +0100 @@ -40,7 +40,6 @@ class TProcessIncomingConnection; class TProcessProgressRequest; class TParseECNAttach; - class TJoinReceivedCpr; class TProcessBinderResponseForCpr; class TCompleteLegacyAttach; class TProcessEnumResponse; @@ -144,7 +143,6 @@ friend class ConnStates::TProcessIncomingConnection; friend class ConnStates::TProcessProgressRequest; friend class ConnStates::TParseECNAttach; - friend class ConnStates::TJoinReceivedCpr; friend class ConnStates::TProcessBinderResponseForCpr; friend class ConnStates::TCompleteLegacyAttach; friend class ConnStates::TProcessEnumResponse; @@ -155,6 +153,7 @@ friend class EnumerateConnectionsActivity::TCompleteClient; friend class AllInterfaceNotificationActivity::TEnqueueNotification; friend class AllInterfaceNotificationActivity::TSendErrorToConnection; + friend class ConnActivities::CAllInterfaceNotificationActivity; friend class ConnSubConnEventsActivity::TProcessSubConnEvent; friend class ConnStates::TGenerateConnectionUpProgress; @@ -294,6 +293,7 @@ friend class AllInterfaceNotificationActivity::TStartLinkNotification; friend class AllInterfaceNotificationActivity::TEnqueueNotification; friend class AllInterfaceNotificationActivity::TSendErrorToConnection; +friend class ConnActivities::CAllInterfaceNotificationActivity; public: CAllInterfaceNotificationWorker(ESock::CConnection& aConnection); diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/inc/es_commsdataobject.h --- a/datacommsserver/esockserver/inc/es_commsdataobject.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/inc/es_commsdataobject.h Mon Sep 13 15:06:46 2010 +0100 @@ -112,7 +112,14 @@ EOperationSet = 0, /** Client requested that the object retreive data from a provider */ - EOperationGet = 1 + EOperationGet = 1, + + /** + Default value for uninitialized requests. + This is only used as a sanity checking measure where the implementation of a + CommsDataObject has failed to explicitly specify the client requested operation, i.e. get or set + */ + EOperationUninitialized = 0xFFFFFFFF }; @@ -160,7 +167,7 @@ @see MAccessPointConfigApi */ XCommsDataObject(TUint aFlags) - : iReqItfExtId((TUint)EAccessPointConfigApi), iFlags(aFlags) + : iOperationMode(EOperationUninitialized), iReqItfExtId((TUint)EAccessPointConfigApi), iFlags(aFlags) { __ASSERT_DEBUG((aFlags & ~EAllFlags) == 0, User::Panic(KSpecAssert_ESocks_cmsdtbjct, 1)); __ASSERT_DEBUG((aFlags & EOperationSupportMask) != 0, User::Panic(KSpecAssert_ESocks_cmsdtbjct, 2)); @@ -178,7 +185,7 @@ @param aReqItfExtId An interface identifier from TSupportedCommsApiExt. */ XCommsDataObject(TUint aFlags, TUint aReqItfExtId) - : iReqItfExtId(aReqItfExtId), iFlags(aFlags) + : iOperationMode(EOperationUninitialized), iReqItfExtId(aReqItfExtId), iFlags(aFlags) { __ASSERT_DEBUG((aFlags & ~EAllFlags) == 0, User::Panic(KSpecAssert_ESocks_cmsdtbjct, 3)); __ASSERT_DEBUG((aFlags & EOperationSupportMask) != 0, User::Panic(KSpecAssert_ESocks_cmsdtbjct, 4)); diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/inc/es_enum_internal.h --- a/datacommsserver/esockserver/inc/es_enum_internal.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/inc/es_enum_internal.h Mon Sep 13 15:06:46 2010 +0100 @@ -88,6 +88,15 @@ */ typedef TPckgBuf TConnGetSocketInfoArgBuf; +/** +This enum is used as an internal extension to TConnInterfaceState + +@internalComponent +*/ +enum TConnInterfaceStateInternal + { + EInterfaceRestarting = 0x100 + }; #include diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/inc/ss_connLegacy.h --- a/datacommsserver/esockserver/inc/ss_connLegacy.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/inc/ss_connLegacy.h Mon Sep 13 15:06:46 2010 +0100 @@ -49,6 +49,11 @@ class TSendErrorToConnection; } +namespace ConnActivities +{ +class CAllInterfaceNotificationActivity; +} + namespace EnumerateConnectionsActivity { class TQueryTierStatus; @@ -84,9 +89,12 @@ friend class EnumerateConnectionsActivity::TCompleteClient; friend class AllInterfaceNotificationActivity::TEnqueueNotification; friend class AllInterfaceNotificationActivity::TSendErrorToConnection; + friend class ConnActivities::CAllInterfaceNotificationActivity; friend class ConnStates::TNoTagOrCancelAllInterfaceWorker; friend class ConnStates::TCancelAllInterfaceNotificationWorker; +public: + enum { KIPProtoConnectionProviderFactoryUid = 0x10281DD3 }; public: //So that friends of CConnection (transitions) can access it void CompleteAttachL(TSelectionPrefs& aPrefs); void CancelServiceChangeNotification(const Den::RSafeMessage& aMessage); @@ -155,7 +163,6 @@ ADataMonitoringProvider* FetchSubConnDataMonitoringProvider() const; //global notifications - void InterfaceStateChangeNotification(TDesC8& aInfo); void RequestServiceChangeNotificationL(const Den::RSafeMessage& aMessage); void ControlL(TUint aOptionName, TUint aMessageId); @@ -212,9 +219,6 @@ RMessage2 iAllInterfaceNotificationMessage; TInterfaceChangeQueue iNotificationQueue; Messages::TNodeId iAllInterfaceNotificationWorker; - -protected: - static const TAnyFn iInterfaceVTableF[]; }; diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/inc/ss_connstates.h --- a/datacommsserver/esockserver/inc/ss_connstates.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/inc/ss_connstates.h Mon Sep 13 15:06:46 2010 +0100 @@ -84,10 +84,6 @@ virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TSelectMetaPlane ) -DECLARE_SMELEMENT_HEADER( TJoinReceivedCpr, SubSessStates::TECABStateTransitionBase, NetStateMachine::MStateTransition, TContext ) - virtual void DoL(); -DECLARE_SMELEMENT_FOOTER( TJoinReceivedCpr ) - DECLARE_SMELEMENT_HEADER( TSendFinishedSelectionStateChange, SubSessStates::TECABStateTransitionBase, NetStateMachine::MStateTransition, TContext ) virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TSendFinishedSelectionStateChange ) @@ -118,12 +114,6 @@ virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TStartConnection ) -DECLARE_AGGREGATED_TRANSITION2( - TSendFinishedSelectionAndJoinReceivedCpr, - ConnStates::TSendFinishedSelectionStateChange, - ConnStates::TJoinReceivedCpr - ) - DECLARE_SMELEMENT_HEADER( TErrorOrCancel, MeshMachine::TStateFork, NetStateMachine::MStateFork, ConnStates::TContext ) virtual TInt TransitionTag(); DECLARE_SMELEMENT_FOOTER( TErrorOrCancel ) @@ -525,6 +515,8 @@ public: static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); + void InterfaceStateChangeNotification(const TDesC8& aInfo); + ESock::CCommsFactoryBase* IpProtoCprFactory() const; private: CAllInterfaceNotificationActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) : @@ -535,11 +527,16 @@ } virtual ~CAllInterfaceNotificationActivity(); + const Factories::TAnyFn& GetVTable() { return iInterfaceVTableF[0]; }; private: TUid iTierUid; Messages::TNodeId iTierManager; const CAllInterfaceNotificationWorker* iAllInterfaceNotificationWorker; + TBool iRegisteredForInterfaceStateChanges:1; // Registered with IpProtoCpr factory + +private: + static const ESock::TAnyFn iInterfaceVTableF[]; }; /** diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/inc/ss_sapshim.h --- a/datacommsserver/esockserver/inc/ss_sapshim.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/inc/ss_sapshim.h Mon Sep 13 15:06:46 2010 +0100 @@ -230,6 +230,8 @@ SAP_FLAG_FUNCTIONS(DeleteUponBearerReception, EDeleteUponBearerReception) SAP_FLAG_FUNCTIONS(UseBearerErrors, EUseBearerErrors) + void HostResolverSpecificUnbind(); + private: CServProviderBase* iProvider; //CHostResolver specific workaround for now diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/ssock/ss_connLegacy.cpp --- a/datacommsserver/esockserver/ssock/ss_connLegacy.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/ssock/ss_connLegacy.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -62,12 +62,6 @@ //const TInt KNumberOfEmulatedSubConnections = 2; -const Factories::TAnyFn AConnectionLegacy::iInterfaceVTableF[] = - { - (Factories::TAnyFn)1, - (Factories::TAnyFn)(TFactoryNotify::Notification) - }; - AConnectionLegacy::~AConnectionLegacy() { TSubConnectionEvent* subConnectionEvent; @@ -130,7 +124,7 @@ } -static const TUid K_CIPProtoConnectionProviderFactory_iUid = {0x10281DD3}; +//static const TUid K_CIPProtoConnectionProviderFactory_iUid = {0x10281DD3}; void AConnectionLegacy::CompleteAttachL(ESock::TSelectionPrefs& aPrefs) { @@ -146,7 +140,7 @@ __ASSERT_DEBUG(cpr->GetFirstClient(TClientType(TCFClientType::EServProvider))==NULL, User::Panic(KSpecAssert_ESockSSockscnLgc, 3)); //This is why we are "legacy" CConnectionFactoryContainer& container = *static_cast(iConnection.Player()).SockManGlobals()->iConnectionFactories; - CCommsFactoryBase* factory = static_cast(container.FindFactory(K_CIPProtoConnectionProviderFactory_iUid)); + CCommsFactoryBase* factory = static_cast(container.FindFactory(TUid::Uid(KIPProtoConnectionProviderFactoryUid))); User::LeaveIfError(factory? KErrNone : KErrArgument); XConnectionFactoryAPQuery query(static_cast(cp).IapId()); @@ -900,40 +894,6 @@ iConnection.DontCompleteCurrentRequest(); } - - -void AConnectionLegacy::InterfaceStateChangeNotification(TDesC8& /*aInfo*/) - { - //[399TODO] implement InterfaceStateChangeNotification - LOG(ESockLog::Printf(KESockConnectionTag, _L8("TODO: implement InterfaceStateChangeNotification - KErrNotSupported"))); -#if TODO_IMPLEMENT_THIS - TInterfaceNotification& interfaceNotification = ((TInterfaceNotificationBuf&)aInfo)(); - - if(iAllInterfaceNotificationMessage.IsNull()) - { - iInterfaceChangeQueue.Enque(interfaceNotification); - return; - } - else // request is outstanding - { - if(!iInterfaceChangeQueue.IsEmpty()) - { - // can this situation ever happen? - // - new requests fullfilled from queue before becoming outstanding - // - no queued items when request outstanding - - // But in case we do... - // should we get oldest change first in case this new one overwrites it - iInterfaceChangeQueue.Enque(interfaceNotification); - iInterfaceChangeQueue.Deque(interfaceNotification); - } - - TInt ret = iAllInterfaceNotificationMessage.Write(0, aInfo); - CompleteMessage(iAllInterfaceNotificationMessage, ret); - } -#endif - } - void AConnectionLegacy::SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent) { // Pass the message onto the client if possible, or buffer if necessary diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/ssock/ss_connstates.cpp --- a/datacommsserver/esockserver/ssock/ss_connstates.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/ssock/ss_connstates.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -56,7 +56,7 @@ #include #include #endif - +#include #ifdef _DEBUG // Panic category for "absolutely impossible!" vanilla ASSERT()-type panics from this module // (if it could happen through user error then you should give it an explicit, documented, category + code) @@ -252,35 +252,6 @@ TCFMessage::TStateChange(TStateChange(KFinishedSelection,KErrNone)).CRef()); } -DEFINE_SMELEMENT(ConnStates::TJoinReceivedCpr, NetStateMachine::MStateTransition, ConnStates::TContext) -void ConnStates::TJoinReceivedCpr::DoL() - { - __ASSERT_DEBUG(iContext.iNodeActivity, ConnPanic(KPanicNoActivity)); - __ASSERT_DEBUG(iContext.Node().ServiceProvider()==NULL, ConnPanic(KPanicExpectedNoServiceProvider)); - - TCFDataClient::TBindTo& bt = message_cast(iContext.iMessage); - RNodeInterface* newSP = iContext.Node().AddClientL(bt.iNodeId, TClientType(TCFClientType::EServProvider, TCFClientType::EActive)); - __ASSERT_DEBUG(iContext.Node().ServiceProvider()==newSP, ConnPanic(KPanicNoServiceProvider)); //[RZ] revise this, possibly overdefensive - - //If this is attach, we need to see if we are a monitor or not - TClientType clientType(TCFClientType::ECtrl); - - TUint selPrefs = static_cast(*iContext.iNodeActivity).SelectionPrefs().Flags(); - if (selPrefs & TSelectionPrefs::EMonitor) - { - clientType.SetFlags(TCFClientType::EMonitor); - iContext.Node().iIsMonitor = ETrue; - } - - // If it is an attach set the flag cause it is used by NetUPS to check if a JoinRequest comes from an RConnection::Attach - if (selPrefs & TSelectionPrefs::EAttach) - { - clientType.SetFlags(TCFClientType::EAttach); - } - iContext.iNodeActivity->PostRequestTo(*newSP, - TCFServiceProvider::TJoinRequest(iContext.NodeId(), clientType).CRef()); - } - DEFINE_SMELEMENT(ConnStates::TJoinReceivedSCpr, NetStateMachine::MStateTransition, ConnStates::TContext) void ConnStates::TJoinReceivedSCpr::DoL() { @@ -470,9 +441,11 @@ __ASSERT_DEBUG(iContext.iNodeActivity, ConnPanic(KPanicNoActivity)); CSubConnection* waitingSubConn = iContext.Node().Session()->CSubConnectionFromHandle(static_cast(*iContext.iNodeActivity).Int0()); User::LeaveIfError(waitingSubConn != NULL ? KErrNone : KErrCancel); - + RNodeInterface* waitingSubConnPeer = iContext.Node().FindClient(waitingSubConn->Id()); //To my surprise SC is a peer of this (so must use peer handle when talking to it) + __ASSERT_DEBUG(waitingSubConnPeer, ConnPanic(KPanicNoDataClient)); + TCFServiceProvider::TCommsBinderResponse& binderResp = message_cast(iContext.iMessage); - iContext.iNodeActivity->PostRequestTo(waitingSubConn->Id(), + iContext.iNodeActivity->PostRequestTo(*waitingSubConnPeer, TCFDataClient::TBindTo(binderResp.iNodeId).CRef()); } @@ -1301,9 +1274,61 @@ { iNode.RemoveClient(aux->RecipientId()); } + + if (iRegisteredForInterfaceStateChanges) + { + CCommsFactoryBase* ipProtoCprFactory = IpProtoCprFactory(); + if (ipProtoCprFactory) + { + Factories::IFactoryNotify itf(this, GetVTable()); + ipProtoCprFactory->DeRegisterNotifier(itf); + } + } + delete iAllInterfaceNotificationWorker; //delete this node (why via iAllInterfaceNotificationWorker??) } +/** +Called by the IpProtoCpr factory to propagate an interface state change from IpProtoCpr to registered +observers (suc as ourself). If the interface is restarting, then we need to insert an EInterfaceDown, +EInterfaceUp "toggle" sequence into the AllInterfaceNotification queue. This is because, ordinarily, +EInterfaceUp and EInterfaceDown are generated when the IpProtoCpr itself is created and destroyed, +but not if it is restarted before being destroyed. +*/ +void CAllInterfaceNotificationActivity::InterfaceStateChangeNotification(const TDesC8& aInfo) + { + if (aInfo.Length() == sizeof(TInterfaceNotification)) + { + const TInterfaceNotification* const info = reinterpret_cast(aInfo.Ptr()); + if (info && info->iState == EInterfaceRestarting) + { + LOG( ESockLog::Printf(KESockConnectionTag, _L("CAllInterfaceNotificationActivity %08x:\tInterfaceStateChangeNotification(): CConnection %08x, IapId %d, NetId %d"), + this, &iAllInterfaceNotificationWorker->iConnection, info->iConnectionInfo.iIapId, info->iConnectionInfo.iNetId )); + + AConnectionLegacy& legacy = iAllInterfaceNotificationWorker->iConnection.iLegacyConnection; + TInterfaceNotification notification(*info); + notification.iState = EInterfaceDown; + legacy.iNotificationQueue.Enque(notification); + notification.iState = EInterfaceUp; + legacy.iNotificationQueue.Enque(notification); + legacy.CompleteAllInterfaceNotificationL(KErrNone); + } + } + } + +CCommsFactoryBase* CAllInterfaceNotificationActivity::IpProtoCprFactory() const + { + CConnectionFactoryContainer& container = *static_cast(iAllInterfaceNotificationWorker->iConnection.Player()).SockManGlobals()->iConnectionFactories; + return static_cast(container.FindFactory(TUid::Uid(AConnectionLegacy::KIPProtoConnectionProviderFactoryUid))); + } + +// Registration table for receiving InterfaceStateChangeNotification() events. +const Factories::TAnyFn CAllInterfaceNotificationActivity::iInterfaceVTableF[] = + { + (Factories::TAnyFn)1, // number of methods. the following entries must be in this order! + (Factories::TAnyFn)(Factories::TFactoryNotify::Notification) + }; + // States DEFINE_SMELEMENT(AllInterfaceNotificationActivity::TAwaitingStart, NetStateMachine::MState, TContext) @@ -1459,6 +1484,23 @@ TCFTierStatusProvider::TTierNotification& msg = message_cast(iContext.iMessage); __ASSERT_DEBUG(msg.iBundle, User::Panic(KSpecAssert_ESockSSockscnsts, 14)); + + CAllInterfaceNotificationActivity& act = *iContext.Activity(); + + // Register with the IpProtoCpr factory for interface state changes if we haven't already done so. + // We can only do this if the IpProtoCpr is active, and the assumption here is that it must be active + // if an interface event has been generated. + if (!act.iRegisteredForInterfaceStateChanges) + { + CCommsFactoryBase* ipProtoCprFactory = act.IpProtoCprFactory(); + if (ipProtoCprFactory) + { + Factories::IFactoryNotify itf(&act, act.GetVTable()); + ipProtoCprFactory->RegisterNotifierL(itf); + act.iRegisteredForInterfaceStateChanges = ETrue; + } + } + if(msg.iBundle->PtrL()->CountParamSetContainers() > 0) { TInt i = 0; diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/ssock/ss_flowrequeststates.cpp --- a/datacommsserver/esockserver/ssock/ss_flowrequeststates.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/ssock/ss_flowrequeststates.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -96,8 +96,8 @@ TCFServiceProvider::TCommsBinderResponse& br = message_cast(iContext.iMessage); - iContext.Node().AddClientL(br.iNodeId, TClientType(TCFClientType::EServProvider, TCFClientType::EDefault)); - iContext.iNodeActivity->PostRequestTo(br.iNodeId, TCFServiceProvider::TJoinRequest(iContext.NodeId(), + RNodeInterface* brPeer = iContext.Node().AddClientL(br.iNodeId, TClientType(TCFClientType::EServProvider, TCFClientType::EDefault)); + iContext.iNodeActivity->PostRequestTo(*brPeer, TCFServiceProvider::TJoinRequest(iContext.NodeId(), TClientType(TCFClientType::ECtrl)).CRef()); } diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/ssock/ss_rmetaextensioncontainer.cpp --- a/datacommsserver/esockserver/ssock/ss_rmetaextensioncontainer.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/ssock/ss_rmetaextensioncontainer.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -67,15 +67,24 @@ EXPORT_C const Meta::SMetaData* RMetaExtensionContainerC::FindExtension(const Meta::STypeId& aTypeId) const { - __ASSERT_ALWAYS(iContainerImpl, PanicMec(ENoImplementation)); - return iContainerImpl->FindExtension(aTypeId); + if (Container()) + { + return Container()->FindExtension(aTypeId); + } + else + { + return NULL; + } } EXPORT_C const Meta::SMetaData& RMetaExtensionContainerC::FindExtensionL(const Meta::STypeId& aTypeId) const { - __ASSERT_ALWAYS(iContainerImpl, PanicMec(ENoImplementation)); - return iContainerImpl->FindExtensionL(aTypeId); + if (!Container()) + { + User::Leave(KErrNotFound); + } + return Container()->FindExtensionL(aTypeId); } diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/ssock/ss_sapshim.cpp --- a/datacommsserver/esockserver/ssock/ss_sapshim.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/ssock/ss_sapshim.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -268,6 +268,28 @@ return this; } +void CTransportFlowShim::HostResolverSpecificUnbind() + { + // Can't have both HR & SAP + __ASSERT_DEBUG(!iProvider, User::Panic(KSpecAssert_ESockSSocksspshm, 9)); + + if(iSubConnectionProvider.IsOpen()) + { + iSessionControlNotify = NULL; + iSessionDataNotify = NULL; + iHostResolverNotify = NULL; + if (!Idle()) + { + SetIdle(); + ProcessDCIdleState(); + } + } + else + { + DeleteThisFlow(); + } + } + void CTransportFlowShim::Unbind() { LOG( ESockLog::Printf(_L8("CTransportFlowShim %08x:\tUnbind()"), this) ); @@ -279,41 +301,30 @@ return; } - // Legacy support for host resolvers + // Legacy support for host resolvers involves a separate north bound MUpperControl interface if(iHostResolverNotify) { - __ASSERT_DEBUG(!iProvider, User::Panic(KSpecAssert_ESockSSocksspshm, 9)); // can't have both HR & SAP - - LOG( ESockLog::Printf(_L8("CTransportFlowShim %08x:\tUnbind(): iBearerExpected %d"), this, BearerExpected()) ); - if (!BearerExpected()) + HostResolverSpecificUnbind(); + } + else + { + if (iProvider) { - delete this; - } - else - { - SetDeleteUponBearerReception(); - iHostResolverNotify = NULL; + iProvider->SetNotify(NULL); + + if (!Detaching()) + { + delete iProvider; + iProvider = NULL; + } } - return; - } - - if (iProvider) - { - iProvider->SetNotify(NULL); - - if (!Detaching()) - { - delete iProvider; - iProvider = NULL; - } - } #ifdef SYMBIAN_NETWORKING_UPS - // Hook for derived classes to do cleanup before unbind occurs - PreUnbind(); + // Hook for derived classes to do cleanup before unbind occurs + PreUnbind(); #endif - - CNetworkFlow::Unbind(); + CNetworkFlow::Unbind(); + } } ESock::CSubConnectionFlowBase& CTransportFlowShim::CloneFlowL() diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/configs/te_dummyprovider_011.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/configs/te_dummyprovider_011.ini Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,29 @@ +[CreateSockSvr1] +SocketServName=SockSvr1 + +[CreateConn1] +ConnName=Conn1 + +[ConnectSockSvr1] +SocketServName=SockSvr1 + +[OpenConn1] +ConnName=Conn1 +SocketServName=SockSvr1 +ConnType=271069227 + +[StartConn1] +ConnName=Conn1 +SocketServName=SockSvr1 +SNAP=10 +ConnType=271069227 + +[StopConn1] +ConnName=Conn1 +ConnStopType=EStopNormal + +[CloseConn1] +ConnName=Conn1 + +[CloseSockSvr1] +SocketServName=SockSvr1 \ No newline at end of file diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/group/TE_DummyProvider.iby --- a/datacommsserver/esockserver/test/TE_DummyProvider/group/TE_DummyProvider.iby Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/group/TE_DummyProvider.iby Mon Sep 13 15:06:46 2010 +0100 @@ -28,8 +28,9 @@ data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_005.script TestData\scripts\te_dummyprovider_005.script data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_006.script TestData\scripts\te_dummyprovider_006.script data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_008.script TestData\scripts\te_dummyprovider_008.script -data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_008.script TestData\scripts\te_dummyprovider_009.script -data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_008.script TestData\scripts\te_dummyprovider_010.script +data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_009.script TestData\scripts\te_dummyprovider_009.script +data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_010.script TestData\scripts\te_dummyprovider_010.script +data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_011.script TestData\scripts\te_dummyprovider_011.script data=EPOCROOT##epoc32\data\z\TestData\scripts\te_dummyprovider_incomingSCPR.script TestData\scripts\te_dummyprovider_incomingSCPR.script data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyproviders.cfg TestData\configs\te_dummyproviders.cfg @@ -40,7 +41,11 @@ data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_005.ini TestData\configs\te_dummyprovider_005.ini data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_006.ini TestData\configs\te_dummyprovider_006.ini data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_008.ini TestData\configs\te_dummyprovider_008.ini -data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_008.ini TestData\configs\te_dummyprovider_009.ini -data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_008.ini TestData\configs\te_dummyprovider_010.ini +data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_009.ini TestData\configs\te_dummyprovider_009.ini +data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_010.ini TestData\configs\te_dummyprovider_010.ini +data=EPOCROOT##epoc32\data\z\TestData\configs\te_dummyprovider_011.ini TestData\configs\te_dummyprovider_011.ini +data=EPOCROOT##epoc32\data\z\TestData\configs\TE_DummyProvider_ip.tcpip.esk TestData\configs\TE_DummyProvider_ip.tcpip.esk + + #endif // __TE_DummyProviders_IBY__ diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/group/bld.inf --- a/datacommsserver/esockserver/test/TE_DummyProvider/group/bld.inf Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/group/bld.inf Mon Sep 13 15:06:46 2010 +0100 @@ -31,6 +31,7 @@ ../scripts/te_dummyprovider_008.script z:/testdata/scripts/te_dummyprovider_008.script ../scripts/te_dummyprovider_009.script z:/testdata/scripts/te_dummyprovider_009.script ../scripts/te_dummyprovider_010.script z:/testdata/scripts/te_dummyprovider_010.script +../scripts/te_dummyprovider_011.script z:/testdata/scripts/te_dummyprovider_011.script ../scripts/te_dummyprovider_incomingSCPR.script z:/testdata/scripts/te_dummyprovider_incomingscpr.script @@ -44,4 +45,5 @@ ../configs/te_dummyprovider_008.ini z:/testdata/configs/te_dummyprovider_008.ini ../configs/te_dummyprovider_009.ini z:/testdata/configs/te_dummyprovider_009.ini ../configs/te_dummyprovider_010.ini z:/testdata/configs/te_dummyprovider_010.ini +../configs/te_dummyprovider_011.ini z:/testdata/configs/te_dummyprovider_011.ini ../configs/TE_DummyProvider_ip.tcpip.esk z:/testdata/configs/TE_DummyProvider_ip.tcpip.esk diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider.script --- a/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider.script Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider.script Mon Sep 13 15:06:46 2010 +0100 @@ -35,6 +35,7 @@ RUN_SCRIPT z:\testdata\scripts\te_dummyprovider_008.script RUN_SCRIPT z:\testdata\scripts\te_dummyprovider_009.script RUN_SCRIPT z:\testdata\scripts\te_dummyprovider_010.script +RUN_SCRIPT z:\testdata\scripts\te_dummyprovider_011.script RUN_SCRIPT z:\testdata\scripts\te_esock_test_unloadesockForced.script diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_004.script --- a/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_004.script Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_004.script Mon Sep 13 15:06:46 2010 +0100 @@ -26,7 +26,16 @@ RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script START_TESTCASE COMINF-ESOCK-DummyProviders-004 -//! @SYMTestCaseID COMINF-ESOCK-DummyProviders-004 +//! @SYMTestCaseID COMINF-ESOCK-DummyProviders-004 +//! @SYMTestCaseDesc Tests the TCFServiceProvider::TStart/TStop semantics on the managemnet plane. +//! @SYMTestActions Gets the MCPR to stop the control and data planes, whilst keeping itself alive. +// Gets the MCPR to restart the control and data planes, +// Uses RConnectionServ to monitor that connections are being stopped and started. +// Gets the MCPR to stop the control and data planes and let itself be removed. +//! @SYMTestExpectedResults Access points report started/stopped via RConnectionServ. No crashes. +//! @SYMTestPriority Critical +//! @SYMTestType CT +//! @SYMComponent comms-infras_esock RUN_TEST_STEP 100 te_esockteststepsSuite CreateRConnectionServStep z:\testdata\configs\te_dummyprovider_004.ini CreateConnectionServ1 RUN_TEST_STEP 100 te_esockteststepsSuite ConnectRConnectionServStep z:\testdata\configs\te_dummyprovider_004.ini ConnectConnectionServ1 @@ -67,4 +76,4 @@ RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script -PRINT Completed CASE003 +PRINT Completed CASE004 diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_009.script --- a/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_009.script Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_009.script Mon Sep 13 15:06:46 2010 +0100 @@ -29,6 +29,8 @@ //! @SYMComponent comms-infras_esock RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script +RUN_UTILS MkDir c:\private\101f7989\ +RUN_UTILS MkDir c:\private\101f7989\ESock\ RUN_UTILS CopyFile c:\private\101f7989\ESock\ip.tcpip.esk c:\private\101f7989\ESock\ip.tcpip.esk.te_RSubConnectionCase70.archive RUN_UTILS DeleteFile c:\private\101f7989\ESock\ip.tcpip.esk RUN_UTILS CopyFile z:\testdata\configs\TE_DummyProvider_ip.tcpip.esk c:\private\101f7989\ESock\ip.tcpip.esk diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_011.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datacommsserver/esockserver/test/TE_DummyProvider/scripts/te_dummyprovider_011.script Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,48 @@ +// +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +PRINT Running CASE011 +PRINT Two dummy layers able to start successfully +PRINT Execute the crazy start/wait/close loop increasing wait with every iteration. +PRINT See how the stack manages cancelations at distinct stages. + + +// +LOAD_SUITE te_esockteststepsSuite -SharedData +RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script + +START_TESTCASE COMINF-ESOCK-DummyProviders-011 +//! @SYMTestCaseID COMINF-ESOCK-DummyProviders-011 +//! @SYMTestCaseDesc Tests the resiliance of the RConnection::Start to cancelations (induced by RConnection::Stop). +//! @SYMTestActions Execute the crazy start/wait/close loop increasing wait with every iteration. +//! @SYMTestExpectedResults No crashes, all operations complete (typically with KErrCancel, but that's not cared for) +//! @SYMTestPriority Critical +//! @SYMTestType CT +//! @SYMComponent comms-infras_esock + +RUN_TEST_STEP 100 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\te_dummyprovider_011.ini CreateSockSvr1 +RUN_TEST_STEP 100 te_esockteststepsSuite createrconnectionStep z:\testdata\configs\te_dummyprovider_011.ini CreateConn1 +RUN_TEST_STEP 100 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\te_dummyprovider_011.ini ConnectSockSvr1 +RUN_TEST_STEP 100 te_esockteststepsSuite openrconnectionStep z:\testdata\configs\te_dummyprovider_011.ini OpenConn1 +RUN_TEST_STEP 100 te_esockteststepsSuite StartCloseCrazyLoopRConnectionStep z:\testdata\configs\te_dummyprovider_011.ini StartConn1 +RUN_TEST_STEP 100 te_esockteststepsSuite closerconnectionStep z:\testdata\configs\te_dummyprovider_011.ini CloseConn1 +RUN_TEST_STEP 100 te_esockteststepsSuite closersocketservStep z:\testdata\configs\te_dummyprovider_011.ini CloseSockSvr1 +RUN_TEST_STEP 100 te_esockteststepsSuite cleanallStep +END_TESTCASE COMINF-ESOCK-DummyProviders-011 + +RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script + +PRINT Completed CASE011 diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_EsockTestSteps/inc/Connections.TestSteps.h --- a/datacommsserver/esockserver/test/TE_EsockTestSteps/inc/Connections.TestSteps.h Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_EsockTestSteps/inc/Connections.TestSteps.h Mon Sep 13 15:06:46 2010 +0100 @@ -190,21 +190,73 @@ Note that since the test is normally executed by a thread of lower priority than ESock_IP, it relies on ESock_IP yielding (otherwise it won't test different phases. For instance DummyMCPR will artificially yield on TCFServiceProvider::TJoinRequest. -NetMCPR will not normally yield as is. +NetMCPR will not normally yield as is. DummyFlowFactory will yield on serving a TFindOrCreateRequest. @internalComponent */ class CStartStopCrazyLoopRConnectionStep : public CStartRConnectionStep { public: + enum { + /* + * The test executes a loop of starting and then stopping a connection at discrete, growing intervals. + * It is crucial that enough iterations are executed, as otherwise the test isn't doing its job. + * The test will fail if this is detected. As iteration gaps are time-based the test first calibrates + * itself by running CStartStopCrazyLoopRConnectionStep::CalibrateStart to determine how + * much time does the start take in order to chop this span further into ELoops intevals. + * Calibration isn't uterrly precise and it can be that a connection startup executed within + * the loop completes quicker than during calibration. It has been in fact observed + * in the overnight builds (about 7.5%). A number of things can be done to accomdate for that. + * The approach chosen is to: + * (1) Plan for EPlannedLoops (chop down the CStartStopCrazyLoopRConnectionStep::CalibrateStart + * into EPlannedLoops + * (2) Insist on excuting at least EMandatoryLoops (the test will fail if less iterations are executed) + * (3) Keep on iterating beyond EPlannedLoops until the snooze slides of the connection + * startup time (the calbrated connection startup time equally might have been unrepresentativelly short) + */ + EPlannedLoops = 15, + EMandatoryLoops = 14, + }; + CStartStopCrazyLoopRConnectionStep(CCEsockTestBase*& aEsockTest); + virtual ~CStartStopCrazyLoopRConnectionStep(); + TVerdict doSingleTestStep(); TInt CalibrateStart(); + virtual TInt doLoopStep(TInt aTimerVal); + +protected: + RTimer iTimer; + TRequestStatus* ipConnectionStartStatus; }; _LIT(KStartStopCrazyLoopRConnectionStep,"StartStopCrazyLoopRConnectionStep"); /** +Class implementing StartCloseCrazyLoopRConnectionStep +The test does a loop, where every iteration: +(1) Starts the connection +(2) Snoozes for an +(3) Closes the connection injecting a cancel at that stage of the connection start +(4) Increases the a bit so that next time round the cancel is injected at a different stage. + +Note that since the test is normally executed by a thread of lower priority than ESock_IP, it relies on +ESock_IP yielding (otherwise it won't test different phases. +For instance DummyMCPR will artificially yield on TCFServiceProvider::TJoinRequest. +NetMCPR will not normally yield as is. DummyFlowFactory will yield on serving a TFindOrCreateRequest. + +@internalComponent +*/ +class CStartCloseCrazyLoopRConnectionStep : public CStartStopCrazyLoopRConnectionStep + { +public: + CStartCloseCrazyLoopRConnectionStep(CCEsockTestBase*& aEsockTest); + virtual TInt doLoopStep(TInt aTimerVal); + }; + +_LIT(KStartCloseCrazyLoopRConnectionStep,"StartCloseCrazyLoopRConnectionStep"); + +/** Class implementing openrconnectionStep @internalComponent diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_EsockTestSteps/src/Connections.TestSteps.cpp --- a/datacommsserver/esockserver/test/TE_EsockTestSteps/src/Connections.TestSteps.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_EsockTestSteps/src/Connections.TestSteps.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -286,6 +286,12 @@ return KErrCorrupt; } + if (iEsockTest->OpenConnection(iParams) != KErrNone) + { + INFO_PRINTF1(_L("Can't reopen connection, most likely you didn't supply the session name")); + return KErrCorrupt; + } + timeBegin.HomeTime(); TInt error = iEsockTest->StartConnection(iParams); if (error != KErrNone) @@ -299,42 +305,41 @@ } timeEnd.HomeTime(); iEsockTest->StopConnection(iParams); + iEsockTest->CloseConnection(iParams.iConnectionName); + return timeEnd.MicroSecondsFrom(timeBegin).Int64(); } +CStartStopCrazyLoopRConnectionStep::~CStartStopCrazyLoopRConnectionStep() + { + iTimer.Close(); + } TVerdict CStartStopCrazyLoopRConnectionStep::doSingleTestStep() { // Default to failing SetTestStepResult(EFail); iParams.iAsynch = ETrue; //force async. - RTimer timer; - TInt error = timer.CreateLocal(); + TInt error = iTimer.CreateLocal(); if (error!=KErrNone) { INFO_PRINTF2(_L("Creating RTimer object failed with %d"), error); return TestStepResult(); } - TRequestStatus timerRequestStatus; - TRequestStatus* pConnectionStartStatus = new TRequestStatus; - if (pConnectionStartStatus == NULL) + ipConnectionStartStatus = new TRequestStatus; + if (ipConnectionStartStatus == NULL) { INFO_PRINTF1(_L("Heap allocation for TRequestStatus failed")); - timer.Close(); return TestStepResult(); } - error = iEsockTest->iRequestStatuses.Add(pConnectionStartStatus, iParams.iConnectionName); + error = iEsockTest->iRequestStatuses.Add(ipConnectionStartStatus, iParams.iConnectionName); //And will be owned here if (error!=KErrNone) { INFO_PRINTF2(_L("Failed "), error); - timer.Close(); - delete pConnectionStartStatus; return TestStepResult(); } - TRequestStatus& connectionStartStatus = *pConnectionStartStatus; - const TInt KLoops = 10; INFO_PRINTF1(_L("Calibrating timer by running full start")); //Well, we're running the full start twice as the first run is likely to take more than the representative time. TInt timerIncrement = Min(CalibrateStart(), CalibrateStart()); @@ -343,64 +348,119 @@ INFO_PRINTF2(_L("Full start failed, unable to calibrate, test failed with %d"), timerIncrement); return TestStepResult(); } - INFO_PRINTF3(_L("Start took %dus, will divide by %d and use as the increment"), timerIncrement, KLoops); - + INFO_PRINTF3(_L("Start took %dus, will divide by %d and use as the increment"), timerIncrement, EPlannedLoops); - TInt timerVal = 1; - timerIncrement /= KLoops; + timerIncrement /= EPlannedLoops; + - INFO_PRINTF1(_L("Beginning crazy start/stop loop")); - - for (TInt i = 1; i < KLoops+1; i++) + /*======================================================= + * The loop + */ + TInt timerVal = 1; + TInt i = 0; + INFO_PRINTF1(_L("Beginning crazy loop")); + while (ETrue) { + if (++i > (2 * EPlannedLoops)) + { + INFO_PRINTF1(_L("The test has been executing far too many iterations than can be reasonably expected, aborting..")); + return TestStepResult(); + } INFO_PRINTF2(_L("[Loop %d], Starting a new loop=============================="), i); - INFO_PRINTF2(_L("[Loop %d], Closing connection"), i); - iEsockTest->CloseConnection(iParams.iConnectionName); - INFO_PRINTF2(_L("[Loop %d], Re-openning connection"), i); + INFO_PRINTF2(_L("***********Re-openning connection"), i); if (iEsockTest->OpenConnection(iParams) != KErrNone) { INFO_PRINTF1(_L("Can't reopen connection, most likely you didn't supply the session name")); - timer.Close(); - return TestStepResult(); - } - INFO_PRINTF2(_L("[Loop %d], Starting connection (asynch)"), i); - error = iEsockTest->StartConnection(iParams); - if (error != KErrNone) - { - INFO_PRINTF1(_L("Starting connection failed, aborting")); - timer.Close(); - return TestStepResult(); - } - INFO_PRINTF3(_L("[Loop %d], Setting timer to %dus .zzz...."), i, timerVal); - timer.After(timerRequestStatus,timerVal); - User::WaitForRequest(timerRequestStatus,connectionStartStatus); - if (timerRequestStatus.Int() == KRequestPending) - { - INFO_PRINTF2(_L("Connection Start completed with %d"), connectionStartStatus.Int()); - INFO_PRINTF1(_L("Irrespective of the start result the test has failed, because it hadn't execute enough iterations")); - //If you get this a lot this means there;s a flaw in the logic of this test and for some reason the execution of - //RConnection::Start speeds up with time. You may want to re-calibrate then and rerun the loop again with finer - //interval. - timer.Cancel(); - User::WaitForRequest(timerRequestStatus); - timer.Close(); return TestStepResult(); } + error = doLoopStep(timerVal); + if ( error == KErrUnderflow ) + { + if ( i < EMandatoryLoops ) + { + INFO_PRINTF1(_L("The test didn't execute enough iterations and hence hasn't tested what needed to be tested")); + return TestStepResult(); + } + break; //The only EPass exit condition + } + else if ( error != KErrNone ) + { + INFO_PRINTF2(_L("Loop test has failed with %d"), error); + return TestStepResult(); + } timerVal += timerIncrement; - INFO_PRINTF2(_L("[Loop %d], ....zzz. Stopping connection"), i); - iEsockTest->StopConnection(iParams); - User::WaitForRequest(connectionStartStatus); - INFO_PRINTF2(_L("[Loop %d], Connection stopped"), i); + + INFO_PRINTF2(_L("***********Closing connection"), i); + iEsockTest->CloseConnection(iParams.iConnectionName); } - timer.Close(); + SetTestStepResult(EPass); return TestStepResult(); } +TInt CStartStopCrazyLoopRConnectionStep::doLoopStep(TInt aTimerVal) + { + TRequestStatus timerRequestStatus; + + INFO_PRINTF1(_L("***********Starting connection (asynch)")); + TInt error = iEsockTest->StartConnection(iParams); + if (error != KErrNone) + { + INFO_PRINTF1(_L("Starting connection failed, aborting")); + return error; + } + INFO_PRINTF2(_L("***********Setting timer to %dus .zzz...."), aTimerVal); + iTimer.After(timerRequestStatus,aTimerVal); + User::WaitForRequest(timerRequestStatus, *ipConnectionStartStatus); + if (timerRequestStatus.Int() == KRequestPending) + { + INFO_PRINTF2(_L("Connection Start completed with %d and before the timer"), ipConnectionStartStatus->Int()); + iTimer.Cancel(); + User::WaitForRequest(timerRequestStatus); + return ipConnectionStartStatus->Int() == KErrNone ? KErrUnderflow : ipConnectionStartStatus->Int(); //Whether this is fatal for the test or not, will be determined by the caller; + } + + INFO_PRINTF1(_L("*********** ....zzz. Stopping connection")); + iEsockTest->StopConnection(iParams); + User::WaitForRequest(*ipConnectionStartStatus); + INFO_PRINTF1(_L("***********Connection stopped")); + return KErrNone; + } +// CStartCloseCrazyLoopRConnectionStep +//----------------- +CStartCloseCrazyLoopRConnectionStep::CStartCloseCrazyLoopRConnectionStep(CCEsockTestBase*& aEsockTest) +: CStartStopCrazyLoopRConnectionStep(aEsockTest) + { + SetTestStepName(KStartCloseCrazyLoopRConnectionStep); + } + +TInt CStartCloseCrazyLoopRConnectionStep::doLoopStep(TInt aTimerVal) + { + TRequestStatus timerRequestStatus; + + INFO_PRINTF1(_L("***********Starting connection (asynch)")); + TInt error = iEsockTest->StartConnection(iParams); + if (error != KErrNone) + { + INFO_PRINTF1(_L("Starting connection failed, aborting")); + return error; + } + INFO_PRINTF2(_L("***********Setting timer to %dus .zzz...."), aTimerVal); + iTimer.After(timerRequestStatus,aTimerVal); + User::WaitForRequest(timerRequestStatus, *ipConnectionStartStatus); + if (timerRequestStatus.Int() == KRequestPending) + { + INFO_PRINTF2(_L("Connection Start completed with %d and before the timer"), ipConnectionStartStatus->Int()); + iTimer.Cancel(); + User::WaitForRequest(timerRequestStatus); + return ipConnectionStartStatus->Int() == KErrNone ? KErrUnderflow : ipConnectionStartStatus->Int(); //Whether this is fatal for the test or not, will be determined by the caller; + } + return KErrNone; + } diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_EsockTestSteps/src/Te_esockteststepsSuiteServer.cpp --- a/datacommsserver/esockserver/test/TE_EsockTestSteps/src/Te_esockteststepsSuiteServer.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_EsockTestSteps/src/Te_esockteststepsSuiteServer.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -281,7 +281,9 @@ else if(aStepName.CompareF (KStartRConnectionStep) == 0) testStep = new CStartRConnectionStep(iEsockTest); else if(aStepName.CompareF (KStartStopCrazyLoopRConnectionStep) == 0) - testStep = new CStartStopCrazyLoopRConnectionStep(iEsockTest); + testStep = new CStartStopCrazyLoopRConnectionStep(iEsockTest); + else if(aStepName.CompareF (KStartCloseCrazyLoopRConnectionStep) == 0) + testStep = new CStartCloseCrazyLoopRConnectionStep(iEsockTest); else if(aStepName.CompareF (KAwaitRConnectionStartComplete) == 0) testStep = new CAwaitRConnectionStartComplete(iEsockTest); diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp --- a/datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -313,7 +313,7 @@ { TVerdict verdict = EPass; - TInt numExhaustiveSockets = iNormalTest ? KNumExhaustiveSockets : 10; + TInt numExhaustiveSockets = iNormalTest ? KNumExhaustiveSockets : 10; iNormalTest = EFalse; // normal test is only run once, the rest are OOM tests Logger().WriteFormat(_L("Test Purpose: Exhaustive Socket Open")); @@ -391,6 +391,13 @@ // go back exactly to where it was before - this makes assumptions about the ESock algorithms. Why // wouldn't ESock legitimately cache objects, for example? //TESTL(sockNum >= sockCount1); + TESTL(sockNum >= sockCount1); + + Logger().WriteFormat(_L("Freeing sockets in creation order")); + for (i=0; i(aQuery); + User::After(0.3*1000000); //Artificial yield to test cancellation. Do not remove. + if(query.iMessageId != TCFServiceProvider::TCommsBinderRequest::Id()) { //the factory only reacts to creation triggered by TCommsBinderRequest diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/providers/dummy/src/dummypr_subconnprov.cpp --- a/datacommsserver/esockserver/test/providers/dummy/src/dummypr_subconnprov.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/providers/dummy/src/dummypr_subconnprov.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -119,7 +119,7 @@ if (iContext.iMessage.IsMessage()) { ASSERT(iContext.iNodeActivity); - iContext.iNodeActivity->SetPostedTo(iContext.iNodeActivity->SoleOriginator().Peer().RecipientId()); + iContext.iNodeActivity->SetPostedTo(iContext.iNodeActivity->SoleOriginator().Peer()); } return EFalse; } diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/group/scripts/te_mecunittest.script --- a/datacommsserver/esockserver/test/te_mecunittest/group/scripts/te_mecunittest.script Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/te_mecunittest/group/scripts/te_mecunittest.script Mon Sep 13 15:06:46 2010 +0100 @@ -200,6 +200,26 @@ END_TESTCASE MEC_UNIT_TEST_012 +START_TESTCASE MEC_UNIT_TEST_013 +//! @SYMTestCaseID MEC_UNIT_TEST_013 +//! @SYMTestCaseDesc Test NULL return for RMetaExtensionContainerC::FindExtension() with un-opened container +//! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest +//! @SYMTestActions 1) FindExtension T1 in constMec +//! @SYMTestExpectedResults NULL return code +RUN_TEST_STEP 60 te_mecunittest MecTest013 +END_TESTCASE MEC_UNIT_TEST_013 + + +START_TESTCASE MEC_UNIT_TEST_014 +//! @SYMTestCaseID MEC_UNIT_TEST_014 +//! @SYMTestCaseDesc Test KErrNotFound leave for RMetaExtensionContainerC::FindExtensionL() with un-opened container +//! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest +//! @SYMTestActions 1) FindExtensionL T1 in constMec +//! @SYMTestExpectedResults Leaves with KErrNotFound +RUN_TEST_STEP 60 te_mecunittest MecTest014 +END_TESTCASE MEC_UNIT_TEST_014 + + //////////////////////////////////////////////// // Container Branching Tests //////////////////////////////////////////////// @@ -488,30 +508,6 @@ END_TESTCASE MEC_UNIT_TEST_104 -START_TESTCASE MEC_UNIT_TEST_105 -//! @SYMTestCaseID MEC_UNIT_TEST_105 -//! @SYMTestCaseDesc Test Panic mecpanic:1 (ENoImplementation) for RMetaExtensionContainerC::FindExtension() -//! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest -//! @SYMTestActions 1) FindExtension T1 in constMec -//! @SYMTestExpectedResults Panic mecpanic:1 -//! @SYMTestPriority Critical -//! @SYMTestStatus Implemented -RUN_PANIC_STEP_RESULT 1 mecpanic 60 te_mecunittest MecTestPanic5 -END_TESTCASE MEC_UNIT_TEST_105 - - -START_TESTCASE MEC_UNIT_TEST_106 -//! @SYMTestCaseID MEC_UNIT_TEST_106 -//! @SYMTestCaseDesc Test Panic mecpanic:1 (ENoImplementation) for RMetaExtensionContainerC::FindExtensionL() -//! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest -//! @SYMTestActions 1) FindExtensionL T1 in constMec -//! @SYMTestExpectedResults Panic mecpanic:1 -//! @SYMTestPriority Critical -//! @SYMTestStatus Implemented -RUN_PANIC_STEP_RESULT 1 mecpanic 60 te_mecunittest MecTestPanic6 -END_TESTCASE MEC_UNIT_TEST_106 - - START_TESTCASE MEC_UNIT_TEST_107 //! @SYMTestCaseID MEC_UNIT_TEST_107 //! @SYMTestCaseDesc Test Panic mecpanic:3 (EAlreadyOpen) for RMetaExtensionContainer::Open() diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/group/te_mecunittest.mmp --- a/datacommsserver/esockserver/test/te_mecunittest/group/te_mecunittest.mmp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/te_mecunittest/group/te_mecunittest.mmp Mon Sep 13 15:06:46 2010 +0100 @@ -54,6 +54,8 @@ SOURCE mectest010step.cpp SOURCE mectest011step.cpp SOURCE mectest012step.cpp +SOURCE mectest013step.cpp +SOURCE mectest014step.cpp SOURCE mectest030step.cpp SOURCE mectest031step.cpp @@ -71,8 +73,6 @@ SOURCE mectestpanic2step.cpp SOURCE mectestpanic3step.cpp SOURCE mectestpanic4step.cpp -SOURCE mectestpanic5step.cpp -SOURCE mectestpanic6step.cpp SOURCE mectestpanic7step.cpp SOURCE mectestpanic8step.cpp SOURCE mectestpanic9step.cpp diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/inc/mectest013step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datacommsserver/esockserver/test/te_mecunittest/inc/mectest013step.h Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,49 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// +// mectest013step.h +// + +/** +@file +*/ + + +#ifndef MECTEST013STEP_H +#define MECTEST013STEP_H + +#include "mecunitteststepbase.h" + + +_LIT(KMecTest013Step, "MecTest013"); + + +class CMecTest013Step : public CMecUnitTestStepBase + { +public: + virtual ~CMecTest013Step(); + +public: + explicit CMecTest013Step() + : CMecUnitTestStepBase(KMecTest013Step) + { + } + + virtual TVerdict RunTestStepL(); + }; + +#endif +// MECTEST013STEP_H + + diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/inc/mectest014step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datacommsserver/esockserver/test/te_mecunittest/inc/mectest014step.h Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,49 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// +// mectest014step.h +// + +/** +@file +*/ + + +#ifndef MECTEST014STEP_H +#define MECTEST014STEP_H + +#include "mecunitteststepbase.h" + + +_LIT(KMecTest014Step, "MecTest014"); + + +class CMecTest014Step : public CMecUnitTestStepBase + { +public: + virtual ~CMecTest014Step(); + +public: + explicit CMecTest014Step() + : CMecUnitTestStepBase(KMecTest014Step) + { + } + + virtual TVerdict RunTestStepL(); + }; + +#endif +// MECTEST014STEP_H + + diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/src/mectest013step.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datacommsserver/esockserver/test/te_mecunittest/src/mectest013step.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,48 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// +// mectest013step.cpp +// + +/** +@file +*/ + +#include "mectest013step.h" +#include "testextensions.h" +#include "metaextensioncontainerspy.h" +#include +#include + +using namespace ESock; + +CMecTest013Step::~CMecTest013Step() + { + } + + +/** +//! @SYMTestCaseID MEC_UNIT_TEST_013 +//! @SYMTestCaseDesc Test NULL return for RMetaExtensionContainerC::FindExtension() with un-opened container +//! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest +//! @SYMTestActions 1) FindExtension T1 in constMec +//! @SYMTestExpectedResults NULL return code +*/ +TVerdict CMecTest013Step::RunTestStepL() + { + RMetaExtensionContainerC mec; + const Meta::SMetaData* ext = mec.FindExtension(TTestExtension1::TypeId()); + return ext == NULL ? EPass : EFail; + } + diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/src/mectest014step.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datacommsserver/esockserver/test/te_mecunittest/src/mectest014step.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -0,0 +1,48 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// +// mectest014step.cpp +// + +/** +@file +*/ + +#include "mectest014step.h" +#include "testextensions.h" +#include "metaextensioncontainerspy.h" +#include +#include + +using namespace ESock; + +CMecTest014Step::~CMecTest014Step() + { + } + + +/** +//! @SYMTestCaseID MEC_UNIT_TEST_014 +//! @SYMTestCaseDesc Test KErrNotFound leave for RMetaExtensionContainerC::FindExtensionL() with un-opened container +//! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest +//! @SYMTestActions 1) FindExtensionL T1 in constMec +//! @SYMTestExpectedResults Leaves with KErrNotFound +*/ +TVerdict CMecTest014Step::RunTestStepL() + { + RMetaExtensionContainerC mec; + TRAPD(err, const Meta::SMetaData& ext = mec.FindExtensionL(TTestExtension1::TypeId())); + return err == KErrNotFound ? EPass : EFail; + } + diff -r ae47d0499bee -r c9776eadbffd datacommsserver/esockserver/test/te_mecunittest/src/mecunittestserver.cpp --- a/datacommsserver/esockserver/test/te_mecunittest/src/mecunittestserver.cpp Mon Sep 06 13:49:23 2010 +0100 +++ b/datacommsserver/esockserver/test/te_mecunittest/src/mecunittestserver.cpp Mon Sep 13 15:06:46 2010 +0100 @@ -39,6 +39,8 @@ #include "mectest010step.h" #include "mectest011step.h" #include "mectest012step.h" +#include "mectest013step.h" +#include "mectest014step.h" #include "mectest030step.h" #include "mectest031step.h" @@ -57,8 +59,6 @@ #include "mectestpanic2step.h" #include "mectestpanic3step.h" #include "mectestpanic4step.h" -#include "mectestpanic5step.h" -#include "mectestpanic6step.h" #include "mectestpanic7step.h" #include "mectestpanic8step.h" #include "mectestpanic9step.h" @@ -170,6 +170,8 @@ TEST_STEP(MecTest010) TEST_STEP(MecTest011) TEST_STEP(MecTest012) + TEST_STEP(MecTest013) + TEST_STEP(MecTest014) TEST_STEP(MecTest030) TEST_STEP(MecTest031) @@ -186,9 +188,9 @@ // TEST_STEP(MecTestPanic1) TEST_STEP(MecTestPanic2) TEST_STEP(MecTestPanic3) - TEST_STEP(MecTestPanic4) - TEST_STEP(MecTestPanic5) - TEST_STEP(MecTestPanic6) + TEST_STEP(MecTestPanic4) + // MecTestPanic5 and MecTestPanic6 removed as FindExtension()/FindExtensionL() + // no longer panic if container hasn't been opened. TEST_STEP(MecTestPanic7) TEST_STEP(MecTestPanic8) TEST_STEP(MecTestPanic9)