From 426d6c6f1ea02c3093181eb36aed68605a5cdd5d Mon Sep 17 00:00:00 2001 From: Aleksandar Donchev Date: Mon, 17 Nov 2014 11:36:36 +0100 Subject: Bug 298 - Filtering of DLT messages are not working Signed-off-by: Christian Linke --- include/shared/CAmDltWrapper.h | 95 ++++++++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 32 deletions(-) (limited to 'include') diff --git a/include/shared/CAmDltWrapper.h b/include/shared/CAmDltWrapper.h index 177fd98..1de8bb0 100644 --- a/include/shared/CAmDltWrapper.h +++ b/include/shared/CAmDltWrapper.h @@ -95,7 +95,7 @@ public: void registerContext(DltContext& handle, const char *contextid, const char * description); void unregisterContext(DltContext& handle); - void init(DltLogLevelType loglevel, DltContext* context = NULL); + int init(DltLogLevelType loglevel, DltContext* context = NULL); void deinit(); void send(); void append(const int8_t value); @@ -143,7 +143,8 @@ inline CAmDltWrapper* getWrapper() template void logInfo(T value) { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->send(); } @@ -157,7 +158,8 @@ template void logInfo(T value, T1 value1) { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->send(); @@ -174,7 +176,8 @@ template void logInfo(T value, T1 value1, { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -193,7 +196,8 @@ template void logInfo(T value { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -214,7 +218,8 @@ template void lo { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -237,7 +242,8 @@ templateinit(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -262,7 +268,8 @@ templateinit(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -289,7 +296,8 @@ templateinit(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -318,7 +326,8 @@ templateinit(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -349,7 +358,8 @@ templateinit(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -382,7 +392,8 @@ templateinit(DLT_LOG_INFO); + if (inst->init(DLT_LOG_INFO) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -406,7 +417,8 @@ template void logError(T value) { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->send(); @@ -421,7 +433,8 @@ template void logError(T value, T1 value1) { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->send(); @@ -438,7 +451,8 @@ template void logError(T value, T1 value1, { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -457,7 +471,8 @@ template void logError(T valu { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -478,7 +493,8 @@ template void lo { CAmDltWrapper* inst(getWrapper()); - inst->init(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -501,7 +517,8 @@ templateinit(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -526,7 +543,8 @@ templateinit(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -553,7 +571,8 @@ templateinit(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -582,7 +601,8 @@ templateinit(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -613,7 +633,8 @@ templateinit(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -646,7 +667,8 @@ templateinit(DLT_LOG_ERROR); + if (inst->init(DLT_LOG_ERROR) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -672,7 +694,8 @@ template void log(DltContext* const context, DltLogLevelType logleve { CAmDltWrapper* inst(getWrapper()); - inst->init(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->send(); @@ -689,7 +712,8 @@ template void log(DltContext* const context, DltLogLeve { CAmDltWrapper* inst(getWrapper()); - inst->init(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->send(); @@ -708,7 +732,8 @@ template void log(DltContext* const contex { CAmDltWrapper* inst(getWrapper()); - inst->init(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -729,7 +754,8 @@ template void log(DltContext* { CAmDltWrapper* inst(getWrapper()); - inst->init(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -752,7 +778,8 @@ template void lo { CAmDltWrapper* inst(getWrapper()); - inst->init(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -777,7 +804,8 @@ templateinit(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -804,7 +832,8 @@ templateinit(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -833,7 +862,8 @@ templateinit(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); @@ -864,7 +894,8 @@ templateinit(loglevel, context); + if(inst->init(loglevel, context) < 0) + return; inst->append(value); inst->append(value1); inst->append(value2); -- cgit v1.2.1