--- 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();
}
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerServerEngine.cpp Mon Jun 21 16:49:37 2010 +0300
+++ b/videoscheduler/SchedulerServer/src/CCseSchedulerServerEngine.cpp Thu Jul 15 19:48:39 2010 +0300
@@ -56,6 +56,16 @@
// None.
// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CloseEngine
+// CB method used if ConstructL leaves. Just calls Close to initiate proper
+// shutdown sequence
+// -----------------------------------------------------------------------------
+//
+void CloseEngine( TAny* aPtr )
+ {
+ static_cast<CCseSchedulerServerEngine*>( aPtr )->Close();
+ }
// -----------------------------------------------------------------------------
// CCseSchedulerServerEngine::CCseSchedulerServerEngine
@@ -79,10 +89,10 @@
{
CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::NewL");
- CCseSchedulerServerEngine* self = new( ELeave ) CCseSchedulerServerEngine( aServer );
- CleanupStack::PushL( self );
+ CCseSchedulerServerEngine* self = new( ELeave ) CCseSchedulerServerEngine( aServer );
+ CleanupStack::PushL( TCleanupItem( CloseEngine, self ) );
self->ConstructL();
- CleanupStack::Pop( self );
+ CleanupStack::Pop( ); // CleanupItem
CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::NewL");
return self;
@@ -95,11 +105,11 @@
//
void CCseSchedulerServerEngine::ConstructL()
{
- CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::ConstructL");
-
+ CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::ConstructL");
+
iDb = CCseScheduleDB::NewL();
iCompletitionBreaker = CIdle::NewL( CActive::EPriorityLow );
-
+
CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::ConstructL");
}
@@ -111,17 +121,16 @@
CCseSchedulerServerEngine::~CCseSchedulerServerEngine()
{
CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::~CCseSchedulerServerEngine");
-
+
delete iDb;
iPluginControllerArray.ResetAndDestroy();
iPluginControllerArray.Close();
- delete iCompletitionBreaker;
-
+ delete iCompletitionBreaker;
+
CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::~CCseSchedulerServerEngine");
}
-
// -----------------------------------------------------------------------------
// CCseSchedulerServerEngine::GeneralServiceL
//
@@ -864,14 +873,14 @@
//
void CCseSchedulerServerEngine::Close()
{
- CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::IsSchedulerActive");
+ CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::Close");
while( AccessCount() >= 1 )
{
Dec();
}
- CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::IsSchedulerActive");
+ CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::Close");
}
--- a/videoutils_plat/videoconnutility_api/tsrc/custom/prerun_custom.xml Mon Jun 21 16:49:37 2010 +0300
+++ b/videoutils_plat/videoconnutility_api/tsrc/custom/prerun_custom.xml Thu Jul 15 19:48:39 2010 +0300
@@ -51,12 +51,4 @@
<params>
<param dir="c:\logs\testframework\Testserver"/>
</params>
-</step>
-<step name="Install IAP file" harness="STIF" enabled="true" passrate="100" significant="false">
- <command>install</command>
- <reboot target-alias="*" when="after" />
- <params>
- <param src="cccccc00.cre"/>
- <param dst="c:\private\10202be9\persists\cccccc00.cre"/>
- </params>
</step>
\ No newline at end of file