diff options
author | Guerra Mattia <mguerra@de.adit-jv.com> | 2017-08-23 11:08:56 +0200 |
---|---|---|
committer | Jens Lorenz <jlorenz@de.adit-jv.com> | 2017-09-29 11:42:01 +0200 |
commit | 43c445e3ea9a4290e4c60d427bf6435e91bafa65 (patch) | |
tree | a8c610cb6f4b17d6893b626104132ee58d5359cd /AudioManagerUtilities/include/CAmDltWrapper.h | |
parent | 50bbb68460af25dcba4110b11b4f0bf61d6e111a (diff) | |
download | audiomanager-43c445e3ea9a4290e4c60d427bf6435e91bafa65.tar.gz |
AMUtil: use DLT API only when DLT is selected
Protecting access to DLT API dlt_user_is_logLevel_enabled by checking if
destination is really meant to be DLT daemon. Otherwise, invalid DLT
Context could be accessed.
Signed-off-by: Guerra Mattia <mguerra@de.adit-jv.com>
Diffstat (limited to 'AudioManagerUtilities/include/CAmDltWrapper.h')
-rw-r--r-- | AudioManagerUtilities/include/CAmDltWrapper.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/AudioManagerUtilities/include/CAmDltWrapper.h b/AudioManagerUtilities/include/CAmDltWrapper.h index 8c5678e..79df911 100644 --- a/AudioManagerUtilities/include/CAmDltWrapper.h +++ b/AudioManagerUtilities/include/CAmDltWrapper.h @@ -162,11 +162,14 @@ public: { #ifdef WITH_DLT #ifdef DLT_IS_LOG_LEVEL_ENABLED - return (dlt_user_is_logLevel_enabled(&mDltContext, logLevel) == DLT_RETURN_TRUE); + if (mlogDestination == logDestination::DAEMON) + { + return (dlt_user_is_logLevel_enabled(&mDltContext, logLevel) == DLT_RETURN_TRUE); + } #else (void)logLevel; - return true; #endif + return true; #else return (logLevel <= mDltContext.log_level_user); #endif |