summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dlt/dlt_user.h.in1
-rw-r--r--src/lib/dlt_user.c13
-rw-r--r--src/lib/dlt_user_cfg.h3
3 files changed, 14 insertions, 3 deletions
diff --git a/include/dlt/dlt_user.h.in b/include/dlt/dlt_user.h.in
index 473575b..d0c60b2 100644
--- a/include/dlt/dlt_user.h.in
+++ b/include/dlt/dlt_user.h.in
@@ -232,6 +232,7 @@ typedef struct
int8_t enable_local_print; /**< Local printing of log messages: 1 enabled, 0 disabled */
int8_t local_print_mode; /**< Local print mode, controlled by environment variable */
+ int8_t disable_injection_msg; /**< Injection msg availability: 1 disabled, 0 enabled (default) */
int8_t log_state; /**< Log state of external connection:
* 1 client connected,
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index ec05cd2..f768065 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -784,6 +784,12 @@ DltReturnValue dlt_init_common(void)
}
}
+ dlt_user.disable_injection_msg = 0;
+ if (getenv(DLT_USER_ENV_DISABLE_INJECTION_MSG)) {
+ dlt_log(LOG_WARNING, "Injection message is disabled\n");
+ dlt_user.disable_injection_msg = 1;
+ }
+
if (dlt_buffer_init_dynamic(&(dlt_user.startup_buffer),
buffer_min,
buffer_max,
@@ -3573,9 +3579,10 @@ void dlt_user_housekeeperthread_function(__attribute__((unused)) void *ptr)
while (1) {
/* Check for new messages from DLT daemon */
- if (dlt_user_log_check_user_message() < DLT_RETURN_OK)
- /* Critical error */
- dlt_log(LOG_CRIT, "Housekeeper thread encountered error condition\n");
+ if (!dlt_user.disable_injection_msg)
+ if (dlt_user_log_check_user_message() < DLT_RETURN_OK)
+ /* Critical error */
+ dlt_log(LOG_CRIT, "Housekeeper thread encountered error condition\n");
/* Reattach to daemon if neccesary */
dlt_user_log_reattach_to_daemon();
diff --git a/src/lib/dlt_user_cfg.h b/src/lib/dlt_user_cfg.h
index e8997f0..93d3206 100644
--- a/src/lib/dlt_user_cfg.h
+++ b/src/lib/dlt_user_cfg.h
@@ -157,6 +157,9 @@ typedef enum
/* Maximum msg size as per autosar standard */
#define DLT_LOG_MSG_BUF_MAX_SIZE 65535
+/* Name of environment variable for disabling the injection message at libdlt */
+#define DLT_USER_ENV_DISABLE_INJECTION_MSG "DLT_DISABLE_INJECTION_MSG_AT_USER"
+
/************************/
/* Don't change please! */
/************************/