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 Server().RemoveElement(iClientSID); |
151 // Use dynamic_cast in case that ABServer is deconstructing |
|
152 CABServer *pServer = dynamic_cast<CABServer*>(const_cast<CServer2*>(CSession2::Server())); |
|
153 if(pServer) |
|
154 { |
|
155 pServer->RemoveElement(iClientSID); |
|
156 } |
152 |
157 |
153 // Clear up any outstanding message |
158 // Clear up any outstanding message |
154 HandleIPCClosingDownCallback(); |
159 HandleIPCClosingDownCallback(); |
155 |
160 |
156 delete iActiveSchedulerWait; |
161 delete iActiveSchedulerWait; |
157 |
162 |
158 // |
163 // |
159 // If the client has detached properly, they should |
164 // If the client has detached properly, they should |
160 // have done this - but just in case. |
165 // have done this - but just in case. |
161 //DoCancelWaitForCallback(); |
166 //DoCancelWaitForCallback(); |
162 Server().DropSession(); |
167 if(pServer) |
|
168 { |
|
169 pServer->DropSession(); |
|
170 } |
163 } |
171 } |
164 |
172 |
165 void CABSession::CreateL() |
173 void CABSession::CreateL() |
166 /** |
174 /** |
167 Creates a connection between active backup server and the active backup session. |
175 Creates a connection between active backup server and the active backup session. |