backupandrestore/backupengine/src/absession.cpp
branchRCL_3
changeset 20 4a793f564d72
parent 19 0aa8cc770c8a
--- a/backupandrestore/backupengine/src/absession.cpp	Tue Aug 31 16:03:15 2010 +0300
+++ b/backupandrestore/backupengine/src/absession.cpp	Wed Sep 01 12:20:56 2010 +0100
@@ -148,12 +148,7 @@
 		iCallbackWatchdog = NULL;
 		
 		// Remove this session from the server's session map
-		// Use dynamic_cast in case that ABServer is deconstructing 
-		CABServer *pServer = dynamic_cast<CABServer*>(const_cast<CServer2*>(CSession2::Server()));
-		if(pServer)
-			{
-			pServer->RemoveElement(iClientSID);
-			}		
+		Server().RemoveElement(iClientSID);
 		
 		// Clear up any outstanding message
 		HandleIPCClosingDownCallback();
@@ -164,10 +159,7 @@
 		// If the client has detached properly, they should
 		// have done this - but just in case.
 		//DoCancelWaitForCallback();
-		if(pServer)
-			{
-			pServer->DropSession();
-			}
+		Server().DropSession();
 		}
 		
 	void CABSession::CreateL()