datacommsserver/esockserver/ssock/ss_connstates.cpp
changeset 22 592244873960
parent 4 928ed51ddc43
child 25 e53adc4c49de
--- a/datacommsserver/esockserver/ssock/ss_connstates.cpp	Tue Feb 02 00:53:00 2010 +0200
+++ b/datacommsserver/esockserver/ssock/ss_connstates.cpp	Fri Apr 16 16:15:03 2010 +0300
@@ -670,6 +670,10 @@
 		{
 		progress.iStage = KConnectionUp;	// KLinkLayerOpen
 		}
+	if (progress.iError == KErrForceDisconnected)
+		{
+		progress.iError = KErrDisconnected;
+		}
 
 	LOG( ESockLog::Printf(KESockConnectionTag, _L("CConnection %08x:\tProgressNotification(TInt aStage %d, TInt aError %d)"),
 		&(iContext.Node()), progress.iStage, progress.iError) );
@@ -1020,6 +1024,20 @@
 	return EFalse;
 	}
 
+DEFINE_SMELEMENT(CStartAttachActivity::TSetIdleIfStopOutstanding, NetStateMachine::MStateTransition, TContext)
+void CStartAttachActivity::TSetIdleIfStopOutstanding::DoL()
+	{
+	__ASSERT_DEBUG(iContext.iNodeActivity, ConnPanic(KPanicNoActivity));
+	ConnActivities::CStartAttachActivity& activity = static_cast<ConnActivities::CStartAttachActivity&>(*iContext.iNodeActivity);
+
+	// If there is a stop activity outstanding then we set this start activity idle
+	TInt numRunningStopActivities = iContext.Node().CountActivities(ESock::ECFActivityStop);
+	if (numRunningStopActivities > 0)
+		{
+		activity.SetIdle();
+		}
+	}
+
 
 #ifdef SYMBIAN_NETWORKING_UPS