summaryrefslogtreecommitdiff
path: root/src/lib/dlt_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dlt_user.c')
-rw-r--r--src/lib/dlt_user.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index d040d38..4ae1fde 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -365,16 +365,12 @@ DltReturnValue dlt_init(void)
memset(&(dlt_user.dlt_shm), 0, sizeof(DltShm));
/* init shared memory */
- if (dlt_shm_init_client(&(dlt_user.dlt_shm), DLT_SHM_KEY) < 0) {
- dlt_vlog(LOG_WARNING,
- "Logging disabled, Shared memory %d cannot be created!\n",
- DLT_SHM_KEY);
- /*return 0; */
- }
+ if (dlt_shm_init_client(&(dlt_user.dlt_shm), dltShmName) < DLT_RETURN_OK)
+ dlt_vnlog(LOG_WARNING, DLT_USER_BUFFER_LENGTH, "Logging disabled,"
+ " Shared memory %s cannot be created!\n", dltShmName);
#endif
#ifdef DLT_USE_UNIX_SOCKET_IPC
-
if (dlt_initialize_socket_connection() != DLT_RETURN_OK)
/* We could connect to the pipe, but not to the socket, which is normally */
/* open before by the DLT daemon => bad failure => return error code */
@@ -382,7 +378,6 @@ DltReturnValue dlt_init(void)
return DLT_RETURN_ERROR;
#else /* FIFO connection */
-
if (dlt_initialize_fifo_connection() != DLT_RETURN_OK)
return DLT_RETURN_ERROR;
@@ -391,7 +386,6 @@ DltReturnValue dlt_init(void)
dlt_user_initialised = false;
return DLT_RETURN_ERROR;
}
-
#endif
/* These will be lazy initialized only when needed */
@@ -4439,13 +4433,9 @@ void dlt_user_log_reattach_to_daemon(void)
#ifdef DLT_SHM_ENABLE
/* init shared memory */
- if (dlt_shm_init_client(&dlt_user.dlt_shm, DLT_SHM_KEY) < 0)
- dlt_vnlog(LOG_WARNING,
- DLT_USER_BUFFER_LENGTH,
- "Loging disabled, Shared memory %d cannot be created!\n",
- DLT_SHM_KEY);
- /*return DLT_RETURN_OK; */
-
+ if (dlt_shm_init_client(&dlt_user.dlt_shm, dltShmName) < DLT_RETURN_OK)
+ dlt_vnlog(LOG_WARNING, DLT_USER_BUFFER_LENGTH, "Logging disabled,"
+ " Shared memory %s cannot be created!\n", dltShmName);
#endif
dlt_log(LOG_NOTICE, "Logging (re-)enabled!\n");