Msrp/MsrpServer/src/CMSRPMessageHandler.cpp
branchMSRP_FrameWork
changeset 60 7634585a4347
parent 58 cdb720e67852
equal deleted inserted replaced
59:b365c991829c 60:7634585a4347
   318                 iCurrentNumberOfBytes = iBuffer.Length();
   318                 iCurrentNumberOfBytes = iBuffer.Length();
   319                 }
   319                 }
   320             }
   320             }
   321         else
   321         else
   322             {
   322             {
   323             AppendMessageToFileL( aContent );
   323             if( iBuffer.Length() )
       
   324                 {
       
   325                 HBufC8* combined = HBufC8::NewLC( iBuffer.Length() + aContent.Length() );
       
   326                 TPtr8 ptr = combined->Des();
       
   327                 ptr = iBuffer;
       
   328                 ptr.Append( aContent );
       
   329                 // must write to file
       
   330                 WriteMessageToFileL( ptr );
       
   331                 CleanupStack::PopAndDestroy( ); // combined
       
   332                 iBuffer.Zero();
       
   333                 }
       
   334             else
       
   335                 {
       
   336                 AppendMessageToFileL( aContent );
       
   337                 }
   324             }
   338             }
   325         }    
   339         }    
   326     MSRPLOG( "CMSRPMessageHandler::AddContentL exit" )
   340     MSRPLOG( "CMSRPMessageHandler::AddContentL exit" )
   327     }
   341     }
   328 
   342 
   463     
   477     
   464     TBool sendReport = EFalse;
   478     TBool sendReport = EFalse;
   465     if ( iActiveMsgType == EMSRPResponse )
   479     if ( iActiveMsgType == EMSRPResponse )
   466         {
   480         {
   467         // currently sending a response
   481         // currently sending a response
   468         MSRPLOG( "CMSRPMessageHandler::SendReportL sendin a response..." )
   482         MSRPLOG( "CMSRPMessageHandler::SendReportL response sending in progress, do nothing" )
   469         return sendReport;
   483         return sendReport;
   470         }
   484         }
   471     iMSRPMessageObserver = aMessageObserver;
   485     iMSRPMessageObserver = aMessageObserver;
   472     if( iMessage->SuccessReportHeader() )
   486     if( iMessage->SuccessReportHeader() )
   473         {
   487         {