datacommsserver/esockserver/ssock/ss_connstates.cpp
branchRCL_3
changeset 21 07656293a99c
parent 18 9644881fedd0
child 23 cbb19216b74d
--- a/datacommsserver/esockserver/ssock/ss_connstates.cpp	Wed Jun 09 11:00:38 2010 +0300
+++ b/datacommsserver/esockserver/ssock/ss_connstates.cpp	Mon Jun 21 17:02:22 2010 +0300
@@ -927,6 +927,20 @@
     return nextRet;
     }
 
+void ConnActivities::CStartAttachActivity::Cancel(MeshMachine::TNodeContextBase& aContext)
+    {
+    if (!iCSR.IsNull() && iCSR == PostedToNodeId())
+        {//iCSR is a bit akward as it isn't stored in the Node's client array. MeshMachine auto-cancelling refuses to auto-forward TCancels
+         //to nodes it can't verify they are alive. CStartAttachActivity can warrant iCSR is alive.
+        RClientInterface::OpenPostMessageClose(TNodeCtxId(ActivityId(), iNode.Id()), PostedToNodeId(), TEBase::TCancel().CRef());
+        SetError(KErrCancel);
+        }
+    else
+        {
+        CESockClientActivityBase::Cancel(aContext);
+        }
+    }
+
 
 DEFINE_SMELEMENT(CStartAttachActivity::TNoTagOrStartPrefsSetTag, NetStateMachine::MStateFork, ConnStates::TContext)
 TInt CStartAttachActivity::TNoTagOrStartPrefsSetTag::TransitionTag()