# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271253034 -10800 # Node ID 504e41245867dbb70e15d1852bfc88a56cdabccc # Parent 86979fe66c4cadd8fc37c36da8526013393247ae Revision: 201013 Kit: 201015 diff -r 86979fe66c4c -r 504e41245867 omaprovisioning/provisioning/ProvisioningEngine/Src/CWPAdapterManager.cpp --- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPAdapterManager.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPAdapterManager.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -25,7 +25,7 @@ #include "MWPContextManager.h" #include "MWPContextExtension.h" #include "ProvisioningDebug.h" - +#include // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -239,6 +239,7 @@ // Place [0] is reserved for APPID parameter, [1] for APPREF parameter // and [2] for storage id i.e. id that identifies the saved settings in its storage. RPointerArray< HBufC8 > savingInfo; + CleanupResetAndDestroy > :: PushL(savingInfo); a->GetSavingInfoL( index, savingInfo ); // If the adapter had something to tell to the other adapters... @@ -278,8 +279,8 @@ }// if }// if - savingInfo.ResetAndDestroy(); - savingInfo.Close(); + + CleanupStack :: PopAndDestroy(1); //savingInfo // Tell the adapters that all the settings have been now saved. TInt quantityOfAdapter( iAdapters->Count() ); diff -r 86979fe66c4c -r 504e41245867 policymanagement/pmdmadapter/group/pmadapter.mmp --- a/policymanagement/pmdmadapter/group/pmadapter.mmp Wed Mar 31 23:00:03 2010 +0300 +++ b/policymanagement/pmdmadapter/group/pmadapter.mmp Wed Apr 14 16:50:34 2010 +0300 @@ -53,8 +53,8 @@ LIBRARY ecom.lib LIBRARY efsrv.lib LIBRARY policyengine.lib -LIBRARY imut.lib LIBRARY centralrepository.lib +LIBRARY inetprotutil.lib LIBRARY flogger.lib #ifdef __TARM_SYMBIAN_CONVERGENCY diff -r 86979fe66c4c -r 504e41245867 policymanagement/pmdmadapter/src/pmadapter.cpp --- a/policymanagement/pmdmadapter/src/pmadapter.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/policymanagement/pmdmadapter/src/pmadapter.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -61,7 +61,7 @@ #include #include -#include +#include #include "nsmldmuri.h" #include "pmadapter.h" #include // For TImplementationProxy definition @@ -768,7 +768,7 @@ TPtr8 ptr( data->Des() ); User::LeaveIfError( file.Read( ptr ) ); - TImCodecB64 B64Coder; + TBase64 B64Coder; HBufC8 *target = HBufC8::NewLC( ( size * 6 ) / 3 ); TPtr8 targetPtr( target->Des() ); B64Coder.Encode( *data, targetPtr ); diff -r 86979fe66c4c -r 504e41245867 policymanagement/policyengine/centreptoolserver/src/RepositorySession.cpp --- a/policymanagement/policyengine/centreptoolserver/src/RepositorySession.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/policymanagement/policyengine/centreptoolserver/src/RepositorySession.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -423,8 +423,8 @@ if ( !aSettings.Count() ) { CRangeMeta * setting = CRangeMeta::NewL( aCompareValue, 0, aMask, KBackupBitMask); - aSettings.Append( setting ); - iRangeMetas.Append( setting); + aSettings.AppendL( setting ); + iRangeMetas.AppendL( setting); } } diff -r 86979fe66c4c -r 504e41245867 policymanagement/policyengine/group/PolicyEngineServer.mmp --- a/policymanagement/policyengine/group/PolicyEngineServer.mmp Wed Mar 31 23:00:03 2010 +0300 +++ b/policymanagement/policyengine/group/PolicyEngineServer.mmp Wed Apr 14 16:50:34 2010 +0300 @@ -70,12 +70,12 @@ LIBRARY x509.lib LIBRARY crypto.lib LIBRARY x500.lib -LIBRARY imut.lib LIBRARY dmutil.lib LIBRARY estor.lib LIBRARY commdb.lib LIBRARY commsdat.lib LIBRARY flogger.lib LIBRARY featmgr.lib +LIBRARY inetprotutil.lib SMPSAFE diff -r 86979fe66c4c -r 504e41245867 policymanagement/policyengine/policyengineserver/src/TrustedSession.cpp --- a/policymanagement/policyengine/policyengineserver/src/TrustedSession.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/policymanagement/policyengine/policyengineserver/src/TrustedSession.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -28,7 +28,7 @@ #include "ErrorCodes.h" #include -#include +#include @@ -244,7 +244,7 @@ TCertInfo certInfo; TPckg pck( certInfo ); - TImCodecB64 base64; + TBase64 base64; User::LeaveIfError( base64.Decode( value, pck ) ); //create suject info for it @@ -472,7 +472,7 @@ //serialize TCertInfo and decode it to base64 format TPckg pck( iSessionCertInfo); - TImCodecB64 base64; + TBase64 base64; HBufC8 * base64coded = HBufC8::NewLC( pck.Length() * 3); TPtr8 base64Ptr = base64coded->Des(); User::LeaveIfError( base64.Encode( pck, base64Ptr)); @@ -999,7 +999,7 @@ TCertInfo certInfo; TPckg pck( certInfo); - TImCodecB64 base64; + TBase64 base64; User::LeaveIfError( base64.Decode( binaryCert, pck)); //create suject info for it @@ -1457,7 +1457,7 @@ } #endif //#ifdef __DEBUG //convert base64 coding to binary format - TImCodecB64 base64; + TBase64 base64; HBufC8 * base64Cert = HBufC8::NewLC( certPtr.Length()); TPtr8 base64Ptr = base64Cert->Des(); diff -r 86979fe66c4c -r 504e41245867 remotemgmt_plat/common_agent_util_and_definitions_api/inc/nsmlconstants.h --- a/remotemgmt_plat/common_agent_util_and_definitions_api/inc/nsmlconstants.h Wed Mar 31 23:00:03 2010 +0300 +++ b/remotemgmt_plat/common_agent_util_and_definitions_api/inc/nsmlconstants.h Wed Apr 14 16:50:34 2010 +0300 @@ -240,6 +240,40 @@ CleanupRPtrArrayDelete::PushL(aPtr); } +// RImplInfoPtrArray cleanup pusher +template +class CleanupRImplInfoPtrArrayDelete + { +public: + inline static void PushL(T* aPtr); +private: + static void RImplInfoPtrArrayDelete(TAny *aPtr); + }; + +template +inline void CleanupRImplInfoPtrArrayDelete::PushL(T* aPtr) + { + CleanupStack::PushL(TCleanupItem(&RImplInfoPtrArrayDelete,aPtr)); + } + +template +void CleanupRImplInfoPtrArrayDelete::RImplInfoPtrArrayDelete(TAny *aPtr) + { + if( aPtr ) + { + T* ptr = STATIC_CAST(T*,aPtr); + ptr->ResetAndDestroy(); + ptr->Close(); + } + } + +template +inline void CleanupRImplInfoPtrArrayPushL(T* aPtr) + { + CleanupRImplInfoPtrArrayDelete::PushL(aPtr); + } + + // Table names _LIT( KNSmlTableVersion, "Version" ); diff -r 86979fe66c4c -r 504e41245867 syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp --- a/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp Wed Mar 31 23:00:03 2010 +0300 +++ b/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp Wed Apr 14 16:50:34 2010 +0300 @@ -65,7 +65,6 @@ LIBRARY charconv.lib LIBRARY efsrv.lib LIBRARY estor.lib -LIBRARY imut.lib LIBRARY hash.lib LIBRARY etel.lib LIBRARY etelmm.lib @@ -77,6 +76,7 @@ LIBRARY nsmlxml.lib LIBRARY centralrepository.lib LIBRARY bafl.lib +LIBRARY inetprotutil.lib #ifdef ARMCC LIBRARY ECOM.LIB diff -r 86979fe66c4c -r 504e41245867 syncmlfw/common/syncagent/src/NSmlAgentBase.cpp --- a/syncmlfw/common/syncagent/src/NSmlAgentBase.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/syncmlfw/common/syncagent/src/NSmlAgentBase.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -20,7 +20,7 @@ #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS #include #endif -#include +#include #include #include #include @@ -121,7 +121,7 @@ // --------------------------------------------------------- HBufC8* CNSmlAgentBase::BasicCredentialL() const { - TImCodecB64 B64Coder; + TBase64 B64Coder; HBufC8* userName; NSmlUnicodeConverter::HBufC8InUTF8LC( *iSyncMLUserName, userName ); HBufC8* password; @@ -149,7 +149,7 @@ CMD5* md5 = CMD5::NewL(); CleanupStack::PushL( md5 ); - TImCodecB64 B64Coder; + TBase64 B64Coder; HBufC8* userName; if ( aServerAuth ) { @@ -1111,7 +1111,7 @@ if ( chalFormat == KNSmlAgentBase64Format ) { //decode before saving - TImCodecB64 B64Coder; + TBase64 B64Coder; B64Coder.Decode( chalNextNonce, nextNonceDecodedPtr ); } else diff -r 86979fe66c4c -r 504e41245867 syncmlfw/common/syncagent/src/nsmlauth.cpp --- a/syncmlfw/common/syncagent/src/nsmlauth.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/syncmlfw/common/syncagent/src/nsmlauth.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -17,7 +17,7 @@ -#include +#include #include #include "NSmlAuth.h" #include "nsmlcliagconstants.h" @@ -172,7 +172,7 @@ { CreateAndSaveNewNonceL(); } - TImCodecB64 B64Coder; + TBase64 B64Coder; delete iB64Nonce; iB64Nonce = NULL; iB64Nonce = HBufC8::NewL( iNonce->Length() * 2 + 1 ); @@ -269,7 +269,7 @@ HBufC8* B64Cred; if ( iFormat->Des() != KNSmlAgentBase64Format ) { - TImCodecB64 B64Coder; + TBase64 B64Coder; B64Cred = HBufC8::NewLC( iCredential->Length() * 2 + 1 ); TPtr8 B64CredPtr( B64Cred->Des() ); User::LeaveIfError( B64Coder.Encode( *iCredential, B64CredPtr ) ); diff -r 86979fe66c4c -r 504e41245867 syncmlfw/syncmlnotifier/src/SyncMLPreSyncPluginInterface.cpp --- a/syncmlfw/syncmlnotifier/src/SyncMLPreSyncPluginInterface.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/syncmlfw/syncmlnotifier/src/SyncMLPreSyncPluginInterface.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -17,6 +17,7 @@ // INCLUDE FILES +#include #include "SyncMLPreSyncPluginInterface.h" #include "CPreSyncPlugin.h" @@ -97,11 +98,14 @@ CPreSyncPlugin* syncPlugin = NULL; CPreSyncPlugin* defaultSyncPlugin = NULL; + CleanupRImplInfoPtrArrayPushL( &infoArray ); + // Get list of all implementations TRAPD(error, ListAllImplementationsL( infoArray )); if (error != KErrNone) { + CleanupStack::PopAndDestroy( &infoArray ); return NULL; } @@ -137,18 +141,20 @@ } } - infoArray.ResetAndDestroy(); + CleanupStack::PopAndDestroy( &infoArray ); if(bHandleSync == true) { //delete defaultSyncPlugin; if(defaultSyncPlugin != NULL) { - CleanupStack::PopAndDestroy(defaultSyncPlugin); + delete defaultSyncPlugin; } + CleanupStack::PushL(syncPlugin); return syncPlugin; } else - { + { + CleanupStack::PushL(defaultSyncPlugin); return defaultSyncPlugin; } } @@ -171,7 +177,6 @@ // REComSession CPreSyncPlugin *preSyncPlugin= NULL; preSyncPlugin = CPreSyncPlugin::NewL(aImpUid); - CleanupStack::PushL(preSyncPlugin); return preSyncPlugin; /* TAny* implementation = REComSession::CreateImplementationL ( aImpUid, diff -r 86979fe66c4c -r 504e41245867 terminalsecurity/tcadapter/src/tcadapter.cpp --- a/terminalsecurity/tcadapter/src/tcadapter.cpp Wed Mar 31 23:00:03 2010 +0300 +++ b/terminalsecurity/tcadapter/src/tcadapter.cpp Wed Apr 14 16:50:34 2010 +0300 @@ -111,7 +111,6 @@ #endif #include #include -#include // s60 // tarm #include