Revision: 200917 PDK_2.0.a
authorKiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
Fri, 08 May 2009 08:20:13 +0300
changeset 10 e20d19ef9b09
parent 0 99ef825efeca
child 11 b345ed34a80d
child 12 f8406644275c
child 15 947415ec7603
Revision: 200917 Kit: 200918
languageinterworkingfw/servicehandler/src/liwvariant.cpp
rtsecuritymanager/rtsecuritymanagerclient/src/rtsecmgrclient.cpp
rtsecuritymanager/rtsecuritymanagerserver/inc/rtsecmgrserver.h
serviceapifw_plat/liw_criteria_api/tsrc/group/bld.inf
serviceapifw_plat/rtsecuritymanager_client_api/tsrc/group/bld.inf
--- a/languageinterworkingfw/servicehandler/src/liwvariant.cpp	Mon Mar 30 12:51:20 2009 +0300
+++ b/languageinterworkingfw/servicehandler/src/liwvariant.cpp	Fri May 08 08:20:13 2009 +0300
@@ -1522,6 +1522,7 @@
             	size += 1;	
             	}
             size += iPtrC.Size();
+            size += 1;              // extra one byte for Unicode marker
             break;
             }
         case EVariantTypeDesC8:
--- a/rtsecuritymanager/rtsecuritymanagerclient/src/rtsecmgrclient.cpp	Mon Mar 30 12:51:20 2009 +0300
+++ b/rtsecuritymanager/rtsecuritymanagerclient/src/rtsecmgrclient.cpp	Fri May 08 08:20:13 2009 +0300
@@ -51,7 +51,7 @@
 // The number of message slot is defaulted to 4.
 // ---------------------------------------------------------------------------
 //
-TInt RSecMgrSession::Connect()
+/*TInt RSecMgrSession::Connect()
 	{
 	RTSecMgrTraceFunction("RSecMgrSession::Connect()") ;
 	TInt retry(KSecSrvClientTryCount); // Try this twice
@@ -91,7 +91,63 @@
 		retry--;
 		}
 	return (err);
-	}
+	}*/
+
+TInt RSecMgrSession::Connect()
+    {
+    RTSecMgrTraceFunction("RSecMgrSession::Connect()") ;
+    TInt err(KErrNone);
+        // Try to create a Server session
+    err = CreateSession ( KSecServerProcessName, Version (),
+            KDefaultMessageSlots);
+
+    if ( err != KErrNotFound && err != KErrServerTerminated)
+        {
+        // KErrNone or unrecoverable error
+        if ( err != KErrNone)
+            {
+#ifdef _DEBUG
+            RDebug::Print(KServerStartFailed);
+#endif
+            }
+        
+        }
+    else
+        {
+        // Return code was KErrNotFound or KErrServerTerminated.
+        // Try to start a new security manager server instance
+        TInt retry(KSecSrvClientTryCount);
+        while(retry > 0)
+            {
+            err = StartSecManagerServer ();
+            if ( err != KErrNone && err != KErrAlreadyExists)
+                {
+                // Unrecoverable error
+                #ifdef _DEBUG
+                            RDebug::Print(KServerStartFailed);
+                #endif
+                retry = 0;
+                }
+            else
+                {
+                err = CreateSession ( KSecServerProcessName, Version (),
+                                                KDefaultMessageSlots);
+                if(err != KErrNotFound && err != KErrServerTerminated)
+                    {
+                    if ( err != KErrNone)
+                                {
+                    #ifdef _DEBUG
+                                RDebug::Print(KServerStartFailed);
+                    #endif
+                                }
+                    retry = 0;
+                    }
+                }
+            retry--;
+            }
+        }       
+    return (err);
+    }
 
 // ---------------------------------------------------------------------------
 // Starts runtime security manager server
--- a/rtsecuritymanager/rtsecuritymanagerserver/inc/rtsecmgrserver.h	Mon Mar 30 12:51:20 2009 +0300
+++ b/rtsecuritymanager/rtsecuritymanagerserver/inc/rtsecmgrserver.h	Fri May 08 08:20:13 2009 +0300
@@ -37,7 +37,7 @@
 
 //needed for creating server thread.
 const TUint KDefaultHeapSize=0x10000;
-const TUint KShutDownDelay = 200000; // Aprox 2 sec
+const TUint KShutDownDelay = 2000000; // Aprox 2 sec
 
 /*
  * Shutdown timer class
--- a/serviceapifw_plat/liw_criteria_api/tsrc/group/bld.inf	Mon Mar 30 12:51:20 2009 +0300
+++ b/serviceapifw_plat/liw_criteria_api/tsrc/group/bld.inf	Fri May 08 08:20:13 2009 +0300
@@ -30,17 +30,16 @@
 PRJ_TESTEXPORTS
 // NOTE: If using ARS requirements all export operations should be done under this.
 // 'abld test export'
-
-PRJ_EXPORTS
-PRJ_EXPORTS
 ../data/liwaccesspolicy.xml      	/epoc32/winscw/c/data/others/liwaccesspolicy.xml
 //../init/testframework.ini      /epoc32/WINSCW/C/TestFramework/testframework.ini 
 ../conf/tliwtestcases.cfg      /epoc32/WINSCW/C/TestFramework/tliwtestcases.cfg
 
+PRJ_EXPORTS
 
 PRJ_TESTMMPFILES
 // NOTE: If using ARS requirements .mmp file operation should be done under this.
 // 'abld test build'
+liwtestcases.mmp
 
 PRJ_MMPFILES
 // Specify the .mmp files required for building the important component
@@ -56,6 +55,6 @@
 /agnmodel/group/agsvexe.mmp
 #endif
 */
-liwtestcases.mmp
+
 
 //  End of File
\ No newline at end of file
--- a/serviceapifw_plat/rtsecuritymanager_client_api/tsrc/group/bld.inf	Mon Mar 30 12:51:20 2009 +0300
+++ b/serviceapifw_plat/rtsecuritymanager_client_api/tsrc/group/bld.inf	Fri May 08 08:20:13 2009 +0300
@@ -31,8 +31,6 @@
 PRJ_TESTEXPORTS
 // NOTE: If using ARS requirements all export operations should be done under this.
 // 'abld test export'
-
-PRJ_EXPORTS
 //../init/testframework.ini      /epoc32/WINSCW/C/TestFramework/testframework.ini 
 ../conf/ui_tsecuritymanager.cfg      /epoc32/WINSCW/C/TestFramework/ui_tsecuritymanager.cfg
 ../conf/ui_tsecuritymanager_comb.cfg      /epoc32/WINSCW/C/TestFramework/ui_tsecuritymanager_comb.cfg
@@ -42,6 +40,10 @@
 ../data/accesspolicy_3.xml           /epoc32/WINSCW/C/data/others/accesspolicy_3.xml 
 
 
+PRJ_EXPORTS
+
+
+
 // Specify the source file followed by its destination here
 // copy will be used to copy the source file to its destination
 // If there's no destination then the source file will be copied
@@ -54,6 +56,8 @@
 PRJ_TESTMMPFILES
 // NOTE: If using ARS requirements .mmp file operation should be done under this.
 // 'abld test build'
+ui_tsecuritymanager.mmp
+
 
 PRJ_MMPFILES
 // Specify the .mmp files required for building the important component
@@ -69,6 +73,6 @@
 /agnmodel/group/agsvexe.mmp
 #endif
 */
-ui_tsecuritymanager.mmp
+
 
 //  End of File
\ No newline at end of file