diff -r d566d76acea1 -r 3652a10b304a linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp --- a/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp Mon Jun 21 17:25:18 2010 +0300 +++ b/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp Thu Jul 15 20:25:02 2010 +0300 @@ -22,6 +22,7 @@ #include #include #include +#include #include "tunnelagentcpr.h" #include "tunnelagentcprstates.h" @@ -46,12 +47,6 @@ using namespace AgentCprStates; using namespace TunnelAgentCprStates; -//We reserve space for two preallocated activities that may start concurrently on the CPR -//node: destroy and data client stop. -static const TUint KDefaultMaxPreallocatedActivityCount = 2; -static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>); -static const TUint KTunnelCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize; - namespace TunnelAgentCprStartActivity { DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityStart, TunnelCprStart, TCFServiceProvider::TStart, PRActivities::CStartActivity::NewL) @@ -103,14 +98,15 @@ { CTunnelAgentConnectionProvider* self = new (ELeave) CTunnelAgentConnectionProvider(aFactory); CleanupStack::PushL(self); - self->ConstructL(KTunnelCPRPreallocatedActivityBufferSize); + self->ConstructL(); CleanupStack::Pop(self); return self; } CTunnelAgentConnectionProvider::CTunnelAgentConnectionProvider(CConnectionProviderFactoryBase& aFactory) - : CAgentConnectionProvider(aFactory, TunnelAgentCprStates::TunnelAgentCprActivities::Self()) + : CAgentConnectionProvider(aFactory, TunnelAgentCprStates::TunnelAgentCprActivities::Self()), + TIfStaticFetcherNearestInHierarchy(this) { LOG_NODE_CREATE(KTunnelAgentCprTag, CTunnelAgentConnectionProvider); } @@ -124,5 +120,35 @@ LOG_NODE_DESTROY(KTunnelAgentCprTag, CTunnelAgentConnectionProvider); } +// +// MPlatSecApiExt +// +void CTunnelAgentConnectionProvider::ReturnInterfacePtrL(MPlatsecApiExt*& aInterface) + { + aInterface = this; + } +TInt CTunnelAgentConnectionProvider::SecureId(TSecureId& /*aResult*/) const + { + return KErrNotSupported; + } + +TInt CTunnelAgentConnectionProvider::VendorId(TVendorId& /*aResult*/) const + { + return KErrNotSupported; + } + +TBool CTunnelAgentConnectionProvider::HasCapability(const TCapability /*aCapability*/) const + { + return KErrNotSupported; + } + +TInt CTunnelAgentConnectionProvider::CheckPolicy(const TSecurityPolicy& /*aPolicy*/) const + { + // This is the whole reason that we need to implement MPlatSecApiExt in this node at all. When TunnelAgentCpr issues + // a TStop towards IpCpr, IpCpr requires the sending node (normally ESockSvr but TunnelAgentCpr in this case) + // to implement MPlatSecApiExt through which IpCpr can check platsec capabilities (IpCprStates::TCheckStopCapabilities). + // If TunnelAgentCpr does not impement MPlatSecApiExt, then IpCpr will error the stop request with KErrInterfaceNotSupported. + return KErrNone; + }