datacommsserver/esockserver/ssock/ss_mmnode.cpp
branchRCL_3
changeset 66 cbb19216b74d
parent 0 dfb7c4ff071f
--- a/datacommsserver/esockserver/ssock/ss_mmnode.cpp	Mon Jun 21 17:02:22 2010 +0300
+++ b/datacommsserver/esockserver/ssock/ss_mmnode.cpp	Thu Jul 15 20:01:43 2010 +0300
@@ -19,12 +19,26 @@
 
 #include <comms-infras/ss_log.h>
 #include <comms-infras/ss_mmnode.h>
+#include <comms-infras/ss_corepractivities.h>
 
 using namespace NetStateMachine;
 using namespace Messages;
 using namespace MeshMachine;
 using namespace ESock;
 
+EXPORT_C void ACFMMNodeBase::ConstructL(TInt aSize)
+    {
+    //Preallocate space for preallocated activities
+    if (aSize==KUseDefaultPreallocatedSize)
+    	{
+    	//Nodes will usually use the default parameter (-1) and rely on KDefaultPreallocatedActivityBufferSize.
+    	//We do not use KDefaultPreallocatedActivityBufferSize as the default argument to avoid publishing of
+    	//this constant or KDefaultMaxPreallocatedActivityCount/KDefaultMaxPreallocatedActivitySize (either can be
+    	//freely changed at any time).
+    	aSize = KDefaultMaxPreallocatedActivityCount * KDefaultMaxPreallocatedActivitySize;
+    	}
+    AMMNodeBase::ConstructL(aSize);
+	}
 
 EXPORT_C void ACFMMNodeBase::HandlePassThroughMessage(TNodeContextBase& aContext)
     {