201039_02
authorhgs
Thu, 14 Oct 2010 13:45:23 +0300
changeset 84 b09186059647
parent 82 a117e284a2c6
child 87 c938d010410d
201039_02
commondrm/drmbrowserlauncher/src/drmbrowserlauncher.cpp
commondrm/drmutility/src/DrmUiHandlingImpl.cpp
commondrm/drmutility/src/drmutilityui.cpp
commondrm/drmutility/src/rdrmhelperclient.cpp
drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf
drm_plat/drm_rights_api/tsrc/data/c/content.dcf
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content2.dcf
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/group/DRM_CAF.mmp
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/group/bld.inf
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/src/DRM_CAFBlocks.cpp
drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis/50_MM_DRMCAF.pkg
drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis/51_drm_drmcaf.pkg
omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp
omadrm/drmengine/agentv2/src/Oma2AgentContent.cpp
omadrm/drmengine/agentv2/src/Oma2AgentRightsManager.cpp
omadrm/drmengine/dcf/src/Oma1Dcf.cpp
omadrm/drmengine/dcf/src/Oma2Dcf.cpp
omadrm/drmengine/dcfrepository/client/src/DcfRepCli.cpp
omadrm/drmengine/dcfrepository/server/src/DcfRepSrv.cpp
omadrm/drmengine/dcfrepository/server/src/FileScan.cpp
omadrm/drmengine/dm/src/Oma1DcfCreator.cpp
omadrm/drmengine/notifier/src/DRMNotifierSession.cpp
omadrm/drmengine/ro/src/DrmRights.cpp
omadrm/drmengine/roap/src/JoinDomainRespParser.cpp
omadrm/drmengine/roapstorage/src/DRMDomainContext.cpp
omadrm/drmengine/roapstorage/src/DRMRIContext.cpp
omadrm/drmengine/server/src/DRMRightsData.cpp
omadrm/drmengine/server/src/DRMRightsServer.cpp
omadrm/drmengine/server/src/drmparentstorage.cpp
omadrm/drmengine/server/src/drmrightsdb.cpp
omadrm/drmengine/utils/src/dbwatcher.cpp
omadrm/drmengine/utils/src/dirwatcher.cpp
omadrm/drmengine/utils/src/procwatcher.cpp
omadrm/drmhelper/drmhelperserver/src/IdleObserver.cpp
omadrm/drmhelper/src/RDRMHelper.cpp
omadrm/drmhelper/src/drmhelper.cpp
omadrm/drmlicensemanager/src/DRMLicenseManager.cpp
omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp
omadrm/drmplugins/drmromtm/uiData/src/RoMtmDat.cpp
wmdrm/camese/wmdrmdladefaulthttpplugin/src/wmdrmdladefaulthttpmanager.cpp
wmdrm/wmdrmengine/wmdrmfileserver/server/src/wmdrmfileserversession.cpp
--- a/commondrm/drmbrowserlauncher/src/drmbrowserlauncher.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/commondrm/drmbrowserlauncher/src/drmbrowserlauncher.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -76,11 +76,11 @@
 		QString urlString = QString::fromUtf16(aUrl.Ptr(), aUrl.Length());
 		QUrl* url = new QUrl(urlString);
 		bool ret = QDesktopServices::openUrl(*url);
+		delete url;
 		if(!ret)
-				{
-				User::Leave(KErrNotFound);
-				}
-			
+		    {
+			User::Leave(KErrNotFound);
+			}
 		}
 
 void DRM::CDrmBrowserLauncher::ConstructL()
--- a/commondrm/drmutility/src/DrmUiHandlingImpl.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/commondrm/drmutility/src/DrmUiHandlingImpl.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -424,6 +424,10 @@
     {
     DRM::CDrmUiHandlingData* data( PopFront() );
 
+    // reset the current observer
+    // it may already be deleted so don't do any calls to it.
+    iObserver = NULL;
+
     // Empty the queue:
     while ( data )
         {
@@ -1159,17 +1163,26 @@
             break;
         }
 
-    // Complete the client request
-    iObserver->OperationCompleted( iOperationId, KErrNone );
-
+    // if the observer exists and it has not been deleted, call complete
+    // for the operation and get ready for another round
+    // this should prevent crashes in case the class is deleted before
+    // and operation finihes.
+    
+    if( iObserver && reinterpret_cast<TInt>(iObserver) != 0xDEDEDEDE )
+        {
+        // Complete the client request
+        iObserver->OperationCompleted( iOperationId, KErrNone );
+
+        // Get ready for another round:
+        SetActive();
+
+        // complete internal request:
+        User::RequestComplete( status, KErrNone );
+        }
+        
     // destroy the object:
     CleanupStack::PopAndDestroy( data );
 
-    // Get ready for another round:
-    SetActive();
-
-    // complete internal request:
-    User::RequestComplete( status, KErrNone );
     }
 
 // -----------------------------------------------------------------------------
@@ -1836,7 +1849,6 @@
     TBool onlyMeteringRejection( reason == DRM::EURejectionMetering );
     if ( onlyMeteringRejection )
         {
-        // Qt dialog not implemented yet
         iDrmUtilityUi->DisplayNoteL( EConfUnableToOpen );
 
         CleanupStack::PopAndDestroy( contentId );
@@ -2885,7 +2897,7 @@
     if ( !error )
         {
         ptr.Set( riId->Des() );
-        stringAttributeSet.GetValue( EDomainRightsIssuerId, ptr );
+        error = stringAttributeSet.GetValue( EDomainRightsIssuerId, ptr );
         if ( !error )
             {
             riId8 = HBufC8::NewLC( riId->Length() );
@@ -2968,7 +2980,6 @@
             if ( RejectReason( aReason ) == DRM::EURejectionMetering )
                 {
                 // Show that only reason for error was rejected metering.
-                // Qt dialog not implemented yet
                 iDrmUtilityUi->DisplayNoteL( EConfUnableToOpen );
                 }
             else
@@ -3521,7 +3532,6 @@
             else
                 {
                 // no rights issuer
-                // Qt dialog not implemented yet
                 iDrmUtilityUi->DisplayNoteL( EConfLicenceNotReceived );
                 }
             }
@@ -3550,7 +3560,6 @@
                     User::LeaveIfError( aContent.GetStringAttribute(
                         EFileName, fileName ) );
 
-                    // Qt dialog not implemented yet
                     ret = iDrmUtilityUi->DisplayQueryL( EQueryFileWithNoRightsObj, fileName );
                     }
                 }
@@ -3558,7 +3567,6 @@
                 {
                 if ( aReason & EConstraintIndividual )
                     {
-                    // Qt dialog not implemented yet
                     iDrmUtilityUi->DisplayNoteL( EConfFileLockedForSim );
                     }
                 else
@@ -3584,8 +3592,7 @@
                     }
                 else
                     {
-                    // no rights issuer
-                    // Qt dialog not implemented yet
+                    // no rights issuer 
                     iDrmUtilityUi->DisplayNoteL( EConfLicenceNotReceived );
                     }
                 }
@@ -3800,7 +3807,7 @@
     if ( !error )
         {
         ptr.Set( riId->Des() );
-        stringAttributeSet.GetValue( EDomainRightsIssuerId, ptr );
+        error = stringAttributeSet.GetValue( EDomainRightsIssuerId, ptr );
         if ( !error )
             {
             riId8 = HBufC8::NewLC( riId->Length() );
@@ -4101,7 +4108,6 @@
         buttonCode = ECancelled;
         if ( aShowNotes )
             {
-            // Qt dialog not implemented yet
             buttonCode = iDrmUtilityUi->DisplayQueryL( EQueryConnectToActivate, KNoValue );
             }
         }
@@ -4110,7 +4116,6 @@
         buttonCode = ECancelled;
         if ( aShowNotes )
             {
-            // Qt dialog not implemented yet
             buttonCode = iDrmUtilityUi->DisplayQueryL( EQueryConnectToActivate, KNoValue );
             }
         }
@@ -4123,7 +4128,6 @@
             // No AP defined
             if ( aShowNotes )
                 {
-                // Qt dialog not implemented yet
                 iDrmUtilityUi->DisplayNoteL( EConfNoAccessPoint );
                 }
             r = KErrCANoRights;
@@ -4158,7 +4162,6 @@
                         // Connection failed with selected AP
                         if ( aShowNotes )
                             {
-                            // Qt dialog not implemented yet
                             iDrmUtilityUi->DisplayNoteL( EConfConnectionFailed );
                             }
                         r = KErrCANoRights;
@@ -4176,7 +4179,6 @@
                             if ( errorUrl )
                                 {
                                 // ask user whether error url should be opened
-                                // Qt dialog not implemented yet
                                 buttonCode = iDrmUtilityUi->DisplayQueryL( EQueryOpenErrorUrl, KNoValue );
 
                                 if ( buttonCode == EOk )
@@ -4187,7 +4189,6 @@
                                 }
                             else
                                 {
-                                // Qt dialog not implemented yet
                                 iDrmUtilityUi->DisplayNoteL( EConfUnableToUnlock );
                                 }
                             CleanupStack::PopAndDestroy( errorUrl );
--- a/commondrm/drmutility/src/drmutilityui.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/commondrm/drmutility/src/drmutilityui.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -642,8 +642,9 @@
     if ( iCoeEnv && resourceId )
         {
         CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( &index );
-
+        CleanupStack::PushL( dlg );
         PrepareSecondaryDisplayL( *dlg, resourceId );
+        CleanupStack::Pop( dlg );
         answer = dlg->ExecuteLD( resourceId );
         CancelSecondaryDisplayL( resourceId );
 
--- a/commondrm/drmutility/src/rdrmhelperclient.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/commondrm/drmutility/src/rdrmhelperclient.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -79,8 +79,9 @@
     {
     TInt error = StartServer();
 
-    if ( !error )
+    if ( !error || error == KErrAlreadyExists )
         {
+        error = KErrNone;    
         error = CreateSession( KDRMHelperServerName,
                                Version(),
                                KDefaultMessageSlots );
Binary file drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content2.dcf has changed
--- a/drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/group/DRM_CAF.mmp	Tue Sep 28 14:08:58 2010 +0300
+++ b/drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/group/DRM_CAF.mmp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -31,7 +31,9 @@
 
 DEFFILE         DRM_CAF.def
 
-USERINCLUDE     ../inc 
+USERINCLUDE     ../inc
+USERINCLUDE     ../../../../../../omadrm/drmengine/ro/inc
+USERINCLUDE     ../../../../../../omadrm/drmengine/server/inc 
 
 MW_LAYER_SYSTEMINCLUDE
 
@@ -73,6 +75,9 @@
 LIBRARY         random.lib
 LIBRARY         asn1.lib
 LIBRARY         drmlicensechecker.lib
+LIBRARY	        drmparsers.lib
+LIBRARY         drmrights.lib
+LIBRARY         DrmServerInterfaces.lib
 
 LIBRARY         aknskins.lib //for skin sbackground
 LIBRARY         gdi.lib
--- a/drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/group/bld.inf	Tue Sep 28 14:08:58 2010 +0300
+++ b/drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/group/bld.inf	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -27,6 +27,7 @@
 ../data/content.txt /epoc32/winscw/c/content.txt
 ../data/content-noenc.odf /epoc32/winscw/c/content-noenc.odf
 ../data/content.dcf /epoc32/winscw/c/content.dcf
+../data/content2.dcf /epoc32/winscw/c/content2.dcf
 
 drmcaf_z.bat		/epoc32/winscw/c/drmcaf_z.bat
 drmcaf_c.bat		/epoc32/winscw/c/drmcaf_c.bat
--- a/drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/src/DRM_CAFBlocks.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/src/DRM_CAFBlocks.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,25 +15,22 @@
 *
 */
 
-
-
-
-
-
-
-
-
 // [INCLUDE FILES] - do not remove
 #include <e32svr.h>
 #include <StifParser.h>
 #include <Stiftestinterface.h>
-#include "DRM_CAF.h"
 #include <caf/caftypes.h>
 #include <caf/caf.h>
 #include <caf/data.h>
 #include <f32file.h>
 #include <bautils.h>
 #include <TestclassAssert.h>
+#include "DRM_CAF.h"
+#include "drmrightsparser.h"
+#include "drmpointerarray.h"
+#include "drmrights.h"
+#include "drmrightsclient.h"
+
 using namespace ContentAccess;
 // LOCAL CONSTANTS AND MACROS
 
@@ -215,17 +212,66 @@
 \r\n\
 --random78o6bP%[GB6b/8&/45&%*^'?vS--");
 
+_LIT8(KROHeadOMA1, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\
+<!DOCTYPE o-ex:rights PUBLIC \"-//OMA//DTD DRMREL 1.0//EN\" \
+\"http://www.oma.org/dtd/dr\">\
+<o-ex:rights\
+   xmlns:o-ex=\"http://odrl.net/1.1/ODRL-EX\" \
+   xmlns:o-dd=\"http://odrl.net/1.1/ODRL-DD\" \
+   xmlns:oma-dd=\"http://www.openmobilealliance.com/oma-dd\" \
+   xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#/\">\
+  <o-ex:context>\
+    <o-dd:version>1.0</o-dd:version>\
+  </o-ex:context>\
+  <o-ex:agreement>\
+    <o-ex:asset>\
+      <o-ex:context>\
+        <o-dd:uid>");
+
+_LIT8(KROTailFullOMA1, "</o-dd:uid>\
+      </o-ex:context>\
+      <ds:KeyInfo><ds:KeyValue>qtyAvglXxJNuAJVM2yxHQA==</ds:KeyValue></ds:KeyInfo>\
+    </o-ex:asset>\
+  <o-ex:permission>\
+\
+<o-dd:play>\
+      <o-ex:constraint>\
+      </o-ex:constraint>\
+    </o-dd:play>\
+\
+<o-dd:display>\
+      <o-ex:constraint>\
+      </o-ex:constraint>\
+    </o-dd:display>\
+\
+<o-dd:execute>\
+      <o-ex:constraint>\
+      </o-ex:constraint>\
+    </o-dd:execute>\
+\
+<o-dd:print>\
+      <o-ex:constraint>\
+      </o-ex:constraint>\
+    </o-dd:print>\
+  </o-ex:permission>\
+  </o-ex:agreement>\
+</o-ex:rights>");
+
 _LIT(KOma1Content, "c:\\content.dcf");
+_LIT(KOma1Content2, "c:\\content2.dcf");
 _LIT(KOma2Content, "c:\\content.odf");
 _LIT(KOma2ContentNoEnc, "c:\\content-noenc.odf");
 _LIT(KOma2ContentNoEncTruncated, "c:\\content-noenc-trunc.odf");
+_LIT8(KOma1ContentID, "cid:testcontent20090526095637-2657230746@testcontent.com");
 
 _LIT(KEncryptedDir, "c:\\");
 _LIT(KTempDcfName, "test.dcf");
 _LIT(KTempDcfPathName, "c:\\test.dcf");
 _LIT(KFVariantFile,"c:\\DrmCAFVarFile.txt");
 
-
+// LOCAL FUNCTION PROTOTYPES
+LOCAL_C void AddROL(const TDesC8& aHead, const TDesC8& aCID, const TDesC8& aTail);
+LOCAL_C void DeleteRODBL();
 // ============================= LOCAL FUNCTIONS ===============================
 
 
@@ -350,6 +396,47 @@
     return rm;
     }
 
+// -----------------------------------------------------------------------------
+// AddROL
+// Helper function with which test cases can add ROs
+// -----------------------------------------------------------------------------
+//
+LOCAL_C void AddROL(const TDesC8& aHead, const TDesC8& aCID,
+    const TDesC8& aTail)
+    {
+    TInt roSize(aHead.Size() + aCID.Size() + aTail.Size());
+    HBufC8* buf(HBufC8::NewLC(roSize));
+    TPtr8 tmp(buf->Des());
+
+    tmp.Append(aHead);
+    tmp.Append(aCID);
+    tmp.Append(aTail);
+
+    CDRMPointerArray<CDRMRights>* rights(CDRMPointerArray<CDRMRights>::NewLC());
+    rights->SetAutoCleanup(ETrue);
+
+    CDrmRightsParser* rp(CDrmRightsParser::NewL());
+    CleanupStack::PushL(rp);
+
+    rp->ParseAndStoreL(*buf, *rights);
+
+    CleanupStack::PopAndDestroy(3, buf); // rp, rights, buf
+    }
+
+// -----------------------------------------------------------------------------
+// DeleteRODBL
+// Helper function with which test cases can delete RO DB.
+// -----------------------------------------------------------------------------
+//
+LOCAL_C void DeleteRODBL()
+    {
+    RDRMRightsClient client;
+    User::LeaveIfError(client.Connect());
+    client.DeleteAll();
+    client.Close();
+    }
+
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -1708,36 +1795,21 @@
     }
 TInt  CDRM_CAF::CContent_NotifyStatusChangeL()
     {
-    _LIT(KSdkVersion31,"Z:\\System\\install\\Series60v3.1.sis");
-    _LIT(KSdkVersion50,"Z:\\System\\install\\Series60v5.0.sis");
-    RFs fs;
-    TBool found = EFalse;
-    User::LeaveIfError(fs.Connect ());
-    CleanupClosePushL (fs);
-    if(BaflUtils::FileExists (fs, KSdkVersion31))
-        {
-        found = ETrue;
-        }
-    else if(BaflUtils::FileExists (fs, KSdkVersion50))
-        {
-        found = ETrue;
-        }
     CContent* content = NULL;
     TRequestStatus status = KRequestPending;
-    content = CContent::NewLC(KOma2Content);
+    content = CContent::NewLC(KOma1Content2);
     STIF_ASSERT_NOT_NULL(content);
-    content->NotifyStatusChange(ERightsAvailable, status);//ERightsAvailable
-    if(found)
-    	{
-    	User::After(10000);
-			content->CancelNotifyStatusChange(status);
-    	User::WaitForRequest(status);
-   		}
-   else
-   		{
-   	  User::WaitForRequest(status);
-  		}
-    CleanupStack::PopAndDestroy(2);
+    content->NotifyStatusChange(ERightsAvailable, status); //ERightsAvailable
+    
+    AddROL(KROHeadOMA1, KOma1ContentID, KROTailFullOMA1);
+    
+    User::After(10000);
+	content->CancelNotifyStatusChange(status);
+    User::WaitForRequest(status);
+    
+    DeleteRODBL();
+    
+    CleanupStack::PopAndDestroy(content);
     return KErrNone;
     }
 
--- a/drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis/50_MM_DRMCAF.pkg	Tue Sep 28 14:08:58 2010 +0300
+++ b/drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis/50_MM_DRMCAF.pkg	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 ;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 ; All rights reserved.
 ; This component and the accompanying materials are made available
 ; under the terms of "Eclipse Public License v1.0"
@@ -34,6 +34,7 @@
 "\Epoc32\winscw\c\content.txt"-"!:\content.txt"
 "\Epoc32\winscw\c\content-noenc.odf"-"!:\content-noenc.odf"
 "\Epoc32\winscw\c\content.dcf"-"!:\content.dcf"
+"\epoc32\winscw\c\content2.dcf"-"!:\content2.dcf"
 
 
 "\Epoc32\Release\armv5\urel\DRM_CAF.dll"-"!:\sys\bin\DRM_CAF.dll"
--- a/drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis/51_drm_drmcaf.pkg	Tue Sep 28 14:08:58 2010 +0300
+++ b/drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis/51_drm_drmcaf.pkg	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 ;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 ; All rights reserved.
 ; This component and the accompanying materials are made available
 ; under the terms of "Eclipse Public License v1.0"
@@ -36,6 +36,7 @@
 "\epoc32\winscw\c\content.txt"-"!:\content.txt"
 "\epoc32\winscw\c\content-noenc.odf"-"!:\content-noenc.odf"
 "\epoc32\winscw\c\content.dcf"-"!:\content.dcf"
+"\epoc32\winscw\c\content2.dcf"-"!:\content2.dcf"
 
 
 "\epoc32\release\armv5\urel\drm_caf.dll"-"!:\sys\bin\drm_caf.dll"
--- a/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1066,8 +1066,9 @@
             case EContentVendor:
                 if (dcf1 != NULL)
                     {
-                    TRAP(err, dcf1->GetHeaderL(KContentVendor, ptr));
-                    if (ptr.Length() > 0 && err == KErrNone)
+                    TInt val = KErrNone;
+                    TRAP(err, val = dcf1->GetHeaderL(KContentVendor, ptr));
+                    if (ptr.Length() > 0 && err == KErrNone && val == KErrNone)
                         {
                         TRAP(err, b = CnvUtfConverter::ConvertToUnicodeFromUtf8L(ptr));
                         }
--- a/omadrm/drmengine/agentv2/src/Oma2AgentContent.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/agentv2/src/Oma2AgentContent.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -276,7 +276,9 @@
                 part = CEmbeddedObject::NewL(*id, *dcf2->iParts[i]->iMimeType,
                     EContentObject);
                 CleanupStack::PopAndDestroy(id);
+                CleanupStack::PushL(part);
                 aArray.AppendL(part);
+                CleanupStack::Pop(part);
                 }
             }
         else
@@ -287,7 +289,9 @@
             part = CEmbeddedObject::NewL(*id, *iDcf->iMimeType,
                 EContentObject);
             CleanupStack::PopAndDestroy(id);
+            CleanupStack::PushL(part);
             aArray.AppendL(part);
+            CleanupStack::Pop(part);
             }
         }
     }
--- a/omadrm/drmengine/agentv2/src/Oma2AgentRightsManager.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/agentv2/src/Oma2AgentRightsManager.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -332,7 +332,9 @@
         CleanupStack::PushL(entry);
         path = CVirtualPath::NewL(TVirtualPathPtr(entry->FileName(),
             KDefaultContentObject));
+        CleanupStack::PushL(path);
         aArray.AppendL(path);
+        CleanupStack::Pop(path);
         CleanupStack::PopAndDestroy(); // entry
         entry = rep->NextL();
         }
--- a/omadrm/drmengine/dcf/src/Oma1Dcf.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/dcf/src/Oma1Dcf.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -304,7 +304,7 @@
     TInt fieldLength = 0;
     TBuf8<10> lengthFields;
     TUint32 length;
-    TInt size;
+    TInt size = 0;
 
     iFile.Size(size);
     if (size<3)
--- a/omadrm/drmengine/dcf/src/Oma2Dcf.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/dcf/src/Oma2Dcf.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -307,7 +307,7 @@
 void COma2Dcf::ReadPartsL( void )
     {
     TBuf8<KBrandingSize> buffer;
-    TInt size;
+    TInt size = 0;
     TUint32 type;
     TInt offset;
     TInt headerSize;
--- a/omadrm/drmengine/dcfrepository/client/src/DcfRepCli.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/dcfrepository/client/src/DcfRepCli.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -201,9 +201,9 @@
 
     TInt error = StartServer();
 
-    if (KErrNone == error)
+    if ( !error || error == KErrAlreadyExists )
         {
-
+        error = KErrNone;
         error = CreateSession(KDcfRepSrvName,
                               Version(),
                               KDefaultMessageSlots);
--- a/omadrm/drmengine/dcfrepository/server/src/DcfRepSrv.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/dcfrepository/server/src/DcfRepSrv.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -726,7 +726,6 @@
                     {
                     aType = ENoDcf;
                     }
-
                 }
             break;
         case EStateSetTtid:
@@ -1053,6 +1052,11 @@
     TRAPD(r,WriteL(_L8("CompleteScanning")));
 #endif
 
+    if ( iScan->IsActive() )
+        {
+        iScan->Cancel();
+        }
+
     for (TInt i = 0 ; i<iMessageList.Count() ; i++ )
         {
         if ( iMessageList[i] && !(iMessageList[i]->IsNull()) )
--- a/omadrm/drmengine/dcfrepository/server/src/FileScan.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/dcfrepository/server/src/FileScan.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -121,6 +121,8 @@
 void CFileScan::ConstructL()
     {
     TInt err = 0;
+    CActiveScheduler::Add( this );
+
     if ( !iFs )
         {
         err = KErrArgument;
@@ -150,6 +152,7 @@
 // Destructor
 CFileScan::~CFileScan()
     {
+    Deque();
     CleanInternal();
     iServer = NULL;
     iFs = NULL;
@@ -196,8 +199,8 @@
 //
 void CFileScan::RunL()
     {
-    TInt err = KErrNone;
-    if ( iSearching && iServer->State()!=EStateIdle )
+    TInt err (iStatus.Int());
+    if ( !err && iSearching && iServer->State()!=EStateIdle )
         {
         err = SearchNext();
         if ( err == KErrCancel )
@@ -206,22 +209,29 @@
             }
         if ( !err )
             {
-            SetActive();
-            TRequestStatus* status = &iStatus;
-            User::RequestComplete( status , err );
+            if (iServer->State() != EStateIdle)
+                {
+                if (iSearching)
+                    {
+                    SetActive();
+                    TRequestStatus* status = &iStatus;
+                    User::RequestComplete(status, err);
+                    }
+                else
+                    {
+                    iServer->CompleteScanning(err);
+                    }
+                }
+            else
+                {
+                CleanInternal();
+                }
             }
         }
-    else
-        {
-        CleanInternal();
-        iServer->CompleteScanning(err);
-        Deque();
-        }
     if ( err )
         {
         CleanInternal();
         iServer->CompleteScanning(err);
-        Deque();
         }
     }
 
@@ -237,18 +247,19 @@
     {
     TInt err = KErrNone;
 
-    iServer = aServer;
-    CActiveScheduler::Add( this );
+    if ( IsActive() )
+        {
+        err=KErrServerBusy;
+        }
 
-    iSearching = ETrue;
-    err = SearchNext();
-    if ( err )
+    if ( !err )
         {
-        return err;
+        iServer = aServer;
+        iSearching = ETrue;
+        SetActive();
+        TRequestStatus* status = &iStatus;
+        User::RequestComplete( status , KErrNone );
         }
-    SetActive();
-    TRequestStatus* status = &iStatus;
-    User::RequestComplete( status , KErrNone );
     return err;
     }
 
--- a/omadrm/drmengine/dm/src/Oma1DcfCreator.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/dm/src/Oma1DcfCreator.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002, 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -82,10 +82,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C COma1DcfCreator* COma1DcfCreator::NewL()
     {
-    COma1DcfCreator* self = new COma1DcfCreator();
-
-    User::LeaveIfNull(self);
-
+    COma1DcfCreator* self = new (ELeave) COma1DcfCreator();
     CleanupStack::PushL(self);
     self->ConstructL();
     CleanupStack::Pop();
--- a/omadrm/drmengine/notifier/src/DRMNotifierSession.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/notifier/src/DRMNotifierSession.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -355,7 +355,9 @@
     content->iContentID = NULL;
     content->iEventType = eventType;
 
+    CleanupStack::PushL( content );
     iContentIDList.AppendL ( content );
+    CleanupStack::Pop( content );
 
     aMessage.Complete( KErrNone );
     }
@@ -423,7 +425,9 @@
     content->iContentID = contentID;
     content->iEventType = eventType;
 
+    CleanupStack::PushL( content );
     iContentIDList.AppendL ( content );
+    CleanupStack::Pop( content );
 
     CleanupStack::Pop();
     aMessage.Complete( KErrNone );
--- a/omadrm/drmengine/ro/src/DrmRights.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/ro/src/DrmRights.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -896,8 +896,6 @@
 
     if (noRights)
         {
-        delete constraint;
-        constraint = NULL;
         aExpiration = EExpiredRights;
         return ENoRights;
         }
--- a/omadrm/drmengine/roap/src/JoinDomainRespParser.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/roap/src/JoinDomainRespParser.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -96,6 +96,7 @@
                 iResponse->iDomainKeyIDs.AppendL(buffer);
                 CleanupStack::Pop();
                 }
+            break;
         case EExtensionState:
             buffer = aParser.GetAttributeValueL(aAttributes, KType );
             if(buffer != NULL)
@@ -106,7 +107,7 @@
                     }
                 delete buffer;
                 }
-        break;
+            break;
         }
     }
 
@@ -207,15 +208,4 @@
         }
     }
 
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// ?function_name implements...
-// ?implementation_description.
-// Returns: ?value_1: ?description
-//          ?value_n: ?description
-//                    ?description
-// -----------------------------------------------------------------------------
-//
-
 //  End of File  
--- a/omadrm/drmengine/roapstorage/src/DRMDomainContext.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/roapstorage/src/DRMDomainContext.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -442,8 +442,14 @@
         // Read the ContentID
         dataPart = HBufC8::NewL( aStream, KMaxUrlLength );
 
+        // Put dataPart to cleanup stack
+        CleanupStack::PushL( dataPart );
+        
         // assign the new content id
         iDomainKeys.AppendL( dataPart );
+        
+        // Pop dataPart from cleanup stack
+        CleanupStack::Pop( dataPart );
         }
 
     // Read the rights issuer ID
--- a/omadrm/drmengine/roapstorage/src/DRMRIContext.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/roapstorage/src/DRMRIContext.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 - 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004 - 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -750,9 +750,15 @@
         {
         // Read the certificate
         dataPart = HBufC8::NewL( aStream, KMaxCertificateLength );
-
+        
+        // Put dataPart to cleanup stack
+        CleanupStack::PushL( dataPart );
+        
         // assign the certificate
         iOcspResponse.AppendL( dataPart );
+        
+        // Pop dataPart from cleanup stack
+        CleanupStack::Pop( dataPart );
         }
 
     // certificate caching indication
--- a/omadrm/drmengine/server/src/DRMRightsData.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/server/src/DRMRightsData.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -101,8 +101,9 @@
                                         RFs& aFileServer )
     {
     CDRMCommonData* common = CDRMCommonData::NewL();
-
+    CleanupStack::PushL( common );
     CDRMRightsData* self = new( ELeave ) CDRMRightsData( common, aFileServer );
+    CleanupStack::Pop( common );
     CleanupStack::PushL( self );
     self->ConstructL( aRightsFile );
 
--- a/omadrm/drmengine/server/src/DRMRightsServer.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/server/src/DRMRightsServer.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1466,7 +1466,7 @@
     HBufC8* k = NULL;
     RFs fs;
     RFile file;
-    TInt size;
+    TInt size = 0;
     RPointerArray<CDRMRights> rights;
     CDir* dir;
     TFileName name;
--- a/omadrm/drmengine/server/src/drmparentstorage.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/server/src/drmparentstorage.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -17,6 +17,7 @@
 
 
 // INCLUDE FILES
+#include <e32def.h>
 #include "drmparentstorage.h"
 #include "DrmPermission.h"
 #include "drmlog.h"
@@ -185,7 +186,8 @@
     {
     TInt pos;
 
-    iParentIDs->FindIsq( aCID, pos );
+    TInt error = iParentIDs->FindIsq( aCID, pos );
+    __ASSERT_ALWAYS( !error && pos >= 0, User::Invariant() );
     return *( iParents[ pos ] );
     }
 
--- a/omadrm/drmengine/server/src/drmrightsdb.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/server/src/drmrightsdb.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -2365,8 +2365,6 @@
 
     CleanupStack::PopAndDestroy(); // result
 
-    ptr = const_cast<TUint8*>(buffer.Ptr());
-
     // UDT public key encrypted Rights Database Serial Number 256 bytes
     // UDT public key encrypted Rights Database Encryption Key 256 bytes
     // ----------------------------------------------------------
--- a/omadrm/drmengine/utils/src/dbwatcher.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/utils/src/dbwatcher.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -89,7 +89,9 @@
 CDbWatcher* CDbWatcher::NewL( MWatcherObserver& aObserver )
     {
     CDbWatcher* self = new( ELeave) CDbWatcher;
+    CleanupStack::PushL( self );
     self->ConstructL( aObserver );
+    CleanupStack::Pop( self );
     return self;
     }
 
--- a/omadrm/drmengine/utils/src/dirwatcher.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/utils/src/dirwatcher.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -41,7 +41,9 @@
 CDirWatcher* CDirWatcher::NewL( MWatcherObserver& aObserver, RFs& aFs, const TDesC& aDir )
     {
     CDirWatcher* self = new( ELeave ) CDirWatcher( aObserver, aFs );
+    CleanupStack::PushL( self );
     self->ConstructL( aDir );
+    CleanupStack::Pop( self );
     return self;
     }
 
--- a/omadrm/drmengine/utils/src/procwatcher.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmengine/utils/src/procwatcher.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -38,8 +38,10 @@
 
 CProcWatcher* CProcWatcher::NewL( MWatcherObserver& aObserver, const TDesC& aProcess, const TDesC& aFile )
     {
-    CProcWatcher* self = new( ELeave ) CProcWatcher( aObserver);
+    CProcWatcher* self = new( ELeave ) CProcWatcher( aObserver );
+    CleanupStack::PushL( self );
     self->ConstructL( aProcess, aFile );
+    CleanupStack::Pop( self );
     return self;
     }
 
--- a/omadrm/drmhelper/drmhelperserver/src/IdleObserver.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmhelper/drmhelperserver/src/IdleObserver.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -21,7 +21,7 @@
 #include    <e32base.h>
 #include    <e32std.h>
 #include    <f32file.h>
-#include    <activeidle2domainpskeys.h>
+#include    <homescreendomainpskeys.h>
 #include    <e32property.h> //for RProperty
 #include    "IdleObserver.h"
 #include    "DRMHelperServer.h"
@@ -134,7 +134,7 @@
 #ifdef _DRM_TESTING
     CreateLogL(); //test
 #endif
-    User::LeaveIfError( iProperty.Attach( KPSUidAiInformation, KActiveIdleState ) );
+    User::LeaveIfError( iProperty.Attach( KHsCategoryUid, KHsCategoryStateKey ) );
     }
 
 // -----------------------------------------------------------------------------
@@ -200,15 +200,15 @@
 #endif
 
     // Resubscribe before processing new value to prevent missing updates
-    TInt idleStauts = 0;
+    TInt idleStatus = 0;
     TInt err( iStatus.Int() );
     if (err == KErrNone)
         {
         StartL();
         User::LeaveIfError( iProperty.Get(
-                KPSUidAiInformation,
-                KActiveIdleState, idleStauts ) );
-        if ( idleStauts == EPSAiForeground )
+                KHsCategoryUid,
+                KHsCategoryStateKey, idleStatus ) );
+        if ( idleStatus == EHomeScreenApplicationForeground )
             {
             iServer.HandleIdleL();
             }
--- a/omadrm/drmhelper/src/RDRMHelper.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmhelper/src/RDRMHelper.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -67,8 +67,9 @@
     {
     TInt error = StartServer();
     TRACE2( "RDRMHelper::Connect() StartServer(): error: %d", error );
-    if ( !error )
+    if ( !error || error == KErrAlreadyExists )
         {
+        error = KErrNone;    
         error = CreateSession( KDRMHelperServerName, Version(),
             KDefaultMessageSlots );
         TRACE2( "RDRMHelper::Connect() CreateSession(): error: %d", error );
--- a/omadrm/drmhelper/src/drmhelper.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmhelper/src/drmhelper.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -1476,8 +1476,9 @@
     TUint32 rejectReason(0);
 
     User::LeaveIfError( rightsClient.Connect() );
-    rightsClient.CheckRights( aIntent, aContentUri, rejectReason );
+    TInt r = rightsClient.CheckRights( aIntent, aContentUri, rejectReason );
     rightsClient.Close();
+    User::LeaveIfError( r );
 
     return rejectReason;
     }
@@ -1682,6 +1683,7 @@
     RFile& aFile,
     HBufC8*& aEmbeddedPreviewUri )
     {
+    
     ContentAccess::CData* content( NULL );
     TPtr ptr( NULL,0 );
     TInt previewType = 0;
--- a/omadrm/drmlicensemanager/src/DRMLicenseManager.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmlicensemanager/src/DRMLicenseManager.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -214,7 +214,7 @@
         }
     }
 
-LOCAL_C TBool GetRightsIssuerL(const TFileName aFileName, HBufC8*& aRightsIssuerURL)
+LOCAL_C TBool GetRightsIssuerL(const TFileName& aFileName, HBufC8*& aRightsIssuerURL)
     {
     TInt err(KErrNotFound);
 
@@ -236,7 +236,7 @@
     return EFalse;
     }
 
-LOCAL_C TBool GetRightsIssuerL(RFile aFileName, HBufC8*& aRightsIssuerURL)
+LOCAL_C TBool GetRightsIssuerL(RFile& aFileName, HBufC8*& aRightsIssuerURL)
     {
     TInt err(KErrNotFound);
 
--- a/omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -308,9 +308,10 @@
 //
 LOCAL_C void DoResetAndDestroy( TAny* aPtr )
     {
-    ( reinterpret_cast< RPointerArray< CDRMRights >* >( aPtr ) )->ResetAndDestroy();
-    delete aPtr;
-    aPtr = NULL;
+    RPointerArray< CDRMRights >* arr = reinterpret_cast< RPointerArray< CDRMRights >* >( aPtr );
+    arr->ResetAndDestroy();
+    delete arr;
+    arr = NULL;
     }
 
 // ----------------------------------------------------------------------------
--- a/omadrm/drmplugins/drmromtm/uiData/src/RoMtmDat.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/omadrm/drmplugins/drmromtm/uiData/src/RoMtmDat.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -558,7 +558,6 @@
 // ---------------------------------------------------------
 void CRightsObjectMtmUiData::CreateSkinnedBitmapsL( TInt aNumZoomStates )
     {
-    MAknsSkinInstance* skins = AknsUtils::SkinInstance();
     TAknsItemID id;
     //CFbsBitmap* bitmap;
     //CFbsBitmap* bitmapMask;
--- a/wmdrm/camese/wmdrmdladefaulthttpplugin/src/wmdrmdladefaulthttpmanager.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/wmdrm/camese/wmdrmdladefaulthttpplugin/src/wmdrmdladefaulthttpmanager.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -630,7 +630,6 @@
     for ( TInt i = 0; i < nofheaders; i++ )
         {
         TInt field = iHdrFields[i];
-        const TDesC8& fieldStr = HTTP_STRING( field ).DesC();
         HBufC8* pValue = iHdrValues[i];
         SetHeaderL( hdr, field, *pValue );
         }
--- a/wmdrm/wmdrmengine/wmdrmfileserver/server/src/wmdrmfileserversession.cpp	Tue Sep 28 14:08:58 2010 +0300
+++ b/wmdrm/wmdrmengine/wmdrmfileserver/server/src/wmdrmfileserversession.cpp	Thu Oct 14 13:45:23 2010 +0300
@@ -312,7 +312,7 @@
 TInt CWmDrmFileServerSession::SizeL( const RMessage2& aMessage )
     {
     TInt r = KErrNone;
-    TInt size;
+    TInt size = 0;
     
     //LOGFNR( "CWmDrmFileServerSession::SizeL", r );
     __UHEAP_MARK;