webservices/wshostletconnection/src/senhostletconnectionimpl.cpp
branchRCL_3
changeset 24 d9641c85af2b
parent 11 ab1e518f96da
equal deleted inserted replaced
23:1adb97a15c2f 24:d9641c85af2b
    24 
    24 
    25 
    25 
    26 
    26 
    27 
    27 
    28 #include <s32strm.h>
    28 #include <s32strm.h>
       
    29 #include <bautils.h>
    29 #include <SenXmlUtils.h>
    30 #include <SenXmlUtils.h>
    30 
    31 
    31 //#include "SenHostletConnectionLog.h"
    32 //#include "SenHostletConnectionLog.h"
    32 #include "sendebug.h"
    33 #include "sendebug.h"
    33 #include "senlogger.h"
    34 #include "senlogger.h"
    76     return pNew;
    77     return pNew;
    77     }
    78     }
    78 
    79 
    79 void CSenHostletConnectionImpl::ConstructL()
    80 void CSenHostletConnectionImpl::ConstructL()
    80     {
    81     {
       
    82 		#ifdef _SENDEBUG
       
    83 		#ifdef _DEBUG
       
    84 		
       
    85 		RFs fs;
       
    86 		fs.Connect();
       
    87 		TBool ret = BaflUtils::FolderExists(fs, _L("c:\\logs\\wslog\\"));
       
    88 		if(!ret)
       
    89 			{
       
    90 			fs.MkDirAll(_L("c:\\logs\\wslog\\"));
       
    91 			}
       
    92 		fs.Close();
       
    93 		
       
    94 		RFileLogger log;
       
    95 		log.Connect();
       
    96 		log.CreateLog(KSenHostletConnectionLogDir(), KSenHostletConnectionLogFile, EFileLoggingModeOverwrite);
       
    97 		log.CloseLog();
       
    98 		log.Close();
       
    99 	
       
   100 		#endif // _DEBUG
       
   101 		#endif // _SENDEBUG
       
   102     	
    81     TInt connErr = iConnection.Connect();
   103     TInt connErr = iConnection.Connect();
    82     TInt connAttemp(0); // max 5 attempts are allowed
   104     TInt connAttemp(0); // max 5 attempts are allowed
    83     while ( (connErr == KErrServerTerminated || connErr == KErrServerBusy)
   105     while ( (connErr == KErrServerTerminated || connErr == KErrServerBusy)
    84                      && connAttemp < KSenMaxClientConnectionOpeningAttempts  )
   106                      && connAttemp < KSenMaxClientConnectionOpeningAttempts  )
    85         {
   107         {