mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp
branchRCL_3
changeset 18 e257e2b6459d
parent 17 6f9f6e99a23e
child 23 e42293e811d8
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp	Tue May 25 13:14:13 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp	Wed Jun 09 10:13:45 2010 +0300
@@ -129,7 +129,6 @@
 
     PRINT1( _L( "MM MTP <> CSendObject::ConstructL DataProviderId = 0x%x" ), iFramework.DataProviderId());
 
-  
     PRINT( _L( "MM MTP <= CSendObject::ConstructL" ) );
     }
 
@@ -1035,6 +1034,7 @@
 
     TBool result( EFalse );
 
+    TParsePtrC parser( aFileName );
     if ( aFileName.Length() > 0 )
         {
         iFullPath.Zero();
@@ -1044,7 +1044,6 @@
         // Only add extension for alb to pass winlogo test cases
         TInt length = iFullPath.Length() + aFileName.Length();
 
-        TParsePtrC parser( aFileName );
         TBool isAlbWithoutExt =
             ( ( iObjectFormat == EMTPFormatCodeAbstractAudioAlbum ) && ( !parser.ExtPresent() ) );
         if ( isAlbWithoutExt )
@@ -1062,8 +1061,7 @@
 
     if ( result && ( iObjectFormat != MmMtpDpUtility::FormatFromFilename( iFullPath ) ) )
         {
-        TParsePtrC file( aFileName );
-        if ( ( iObjectFormat == EMTPFormatCode3GPContainer ) && (file.Ext().CompareF( KTxtExtensionODF ) == 0))
+        if ( ( iObjectFormat == EMTPFormatCode3GPContainer ) && ( parser.Ext().CompareF( KTxtExtensionODF ) == 0))
             {
             PRINT( _L( "MM MTP <> might happen if function is called before physical file arrives" ) );
             // might happen if function is called before physical file arrives
@@ -1267,6 +1265,11 @@
         iDpConfig.GetWrapperL().AddDummyFileL( iFullPath );
         }
 
+    // Set subformat code to avoid MPX query for the first time to GetObjectReference,
+    // in which case references has been kept in fw.
+    if ( MmMtpDpUtility::HasReference( iObjectFormat ) )
+        iReceivedObjectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined );
+
     // add playlist to MPX DB
     TRAPD( err, AddMediaToStoreL() );