backupandrestore/backupengine/src/absession.cpp
branchRCL_3
changeset 20 4a793f564d72
parent 19 0aa8cc770c8a
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
   146 		__LOG1("~CABSession for sid:0x%08x", iClientSID.iId);
   146 		__LOG1("~CABSession for sid:0x%08x", iClientSID.iId);
   147 		delete iCallbackWatchdog;
   147 		delete iCallbackWatchdog;
   148 		iCallbackWatchdog = NULL;
   148 		iCallbackWatchdog = NULL;
   149 		
   149 		
   150 		// Remove this session from the server's session map
   150 		// Remove this session from the server's session map
   151 		// Use dynamic_cast in case that ABServer is deconstructing 
   151 		Server().RemoveElement(iClientSID);
   152 		CABServer *pServer = dynamic_cast<CABServer*>(const_cast<CServer2*>(CSession2::Server()));
       
   153 		if(pServer)
       
   154 			{
       
   155 			pServer->RemoveElement(iClientSID);
       
   156 			}		
       
   157 		
   152 		
   158 		// Clear up any outstanding message
   153 		// Clear up any outstanding message
   159 		HandleIPCClosingDownCallback();
   154 		HandleIPCClosingDownCallback();
   160 		
   155 		
   161 		delete iActiveSchedulerWait;
   156 		delete iActiveSchedulerWait;
   162 
   157 
   163 		//
   158 		//
   164 		// If the client has detached properly, they should
   159 		// If the client has detached properly, they should
   165 		// have done this - but just in case.
   160 		// have done this - but just in case.
   166 		//DoCancelWaitForCallback();
   161 		//DoCancelWaitForCallback();
   167 		if(pServer)
   162 		Server().DropSession();
   168 			{
       
   169 			pServer->DropSession();
       
   170 			}
       
   171 		}
   163 		}
   172 		
   164 		
   173 	void CABSession::CreateL()
   165 	void CABSession::CreateL()
   174 	/**
   166 	/**
   175 	Creates a connection between active backup server and the active backup session.
   167 	Creates a connection between active backup server and the active backup session.