diff options
author | Frank Herchet <frank.fh.herchet@bmw.de> | 2012-06-26 14:03:16 +0200 |
---|---|---|
committer | christian mueller <christian.ei.mueller@bmw.de> | 2012-06-26 18:30:51 +0200 |
commit | 7cf8a24e73f57fcdf6974ae860ab01e38b40b100 (patch) | |
tree | 075458690d178d3df7fa9421a4ba6a8e71a56739 /AudioManagerDaemon | |
parent | 31dc3a44e5da9df146b8a016497f2d89c4b73d56 (diff) | |
download | audiomanager-7cf8a24e73f57fcdf6974ae860ab01e38b40b100.tar.gz |
* [GAM-55] fix wrong context id in logError and logInfo
Signed-off-by: christian mueller <christian.ei.mueller@bmw.de>
Diffstat (limited to 'AudioManagerDaemon')
-rw-r--r-- | AudioManagerDaemon/src/CAmDltWrapper.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/AudioManagerDaemon/src/CAmDltWrapper.cpp b/AudioManagerDaemon/src/CAmDltWrapper.cpp index 2d4fffe..aa7e423 100644 --- a/AudioManagerDaemon/src/CAmDltWrapper.cpp +++ b/AudioManagerDaemon/src/CAmDltWrapper.cpp @@ -83,13 +83,19 @@ void CAmDltWrapper::registerContext(DltContext& handle, const char *contextid, c dlt_register_context(&handle, contextid, description); #else (void) handle; - memcpy(&mDltContext.contextID,contextid,4); - const size_t str_len = strlen(description); - if(str_len < 2000) + + // store only the first contextID + if(0 == strlen(mDltContext.contextID)) { - mDltContextData.context_description = new char[str_len + 1]; - (void) strcpy(mDltContextData.context_description,description); + memcpy(&mDltContext.contextID,contextid,4); + const size_t str_len = strlen(description); + if(str_len < 2000) + { + mDltContextData.context_description = new char[str_len + 1]; + (void) strcpy(mDltContextData.context_description,description); + } } + #endif } |