--- a/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp Fri Jul 30 10:34:49 2010 +0300
+++ b/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp Tue Aug 10 14:46:45 2010 +0300
@@ -217,6 +217,16 @@
TInt errorCode = repository->Set( KStartupReason, aReasonCode );
ERROR( errorCode, "Failed to set KStartupReason CenRep key" );
+ // In case of disk full, we will not try to set the device lock query status cenrep key here.
+ // Rather it is set after disk space is recovered.
+ if ((EUnknownReset != aReasonCode) && (KErrDiskFull != errorCode))
+ {
+ // Set the lock code query success as EStartupDevLockNotSucess in case the shutdown is not due to the the unknown reset.
+ // This is because if the device crashes before resetting the key during boot time.
+ errorCode = repository->Set(KStartupDevLockStatus, EStartupDevLockNotSucess);
+ INFO_1("Setting KStartupDevLockStatus CenRep key with EStartupDevLockNotSucess completed with %d", errorCode);
+ }
+
if( KErrDiskFull == errorCode )
{
//Need not to put on CleanupStack, it's not calling any leaving function and
@@ -228,6 +238,14 @@
{
errorCode = repository->Set( KStartupReason, aReasonCode );
ERROR( errorCode, "Failed to set KStartupReason CenRep key after freeing the memory" );
+
+ if (EUnknownReset != aReasonCode)
+ {
+ // Set the lock code query success as EStartupDevLockNotSucess in case the shutdown is not due to the the unknown reset.
+ // This is because if the device crashes before resetting the key during boot time.
+ errorCode = repository->Set(KStartupDevLockStatus, EStartupDevLockNotSucess);
+ ERROR( errorCode, "Failed to set KStartupDevLockStatus CenRep key after freeing the memory" );
+ }
}
CSsmUiSpecific::Release();
}