stifui/uitestserverstarter/src/TestServerThreadStarter.cpp
branchRCL_3
changeset 8 69ec17276f52
parent 0 d6fe6244b863
--- a/stifui/uitestserverstarter/src/TestServerThreadStarter.cpp	Fri Mar 12 15:42:49 2010 +0200
+++ b/stifui/uitestserverstarter/src/TestServerThreadStarter.cpp	Mon Mar 15 12:40:36 2010 +0200
@@ -105,13 +105,21 @@
 
 	User().CommandLine( moduleName );
 
-    RDebug::Print (moduleName);
+    RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Received data [%S]"), &moduleName);
+
+    // Extract semaphore name passed in data
+    TInt index = moduleName.Find(_L(" "));
+    RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Space separator found at position [%d]"), index);
+    TPtrC semaphoreName = moduleName.Mid(index + 1);
+    moduleName = moduleName.Left(index);
+
+    RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Extracted module name [%S] and sempahore name [%S]"), &moduleName, &semaphoreName);
 
     // Open start-up synchronization semaphore
     RSemaphore startup;
     RDebug::Print(_L(" Openingstart-up semaphore"));
-    TName semaphoreName = _L("startupSemaphore");
-    semaphoreName.Append( moduleName );
+    //TName semaphoreName = _L("startupSemaphore");
+    //semaphoreName.Append( moduleName );
     
     TInt res = startup.OpenGlobal(semaphoreName);
     RDebug::Print(_L("Opening result %d"), res);    
@@ -123,7 +131,7 @@
     if ( r ==   KErrAlreadyExists )
         {        
         // Ok, server was already started
-        RDebug::Print(_L("UI TestServer already started, signaling semaphore and existing"));
+        RDebug::Print(_L("UI TestServer already started, signaling semaphore and exiting"));
         startup.Signal();        
 
         delete cmdLine;