syncmlfw/common/http/src/nsmlhttpclient.cpp
branchRCL_3
changeset 18 2de6635c154b
parent 5 3f7d9dbe57c8
child 25 b183ec05bd8c
equal deleted inserted replaced
16:915074efc433 18:2de6635c154b
    17 
    17 
    18 
    18 
    19 #include "nsmlhttpclient.h"
    19 #include "nsmlhttpclient.h"
    20 #include "nsmlerror.h"
    20 #include "nsmlerror.h"
    21 #include <featmgr.h>
    21 #include <featmgr.h>
       
    22 #include "NsmlOperatorErrorCRKeys.h"
       
    23 #include <centralrepository.h> 
       
    24 
    22 
    25 
    23 //Fix to Remove the Bad Compiler Warnings
    26 //Fix to Remove the Bad Compiler Warnings
    24 #ifndef __WINS__
    27 #ifndef __WINS__
    25 // This lowers the unnecessary compiler warning (armv5) to remark.
    28 // This lowers the unnecessary compiler warning (armv5) to remark.
    26 // "Warning:  #174-D: expression has no effect..." is caused by 
    29 // "Warning:  #174-D: expression has no effect..." is caused by 
   127 				DBG_FILE( _S8("CHttpEventHandler::MHFRunL() There is a mismatch in the Content Type") );
   130 				DBG_FILE( _S8("CHttpEventHandler::MHFRunL() There is a mismatch in the Content Type") );
   128 				
   131 				
   129 				status = CNSmlHTTP::SetErrorStatus( status );
   132 				status = CNSmlHTTP::SetErrorStatus( status );
   130 				
   133 				
   131 				if (status == resp.StatusCode() )
   134 				if (status == resp.StatusCode() )
   132 				{
   135 				    {
   133 					DBG_FILE( _S8("Error in Communication string is set"));
   136                     if( this->iAgent->iSession == ESyncMLDSSession )
   134 					status = TNSmlError::ESmlCommunicationInterrupted;
   137                         {
   135 				}
   138                         CRepository* rep = NULL;
       
   139                         TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
       
   140                         if ( err == KErrNone )
       
   141                             {
       
   142                             rep->Set( KNsmlOpDsErrorCode, status );
       
   143                             delete rep;
       
   144                             }
       
   145                         }  
       
   146 
       
   147                     DBG_FILE( _S8("Error in Communication string is set"));
       
   148                     status = TNSmlError::ESmlCommunicationInterrupted;
       
   149 				    }
   136 					
   150 					
   137 				// content mismatch
   151 				// content mismatch
   138 				aTransaction.Close();
   152 				aTransaction.Close();
   139 				User::RequestComplete( iStatusForAgent, status);
   153 				User::RequestComplete( iStatusForAgent, status);
   140 				
   154