diff -r 072a9626b290 -r 09d657f1ee00 sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp --- a/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp Wed Aug 18 11:03:14 2010 +0300 +++ b/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp Thu Sep 02 21:48:26 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(); }