mmsengine/mmscodec/src/mmsencode.cpp
branchRCL_3
changeset 17 caea42e26caa
parent 0 72b543305e3a
child 57 ebe688cedc25
equal deleted inserted replaced
9:1d7827e39b52 17:caea42e26caa
   867     TMmsLogger::Log( _L("CMmsEncode::EncodeHeadersChunkedL:: target encoding type: %d"), iTargetEncodingType );
   867     TMmsLogger::Log( _L("CMmsEncode::EncodeHeadersChunkedL:: target encoding type: %d"), iTargetEncodingType );
   868 #endif /* _NO_MMSS_LOGGING_ */
   868 #endif /* _NO_MMSS_LOGGING_ */
   869 
   869 
   870     if( iTargetEncodingType != 0 )
   870     if( iTargetEncodingType != 0 )
   871         {
   871         {
       
   872 #ifndef _NO_MMSS_LOGGING_
   872         TRAPD( err, PreProcessAttachmentDataL() );
   873         TRAPD( err, PreProcessAttachmentDataL() );
   873 
       
   874 #ifndef _NO_MMSS_LOGGING_
       
   875     /* if any error, korean specific encoding failed, But this should not stop from sending MMS using
   874     /* if any error, korean specific encoding failed, But this should not stop from sending MMS using
   876      * existing default encoding. Hence just log the error and continue in any case
   875      * existing default encoding. Hence just log the error and continue in any case
   877      */
   876      */
   878         if( err != KErrNone )
   877         if( err != KErrNone )
   879             {
   878             {
   880             TMmsLogger::Log( _L("CMmsEncode::EncodeHeadersChunkedL:: PreProcessAttachmentDataL error: %d"), err );
   879             TMmsLogger::Log( _L("CMmsEncode::EncodeHeadersChunkedL:: PreProcessAttachmentDataL error: %d"), err );
   881             }
   880             }
       
   881 #else
       
   882 				TRAP_IGNORE( PreProcessAttachmentDataL() );            
   882 #endif /* _NO_MMSS_LOGGING_ */
   883 #endif /* _NO_MMSS_LOGGING_ */
   883         }
   884         }
   884     
   885     
   885     //Open store for read-only purpose
   886     //Open store for read-only purpose
   886     CMsvStore* store = iEntryWrapper->ReadStoreL();
   887     CMsvStore* store = iEntryWrapper->ReadStoreL();
  4724 
  4725 
  4725         retVal = CheckAndUpdateAttachmentL(*attachmentInfo, *iMimeHeaders);
  4726         retVal = CheckAndUpdateAttachmentL(*attachmentInfo, *iMimeHeaders);
  4726 
  4727 
  4727         if( retVal )
  4728         if( retVal )
  4728             {
  4729             {
  4729             TRAPD( 
       
  4730                     err,
       
  4731                     attachManagerSync.ModifyAttachmentInfoL(attachmentInfo);
       
  4732                     editStore->CommitL();
       
  4733                   );
       
  4734 #ifndef _NO_MMSS_LOGGING_
  4730 #ifndef _NO_MMSS_LOGGING_
       
  4731             TRAPD( err,attachManagerSync.ModifyAttachmentInfoL(attachmentInfo);
       
  4732                     editStore->CommitL(););
  4735             if(err != KErrNone)
  4733             if(err != KErrNone)
  4736                 {
  4734                 {
  4737                 TMmsLogger::Log( _L("CMmsEncode::PreProcessAttachmentData:: store commit error: %d"), err );
  4735                 TMmsLogger::Log( _L("CMmsEncode::PreProcessAttachmentData:: store commit error: %d"), err );
  4738                 }
  4736                 }
  4739             else
  4737             else
  4740                 {
  4738                 {
  4741                 TMmsLogger::Log( _L("CMmsEncode::PreProcessAttachmentData:: store commit success") );                
  4739                 TMmsLogger::Log( _L("CMmsEncode::PreProcessAttachmentData:: store commit success") );                
  4742                 }
  4740                 }
       
  4741 #else
       
  4742 				    TRAP_IGNORE( attachManagerSync.ModifyAttachmentInfoL(attachmentInfo);
       
  4743                     editStore->CommitL(););	                
  4743 #endif /* _NO_MMSS_LOGGING_ */
  4744 #endif /* _NO_MMSS_LOGGING_ */
  4744             /*  attachmentInfo ownership is transfered to attachment manager
  4745             /*  attachmentInfo ownership is transfered to attachment manager
  4745              *  Hence, JUST pop attachmentInfo, DO NOT Destroy.
  4746              *  Hence, JUST pop attachmentInfo, DO NOT Destroy.
  4746              */
  4747              */
  4747             CleanupStack::Pop( attachmentInfo );
  4748             CleanupStack::Pop( attachmentInfo );