--- a/videoscheduler/SchedulerServer/src/CCseSchedulerServer.cpp Mon Jun 21 16:49:37 2010 +0300
+++ b/videoscheduler/SchedulerServer/src/CCseSchedulerServer.cpp Thu Jul 15 19:48:39 2010 +0300
@@ -168,13 +168,14 @@
CTrapCleanup* cleanupStack = CTrapCleanup::New();
if ( !cleanupStack )
{
- PanicServer( ECseCreateTrapCleanup );
+ CSELOGSTRING_HIGH_LEVEL("CCseSchedulerServer::ThreadFunction - Could not create cleanupstack: %d");
+ return KErrNone;
}
TRAPD( err, ThreadFunctionL( ) );
if ( err )
{
- PanicServer( ECseSrvCreateServer );
+ CSELOGSTRING2_HIGH_LEVEL("CCseSchedulerServer::ThreadFunction - Main thread leaved: %d", err );
}
delete cleanupStack;
@@ -300,17 +301,21 @@
void CCseSchedulerServer::DeleteSchedulerEngine()
{
CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::DeleteSchedulerEngine");
-
+
if ( iContainerIx )
{
- iSchedulerEngine->Close();
+ if( iObjectCon->Count() > 0 )
+ {
+ iSchedulerEngine->Close();
+ }
+
iContainerIx->Remove( iObjectCon );
delete iContainerIx;
iContainerIx = NULL;
iSchedulerEngine = NULL;
}
-
- if( iStarterBreaker->IsActive() )
+
+ if( iStarterBreaker && iStarterBreaker->IsActive() )
{
iStarterBreaker->Cancel();
}