# HG changeset patch # User hgs # Date 1281327551 -28800 # Node ID d9d8313203aff1f731a25852fdb9ce009cf38d80 # Parent c4c427c00f31c20fc787764c436b82ff88cff793 201031_04 diff -r c4c427c00f31 -r d9d8313203af localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp --- a/localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -855,20 +855,6 @@ FTRACE(FPrint( _L("CDunAtCmdHandler::ExtractLineFromInputBuffer() (more needed) complete") )); return ETrue; } - // As a last step adjust the possible multiple IsDelimiterCharacter() - // characters and set length of iLineBuffer. Leave iEndIndex untouched. - lineLength = iLineBuffer.Length(); - for ( TInt i=lineLength-1; i>=0; i-- ) - { - TChar character = iLineBuffer[i]; - if ( !IsDelimiterCharacter(character) ) - { - iLineBuffer.SetLength( i + 1 ); - FTRACE(FPrint( _L("CDunAtCmdHandler::ExtractLineFromInputBuffer() after (%d bytes):"), iLineBuffer.Length() )); - FTRACE(FPrintRaw(iLineBuffer) ); - break; - } - } FTRACE(FPrint( _L("CDunAtCmdHandler::ExtractLineFromInputBuffer() (line found) complete") )); return EFalse; } diff -r c4c427c00f31 -r d9d8313203af mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -120,8 +120,10 @@ } //Define RProperty of new pictures for status data provider + RProcess process; + TUid tSid = process.SecureId(); _LIT_SECURITY_POLICY_PASS(KAllowReadAll); - TInt error = RProperty::Define(TUid::Uid(KMTPServerUID), KMTPNewPicKey, RProperty::EInt, KAllowReadAll, KAllowReadAll); + TInt error = RProperty::Define(tSid, KMTPNewPicKey, RProperty::EInt, KAllowReadAll, KAllowReadAll); if (error != KErrNone && error != KErrAlreadyExists) { __FLOG_1(_L8("CMTPImageDataProvider::ConstructL - RProperty define error:%d"), error); diff -r c4c427c00f31 -r d9d8313203af mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -68,7 +68,9 @@ CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache* CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::NewL() { CMTPImagePropertiesCache* self = new(ELeave) CMTPImagePropertiesCache(KElements, ENumProperties); + CleanupStack::PushL(self); self->ConstructL(); + CleanupStack::Pop(self); return self; } diff -r c4c427c00f31 -r d9d8313203af mtpdataproviders/mtppictbridgedp/inc/s60dependency.h --- a/mtpdataproviders/mtppictbridgedp/inc/s60dependency.h Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpdataproviders/mtppictbridgedp/inc/s60dependency.h Mon Aug 09 12:19:11 2010 +0800 @@ -24,7 +24,7 @@ #include -#include +#include #include #include #include diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -388,7 +388,9 @@ if(extnpluginMap ) { + CleanupStack::PushL(extnpluginMap); iExtnPluginMapArray.AppendL(extnpluginMap); + CleanupStack::Pop(extnpluginMap); } } diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -196,7 +196,7 @@ { //E: is set as logically removable after eMMC image updated //So here we need to deal with this case to set it as FixedRam - if(iDriveInfo.iDriveAtt & KDriveAttInternal) + if(iDriveInfo.iDriveAtt & KDriveAttLogicallyRemovable) { __FLOG(_L8("removable but internal drive, set as Fixed RAM")); storageType = EMTPStorageFixedRAM; diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -130,7 +130,9 @@ } __ASSERT_DEBUG(chunk, User::Invariant()); + CleanupStack::PushL(chunk); ChunkAppendL(*chunk); + CleanupStack::Pop(chunk); } } } diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -95,44 +95,71 @@ CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewLC( EMTPFormatCodeAssociation ,interDesc ); //EMTPObjectPropCodeStorageID - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeStorageID) ); + CMTPTypeObjectPropDesc* storageId = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeStorageID); + frmCap->AppendL(storageId); + CleanupStack::Pop(storageId); //EMTPObjectPropCodeObjectFormat - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectFormat) ); + CMTPTypeObjectPropDesc* objFormat = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectFormat); + frmCap->AppendL(objFormat); + CleanupStack::Pop(objFormat); //EMTPObjectPropCodeProtectionStatus - frmCap->AppendL( ServiceProtectionStatusL() ); + CMTPTypeObjectPropDesc* protectionStatus = ServiceProtectionStatusL(); + CleanupStack::PushL(protectionStatus); + frmCap->AppendL(protectionStatus); + CleanupStack::Pop(protectionStatus); //EMTPObjectPropCodeAssociationType - frmCap->AppendL( ServiceAssociationTypeL() ); + CMTPTypeObjectPropDesc* associationType = ServiceAssociationTypeL(); + CleanupStack::PushL(associationType); + frmCap->AppendL(associationType); + CleanupStack::Pop(associationType); //EMTPObjectPropCodeAssociationDesc - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeAssociationDesc) ); + CMTPTypeObjectPropDesc* associationDesc = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeAssociationDesc); + frmCap->AppendL(associationDesc); + CleanupStack::Pop(associationDesc); //EMTPObjectPropCodeObjectSize - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectSize) ); + CMTPTypeObjectPropDesc* objSize = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectSize); + frmCap->AppendL(objSize); + CleanupStack::Pop(objSize); //EMTPObjectPropCodeObjectFileName _LIT(KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?"); - CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); - frmCap->AppendL(CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName, - CMTPTypeObjectPropDesc::ERegularExpressionForm, form)); + CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); + CMTPTypeObjectPropDesc* objFileName = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeObjectFileName, + CMTPTypeObjectPropDesc::ERegularExpressionForm, form); + frmCap->AppendL(objFileName); + CleanupStack::Pop(objFileName); CleanupStack::PopAndDestroy(form ); //EMTPObjectPropCodeDateModified - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeDateModified) ); + CMTPTypeObjectPropDesc* dateModified = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeDateModified); + frmCap->AppendL(dateModified); + CleanupStack::Pop(dateModified); //EMTPObjectPropCodeParentObject - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeParentObject) ); + CMTPTypeObjectPropDesc* parentobj = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeParentObject); + frmCap->AppendL(parentobj); + CleanupStack::Pop(parentobj); //EMTPObjectPropCodePersistentUniqueObjectIdentifier - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodePersistentUniqueObjectIdentifier) ); + CMTPTypeObjectPropDesc* objectIdentifier = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodePersistentUniqueObjectIdentifier); + frmCap->AppendL(objectIdentifier); + CleanupStack::Pop(objectIdentifier); //EMTPObjectPropCodeName - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeName)); + CMTPTypeObjectPropDesc* name = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeName); + frmCap->AppendL(name); + CleanupStack::Pop(name); //EMTPObjectPropCodeNonConsumable - frmCap->AppendL(ServiceNonConsumableL() ); + CMTPTypeObjectPropDesc* nonConsumable = ServiceNonConsumableL(); + CleanupStack::PushL(nonConsumable); + frmCap->AppendL(nonConsumable); + CleanupStack::Pop(nonConsumable); iCapabilityList->AppendL(frmCap); CleanupStack::Pop(frmCap); @@ -146,38 +173,60 @@ CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewLC( aFormatCode ,interDesc ); //EMTPObjectPropCodeStorageID - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeStorageID) ); + CMTPTypeObjectPropDesc* storageID = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeStorageID); + frmCap->AppendL(storageID); + CleanupStack::Pop(storageID); //EMTPObjectPropCodeObjectFormat - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectFormat) ); + CMTPTypeObjectPropDesc* objectFormat = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectFormat); + frmCap->AppendL(objectFormat); + CleanupStack::Pop(objectFormat); //EMTPObjectPropCodeProtectionStatus - frmCap->AppendL( ServiceProtectionStatusL() ); + CMTPTypeObjectPropDesc* protectionStatus = ServiceProtectionStatusL(); + CleanupStack::PushL(protectionStatus); + frmCap->AppendL(protectionStatus); + CleanupStack::Pop(protectionStatus); //EMTPObjectPropCodeObjectSize - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectSize) ); + CMTPTypeObjectPropDesc* objSize = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectSize); + frmCap->AppendL(objSize); + CleanupStack::Pop(objSize); //EMTPObjectPropCodeObjectFileName _LIT(KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?"); - CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); - frmCap->AppendL(CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName, - CMTPTypeObjectPropDesc::ERegularExpressionForm, form)); + CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); + CMTPTypeObjectPropDesc* objFileName = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeObjectFileName, + CMTPTypeObjectPropDesc::ERegularExpressionForm, form); + frmCap->AppendL(objFileName); + CleanupStack::Pop(objFileName); CleanupStack::PopAndDestroy(form ); //EMTPObjectPropCodeDateModified - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeDateModified) ); + CMTPTypeObjectPropDesc* dateModified = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeDateModified); + frmCap->AppendL(dateModified); + CleanupStack::Pop(dateModified); //EMTPObjectPropCodeParentObject - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeParentObject) ); + CMTPTypeObjectPropDesc* parentObject = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeParentObject); + frmCap->AppendL(parentObject); + CleanupStack::Pop(parentObject); //EMTPObjectPropCodePersistentUniqueObjectIdentifier - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodePersistentUniqueObjectIdentifier) ); + CMTPTypeObjectPropDesc* objectIdentifier = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodePersistentUniqueObjectIdentifier); + frmCap->AppendL(objectIdentifier); + CleanupStack::Pop(objectIdentifier); //EMTPObjectPropCodeName - frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeName)); + CMTPTypeObjectPropDesc* name = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeName); + frmCap->AppendL(name); + CleanupStack::Pop(name); //EMTPObjectPropCodeNonConsumable - frmCap->AppendL(ServiceNonConsumableL() ); + CMTPTypeObjectPropDesc* nonConsumable = ServiceNonConsumableL(); + CleanupStack::PushL(nonConsumable); + frmCap->AppendL(nonConsumable); + CleanupStack::Pop(nonConsumable); iCapabilityList->AppendL(frmCap); CleanupStack::Pop(frmCap); diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h --- a/mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h Mon Aug 09 12:19:11 2010 +0800 @@ -368,7 +368,7 @@ EMTPRespCodeCaptureAlreadyTerminated = 0x2018, EMTPRespCodeDeviceBusy = 0x2019, EMTPRespCodeInvalidParentObject = 0x201A, - EMTPRespCodeInvalidDeviEMTPRespCodecePropFormat = 0x201B, + EMTPRespCodeInvalidDevicePropFormat = 0x201B, EMTPRespCodeInvalidDevicePropValue = 0x201C, EMTPRespCodeInvalidParameter = 0x201D, EMTPRespCodeSessionAlreadyOpen = 0x201E, diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp --- a/mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -128,7 +128,9 @@ } __ASSERT_DEBUG(chunk, User::Invariant()); + CleanupStack::PushL(chunk); ChunkAppendL(*chunk); + CleanupStack::Pop(chunk); } } } diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp --- a/mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -115,7 +115,9 @@ break; } __ASSERT_DEBUG(chunk, User::Invariant()); + CleanupStack::PushL(chunk); ChunkAppendL(*chunk); + CleanupStack::Pop(chunk); } } } diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/inc/cmtpconnection.h --- a/mtpfws/mtpfw/inc/cmtpconnection.h Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/inc/cmtpconnection.h Mon Aug 09 12:19:11 2010 +0800 @@ -147,6 +147,7 @@ void EnqueueEvent(CMTPEventLink* aLink); void DequeueEvent(CMTPEventLink* aLink); + void DequeueAllEvents(); /** * This method define and attach the property for publishing connection state diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/inc/mtpcommonconst.h --- a/mtpfws/mtpfw/inc/mtpcommonconst.h Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/inc/mtpcommonconst.h Mon Aug 09 12:19:11 2010 +0800 @@ -22,7 +22,7 @@ #define MTPCOMMONCONST_H #ifdef __SERIES60_ -#include +#include #else //Following is copied from 'UiklafInternalCRKeys.h', which is //exported from S60 sdk, in Symbian CBR, this file does not exist. diff -r c4c427c00f31 -r d9d8313203af mtpfws/mtpfw/src/cmtpconnection.cpp --- a/mtpfws/mtpfw/src/cmtpconnection.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtpfws/mtpfw/src/cmtpconnection.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -82,17 +82,9 @@ __FLOG(_L8("~CMTPConnection - Entry")); CloseAllSessions(); - // Remove any events not associated - // with a session - TSglQueIter iter(iEventQ); - iter.SetToFirst(); - CMTPEventLink* link = NULL; - - while ((link = iter++) != NULL) - { - delete link; - } - + //remove all events + DequeueAllEvents(); + iSessions.ResetAndDestroy(); if (iTransportConnection != NULL) @@ -667,9 +659,16 @@ DequeueEvent(iEventQ.First()); if (iPendingEventCount > 0) { - // Forward the event to the transport connection layer. - __FLOG(_L8("Sending queued event")); - iTransportConnection->SendEventL(iEventQ.First()->iEvent); + if (NULL != iTransportConnection) + { + // Forward the event to the transport connection layer. + __FLOG(_L8("Sending queued event")); + iTransportConnection->SendEventL(iEventQ.First()->iEvent); + } + else + { + DequeueAllEvents(); + } } __FLOG(_L8("SendEventCompleteL - Exit")); @@ -1046,6 +1045,19 @@ __FLOG(_L8("RemoveEventsForSession - Exit")); } +void CMTPConnection::DequeueAllEvents() + { + TSglQueIter iter(iEventQ); + iter.SetToFirst(); + CMTPEventLink* link = NULL; + + while ((link = iter++) != NULL) + { + delete link; + } + iPendingEventCount = 0; + } + void CMTPConnection::DequeueEvent(CMTPEventLink* aLink) { iEventQ.Remove(*aLink); diff -r c4c427c00f31 -r d9d8313203af mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp --- a/mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp Fri Jul 23 18:35:35 2010 +0800 +++ b/mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp Mon Aug 09 12:19:11 2010 +0800 @@ -80,7 +80,9 @@ __FLOG( _L8("+ConstructL") ); CMTPBluetoothController* btController = CMTPBluetoothController::NewL( *this ); + CleanupStack::PushL(btController); iMTPControllers.AppendL( btController ); + CleanupStack::Pop(btController); __FLOG( _L8("-ConstructL") ); } diff -r c4c427c00f31 -r d9d8313203af package_definition.xml --- a/package_definition.xml Fri Jul 23 18:35:35 2010 +0800 +++ b/package_definition.xml Mon Aug 09 12:19:11 2010 +0800 @@ -1,56 +1,103 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c4c427c00f31 -r d9d8313203af package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Mon Aug 09 12:19:11 2010 +0800 @@ -0,0 +1,1 @@ +