[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-client-cvs
Subject: [Client-cvs] medpltfm chxmedpltfm.cpp,1.78,1.79
From: amsaleem () helixcommunity ! org
Date: 2010-03-31 22:53:27
Message-ID: 201003312258.o2VMwik7005360 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/client/medpltfm
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9278
Modified Files:
chxmedpltfm.cpp
Log Message:
"Nokia submits this code under the terms of a commercial contribution agreement with \
Real Networks, and I am authorized to contribute this code under said agreement."
Modified by: saleem.adookkattil@nokia.com
Reviewed by:
Date: 03/16/2010
Project: symbian_client_apps
ErrorId: JLIU_83KSM1
Synopsis: Fixed condition to enable logging and log manager instance release.
Overview:
Made the following changes.
1) Existing code on failure to read value of 'Logging\\File\\Enabled' from \
configuration enables logging. Fixed this one by setting not to enable logging on \
failure to read the value.
2) Releasing instance of m_pLogSystemManager inside CHXMediaPlatform before releasing \
plugins those hold reference to logsystem cause crash on sybian platform. Made fix \
to release m_pLogSystemManager instance after releasing all loaded plugins.
3) Symbian TLC context call close on log manager even if the context instance not \
intialized the logging.This causes multiple close method call on log manager. \
Corrected this problem by introducing a member variable m_bTerminateLogging and check \
whether instance received call to initialize logging. In addition made changes to \
call log system manager interface methods instead of directly calling symbian log \
manger method close. Also made some code cleanup inside symbian tlc cotext.
Files modified:
cvsroot\client\medpltfm\chxmedpltfm.cpp
cvsroot\common\log\logutil\platform\symbian\hxsymlogsystemmanager.cpp
cvsroot\common\log\logutil\pub\platform\symbian\hxsymlogsystemmanager.h
cvsroot\common\system\platform\symbian\symbian_tlc_context.cpp
cvsroot\common\system\pub\platform\symbian\symbian_tlc_context.h
Files added:
Image Size and Heap Use impact: None.
Module Release testing (STIF) : Yes
Test case(s) Added : No
Memory leak check performed : Yes
Platforms and Profiles Build Verified: helix-client-symbian-4
Platforms and Profiles Functionality verified: armv5, winscw
Branch: 4_2_0_brizo, HEAD
Index: chxmedpltfm.cpp
===================================================================
RCS file: /cvsroot/client/medpltfm/chxmedpltfm.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- chxmedpltfm.cpp 31 Aug 2009 15:28:19 -0000 1.78
+++ chxmedpltfm.cpp 31 Mar 2010 22:53:24 -0000 1.79
@@ -552,8 +552,6 @@
m_pLogSystemManager->TerminateLogSystem();
HX_DISABLE_LOGGING();
}
- // Now we can release teh log system manager
- HX_RELEASE(m_pLogSystemManager);
#endif /* #if !defined(HELIX_FEATURE_LOGLEVEL_NONE) */
if (m_pSingleLoadPlugins)
@@ -612,6 +610,9 @@
// be released/closed first.
HX_RELEASE(m_pExtCCF);
HX_RELEASE(m_pExtContext);
+#if !defined(HELIX_FEATURE_LOGLEVEL_NONE)
+ HX_RELEASE(m_pLogSystemManager);
+#endif // HELIX_FEATURE_LOGLEVEL_NONE
m_bInitialized = FALSE;
@@ -1082,25 +1083,34 @@
HX_RESULT retVal = HXR_OK;
#if !defined(HELIX_FEATURE_LOGLEVEL_NONE)
- // Do we have a logsystem manager?
- if (!m_pLogSystemManager)
- {
- // The external context did not provide us a log system manager,
- // so we must create a default log system manager
- retVal = CHXLogSystemManager::CreateLogSystemManager(&m_pLogSystemManager);
- }
- if (SUCCEEDED(retVal))
+
+ // Read the enabled pref
+ HXBOOL bEnabled = TRUE;
+ ReadPrefBOOL(m_pPreferences, "Logging\\File\\Enabled", bEnabled);
+
+ // only init logging when it is enabled in prefs
+ if (bEnabled)
{
- // First we tell the log system manager to init the log system
- retVal = m_pLogSystemManager->InitializeLogSystem((IUnknown*)(IHXMediaPlatform*) \
this); + // Do we have a logsystem manager?
+ if (!m_pLogSystemManager)
+ {
+ // The external context did not provide us a log system manager,
+ // so we must create a default log system manager
+ retVal = \
CHXLogSystemManager::CreateLogSystemManager(&m_pLogSystemManager); + }
if (SUCCEEDED(retVal))
{
- // Next we tell it to init the log observers
- retVal = m_pLogSystemManager->InitializeLogObservers();
+ // First we tell the log system manager to init the log system
+ retVal = \
m_pLogSystemManager->InitializeLogSystem((IUnknown*)(IHXMediaPlatform*) this); if \
(SUCCEEDED(retVal)) {
- // Enable logging in the media platform dll
- HX_ENABLE_LOGGING((IUnknown*) (IHXMediaPlatform*) this);
+ // Next we tell it to init the log observers
+ retVal = m_pLogSystemManager->InitializeLogObservers();
+ if (SUCCEEDED(retVal))
+ {
+ // Enable logging in the media platform dll
+ HX_ENABLE_LOGGING((IUnknown*) (IHXMediaPlatform*) this);
+ }
}
}
}
_______________________________________________
Client-cvs mailing list
Client-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/client-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic