summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_common.c
diff options
context:
space:
mode:
authorManikandanC <Manikandan.Chockalingam@in.bosch.com>2017-05-22 10:57:21 +0530
committerChristoph Lipka <clipka@users.noreply.github.com>2018-12-10 15:40:58 +0100
commitb2ce65d9947849160e04e751075c7fe4b5dcd158 (patch)
tree17bd0227f0d26d3557deecb83b026284975019a1 /src/daemon/dlt_daemon_common.c
parentea836f6de185f32c14404950f5cfb2ebf084e1ca (diff)
downloadDLT-daemon-b2ce65d9947849160e04e751075c7fe4b5dcd158.tar.gz
Dynamic allocation of msg buffer
It is possible to change the default buffer size for log message creation via environment variable: export DLT_LOG_MSG_BUF_LEN=<value> Instead of using a static buffer with size of 1390 bytes, the buffer is allocated dynamically with the specified value.The max size is restricted to approx 65k. Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rw-r--r--src/daemon/dlt_daemon_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c
index 990c029..ce2de71 100644
--- a/src/daemon/dlt_daemon_common.c
+++ b/src/daemon/dlt_daemon_common.c
@@ -89,7 +89,7 @@
#include "dlt_daemon_serial.h"
static char str[DLT_DAEMON_COMMON_TEXTBUFSIZE];
-
+char *app_recv_buffer = NULL; /* pointer to receiver buffer for application msges */
sem_t dlt_daemon_mutex;
static int dlt_daemon_cmp_apid(const void *m1, const void *m2)
@@ -280,7 +280,10 @@ int dlt_daemon_free(DltDaemon *daemon, int verbose)
}
free(daemon->user_list);
-
+ if (app_recv_buffer)
+ {
+ free(app_recv_buffer);
+ }
/* free ringbuffer */
dlt_buffer_free_dynamic(&(daemon->client_ringbuffer));