summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/dlt/dlt_common.h3
-rwxr-xr-xinclude/dlt/dlt_user_macros.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index 686df19..19ee4d5 100755
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -200,7 +200,7 @@
\
if(_verbose) \
{ \
- sprintf(_strbuf, "%s()\n",__func__); \
+ snprintf(_strbuf, 255, "%s()\n",__func__); \
dlt_log(LOG_INFO, _strbuf); \
} \
}
@@ -376,6 +376,7 @@ typedef struct sDltMessage
uint8_t headerbuffer[sizeof(DltStorageHeader)+
sizeof(DltStandardHeader)+sizeof(DltStandardHeaderExtra)+sizeof(DltExtendedHeader)]; /**< buffer for loading complete header */
uint8_t *databuffer; /**< buffer for loading payload */
+ int32_t databuffersize;
/* header values of current loaded message */
DltStorageHeader *storageheader; /**< pointer to storage header of current loaded header */
diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h
index 17a8ddb..1f95f3c 100755
--- a/include/dlt/dlt_user_macros.h
+++ b/include/dlt/dlt_user_macros.h
@@ -161,7 +161,7 @@ extern DltContext CONTEXT;
#define DLT_LOG(CONTEXT,LOGLEVEL,ARGS...) \
{ \
DltContextData log; \
- if (dlt_user_log_write_start(&CONTEXT,&log,LOGLEVEL)) \
+ if (dlt_user_log_write_start(&CONTEXT,&log,LOGLEVEL)>0) \
{ \
ARGS; \
dlt_user_log_write_finish(&log); \
@@ -185,7 +185,7 @@ extern DltContext CONTEXT;
#define DLT_LOG_ID(CONTEXT,LOGLEVEL,MSGID,ARGS...) \
{ \
DltContextData log; \
- if (dlt_user_log_write_start_id(&CONTEXT,&log,LOGLEVEL,MSGID)) \
+ if (dlt_user_log_write_start_id(&CONTEXT,&log,LOGLEVEL,MSGID)>0) \
{ \
ARGS; \
dlt_user_log_write_finish(&log); \