terminalsecurity/SCP/SCPServer/src/SCPSession.cpp
branchRCL_3
changeset 76 3cdbd92ee07b
parent 65 5cc2995847ea
--- a/terminalsecurity/SCP/SCPServer/src/SCPSession.cpp	Wed Sep 15 13:08:27 2010 +0300
+++ b/terminalsecurity/SCP/SCPServer/src/SCPSession.cpp	Wed Oct 13 15:30:06 2010 +0300
@@ -1573,26 +1573,20 @@
     Dprint(_L("[CSCPSession]-> NotifyAllStakeHoldersL() <<<"));
     return KErrNone;
 }
-
 TInt CSCPSession :: HandleCleanupL(const RMessage2& aMessage) {
-    Dprint((_L("[CSCPSession]-> HandleCleanupL() >>>")));
-	
-    if( (aMessage.SecureId().iId != KSCPServerSIDTerminalControl) && 
-        (aMessage.SecureId().iId != KSCPEvntHndlrUid)) {
-		
-        Dprint((_L("[CSCPSession]-> ERROR: caller app id=%ld. Permission denied..."), aMessage.SecureId().iId));
-        User :: Leave(KErrPermissionDenied);
-    }
-	
     // Copy the client data into a local buffer
     TInt32 lCount = aMessage.GetDesLength(1);
     
+/*    // If the caller is not SCPEventHandler the deny access
+    if(aMessage.SecureId() != KSCPEvntHndlrUid) {
+        return KErrPermissionDenied;
+    }*/
+    
     // Atleast one application id has to be present in the received message (atleast 8 bytes)
     if(lCount < sizeof(TInt32)) {
         return KErrArgument;
     }
     
-    TInt lStatus = KErrNone;
     RArray<const TParamChange> lChangeArray;
     CleanupClosePushL(lChangeArray);
     
@@ -1601,7 +1595,9 @@
     
     HBufC8* lBuffer = HBufC8 :: NewLC(lCount);
     TPtr8 bufPtr = lBuffer->Des();
-    aMessage.ReadL(1, bufPtr);    
+    aMessage.ReadL(1, bufPtr);
+    
+    TInt lStatus = KErrNone;
     
     TRAPD(lErr, lStatus = iServer.PerformCleanupL(lBuffer, lChangeArray, lParamValArray));
     
@@ -1625,10 +1621,8 @@
     
     lParamValArray.ResetAndDestroy();
     CleanupStack :: PopAndDestroy(3); // lParamIDArray lParamValArray lBuffer    
-    Dprint((_L("[CSCPSession]-> HandleCleanupL() <<<")));
     return lStatus;
 }
-
 TInt CSCPSession :: HandleSetALPeriodL( const RMessage2& aMessage ) {
     Dprint((_L("[CSCPSession]-> HandleSetParamMessageL() >>>")));
     TBool oldALState = EFalse;