diff -r 7e41d162e158 -r abbed5a4b42a networkcontrol/ipnetworklayer/src/IPProtoCprStates.cpp --- a/networkcontrol/ipnetworklayer/src/IPProtoCprStates.cpp Thu Aug 19 11:25:30 2010 +0300 +++ b/networkcontrol/ipnetworklayer/src/IPProtoCprStates.cpp Tue Aug 31 16:45:15 2010 +0300 @@ -38,8 +38,6 @@ #include #include #include -#include -#include "ItfInfoConfigExt.h" using namespace Messages; using namespace MeshMachine; @@ -155,10 +153,8 @@ if (iContext.Node().iTimerStopped) { TInt selfidx = iContext.iNodeActivity->FindOriginator(iContext.Node().SelfInterface()); - if(selfidx != KErrNotFound) - { - iContext.iNodeActivity->RemoveOriginator(selfidx); - } + ASSERT(selfidx != KErrNotFound); + iContext.iNodeActivity->RemoveOriginator(selfidx); } TInt stopCode = KErrCancel; @@ -287,19 +283,6 @@ if (state.Accept()) { iContext.Node().DisableTimers(); - // Check if we have been re-started (i.e. a start request is processed immmediately after a stop request - // has been processed). If so, we generate a special EInterfaceStarting notification towards ESock. - // This is to solve the problem where there is a missing EInterfaceDown/EInterfaceUp event sequence - // from AllInterfaceNotification in this scenario. - if (iContext.Node().iStopped) - { - const TItfInfoConfigExt* ext = static_cast(iContext.Node().AccessPointConfig().FindExtension(STypeId::CreateSTypeId(KIpProtoConfigExtUid, EItfInfoConfigExt))); - if (ext) - { - TInterfaceNotification info = { ext->iConnectionInfo, TConnInterfaceState(EInterfaceRestarting) }; - iContext.Node().Factory().InterfaceStateChange(TPckgC(info)); - } - } return ETrue; } return EFalse; @@ -396,7 +379,6 @@ iContext.Node().SetTimerMode(CIPProtoConnectionProvider::ETimerMedium); iContext.Node().iTimerStopped = EFalse; - iContext.Node().iTimerExpired = EFalse; CoreNetStates::TSendStarted transition(iContext); transition.DoL(); } @@ -427,21 +409,14 @@ TCFMessage::TSubConnDataTransferred wholeConnMsg(KNifEMCompatibilityLayerEntireSubConnectionUid, dmProvider->DataVolumesPtr()->iSentBytes, dmProvider->DataVolumesPtr()->iReceivedBytes); TCFMessage::TSubConnDataTransferred defaultSubConnMsg(KNifEMCompatibilityLayerFakeSubConnectionId, dmProvider->DataVolumesPtr()->iSentBytes, dmProvider->DataVolumesPtr()->iReceivedBytes); - // Sending data clent status change message to all the control clients - TClientIter ccIter = iContext.Node().GetClientIter(TClientType(TCFClientType::ECtrl), TClientType(0, TCFClientType::ELeaving)); - RNodeInterface* ctrlClient; - TBool ctrlClientPresent = false; - while ((ctrlClient = ccIter++) != NULL) - { - //If any cntl clinet is present setting the variable ctrlClientPresent as true. - ctrlClientPresent = true; - ctrlClient->PostMessage(iContext.NodeId(), wholeConnMsg); - ctrlClient->PostMessage(iContext.NodeId(), defaultSubConnMsg); - } - if(ctrlClientPresent) - { - iContext.Node().iSubConnEventDataSent = ETrue; - } + RNodeInterface* ctrlClient = iContext.Node().GetFirstClient(TClientType(TCFClientType::ECtrl)); + if(ctrlClient) + { // Can't send this if the client's gone + ctrlClient->PostMessage(iContext.NodeId(), wholeConnMsg); + ctrlClient->PostMessage(iContext.NodeId(), defaultSubConnMsg); + + iContext.Node().iSubConnEventDataSent = ETrue; + } } }