--- a/loggingservices/filelogger/SSVR/FLOGSVR.CPP Tue May 25 14:35:19 2010 +0300
+++ b/loggingservices/filelogger/SSVR/FLOGSVR.CPP Wed Jun 09 11:36:09 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -26,6 +26,11 @@
*/
const TInt KOpenLogFilesGranularity=5;
+/* Internal error. Use positive number to ensure no conflict with other error code
+ Indicate that client message has panic'ed and should not be completed.
+*/
+const TInt KErrMessagePanic = 1;
+
/**
panics for log client
@@ -268,7 +273,10 @@
{
TRAPD(ret,DispatchMessageL(aMessage));
- aMessage.Complete(ret);
+ if (ret!=KErrMessagePanic)
+ {
+ aMessage.Complete(ret);
+ }
}
void CFileLogSession::DispatchMessageL(const RMessage2& aMessage)
@@ -281,13 +289,24 @@
TLogFile log;
TPckg<TLogFile> logPckg(log);
aMessage.ReadL(0,logPckg);
- __ASSERT_ALWAYS(log.Directory().Length()!=0,aMessage.Panic(KFLoggerServerName,ELogDirectoryNameDoesNotExist));
- __ASSERT_ALWAYS(log.Name().Length()!=0,aMessage.Panic(KFLoggerServerName,ELogFileNameDoesNotExist));
+ if (log.Directory().Length()<=0)
+ {
+ aMessage.Panic(KFLoggerServerName,ELogDirectoryNameDoesNotExist);
+ User::Leave(KErrMessagePanic);
+ }
+
+ if (log.Name().Length()<=0)
+ {
+ aMessage.Panic(KFLoggerServerName,ELogFileNameDoesNotExist);
+ User::Leave(KErrMessagePanic);
+ }
// TBuf8<KLogBufferSize> buf;
TBuf8<1600> buf;
if (func==EWriteLog || func==ECreateWriteAndCloseLog)
+ {
aMessage.ReadL(1,buf);
+ }
switch (func)
{