diff options
-rw-r--r-- | src/lib/dlt_user.c | 3 | ||||
-rwxr-xr-x | src/shared/dlt_common.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index 407154f..afacf03 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -406,6 +406,7 @@ int dlt_init_common(void) } /* Initialize LogLevel/TraceStatus field */ + DLT_SEM_LOCK(); dlt_user.dlt_ll_ts = 0; dlt_user.dlt_ll_ts_max_num_entries = 0; dlt_user.dlt_ll_ts_num_entries = 0; @@ -413,8 +414,10 @@ int dlt_init_common(void) if (dlt_buffer_init_dynamic(&(dlt_user.startup_buffer), DLT_USER_RINGBUFFER_MIN_SIZE, DLT_USER_RINGBUFFER_MAX_SIZE, DLT_USER_RINGBUFFER_STEP_SIZE)==-1) { dlt_user_initialised = 0; + DLT_SEM_FREE(); return -1; } + DLT_SEM_FREE(); signal(SIGPIPE,SIG_IGN); /* ignore pipe signals */ diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c index 09a3258..8047fcb 100755 --- a/src/shared/dlt_common.c +++ b/src/shared/dlt_common.c @@ -2378,6 +2378,7 @@ int dlt_buffer_init_static_client(DltBuffer *buf, const unsigned char *ptr, uint int dlt_buffer_init_dynamic(DltBuffer *buf, uint32_t min_size, uint32_t max_size,uint32_t step_size) { + //Do not DLT_SEM_LOCK inside here! char str[256]; DltBufferHead *head; |