| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dlt_offline_logstorage.c
- Parameter to isdigit is not correct
- Handle the size of memset() and strncpy() properly
dlt-test-stress-user.c
- Parameter d is duplicated
dlt_env_ll.c
- Parameter env is used before NULL check
- Remove redundant line
dlt-control-common.c
dlt_daemon_event_handler.c
- Do not use NULL variable to print log
dlt_config_file_parser.c
- Remove unnecessary loop
dlt_daemon_client.c
- Return error in NULL check
dlt_user.c
- Free allocated memory in error case
Related commit: 5c8f88d logstorage: fix compile error
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
The variables used for application id and context id are aligned with
"apid" and "ctid".
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
DLT limits the path length and does not do anything else to determine
the actual value, because the least that is supported on any system
that DLT runs on is 1024 bytes.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Allow building as a subproject of another
cmake project (CMAKE_* vs PROJECT_* variables)
2. Do not generate header files within source – bad practice, use build
directory for that(e.g. change location where dlt_version.h is being generated)
3. Use add_compile_options() instead of *_C/CXX_FLAGS variables for proper
compile environment definition, also bad practice, also see p.2
4. Add WITH_DLT_PKGCONFIG – add generate pkgconfig .pc files as switchable
option, should probably be part of headers install routine.
Signed-off-by: Radoslaw Kaczorowski <external.radoslaw.kaczorowski@bosch-softtec.com>
|
|
|
|
|
| |
Change to use nanosleep instead of usleep.
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
|
| |
There were a couple of places which used snprintf-dlt_log. It is
now replaced with dlt_vlog().
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
Since dlt_forward_msg() is not used anywhere, we will remove it.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
This commit fixes dlt_user.dlt_ll_ts to compare to NULL instead of 0.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
Fix the warning from -Wmaybe-uninitialized.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it happens that internal threads present
in DLT library are cancelled with one of the task
still holding the mutex, then the main task gets locked forever.
The following changes have been made:
- Cleanup on thread cancellation with pthread_cleanup_push() is
introduced
- Locking on the message queue lock and subsequent signaling in
dlt_stop_threads is only done if the segmented thread was created.
- It is unnecessary to have a robust mutex for the message queue.
Replace it with a normal mutex and remove EOWNERDEAD logic. Add a
pthread_cancel handler to the segmented thread that might hold the
message queue mutex.
- Message queue mutex is statically initialized
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
Rootcause: Free uninitialize memory.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
| |
Error message is printed only in error case and not in case of
expected failure.
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix compiler warnings about socket usage
Correct the data types used for the socket declaration. We use AF_UNIX
sockets so we use struct sockaddr_un, but we need to cast to struct
sockaddr for the socket API.
Fix compiler warnings about sign-compare
Fix two occurences of signed - unsigned comparison by casting the values
accordingly. Note that the cast is legal as the first parts of both
conditional statements make sure the value is not negative before
casting to unsigned.
While at it, add strtol error checking.
Fix compiler warnings about string functions
Add string.h to src/daemon/dlt_daemon_unix_socket.c, because it was
unaware of memcpy and strerror. While at it, change unsafe use of
sprintf to proper dlt_vlog and remove the char buffer.
Fix compiler warnings about unused-*
Fix two unused-variable and one unused-parameter warning. While at it,
change the #ifdef to not run into an empty block. Simply reverse the
condition and enclose the complete else with the #ifdef.
POSIX: Use memset instead of bzero
"The bzero() function is deprecated (marked as LEGACY in POSIX.1-2001);
use memset(3) in new programs."
Use memset instead of bzero and remove any occurrence from DLT. Include
of header "strings.h" that has bzero is also removed.
Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
* Size of Resend buffer less than or equal to DLT_USER_BUF_MAX_SIZE results in Memory corruption.
As older version of DLT DLT_USER_RESENDBUF_MAX_SIZE is [DLT_USER_BUF_MAX_SIZE + 100] which contains space for extra headers, where as in DLT 2.18 the resend buffer is bound to DLT_USER_BUF_MAX_SIZE which results in memory corruption in dlt_buffer_read_block when the size of the data is more than DLT_USER_BUF_MAX_SIZE.
Reason for not using "DLT_USER_RESENDBUF_MAX_SIZE" during dynamic memory allocation of resend buffer is as user has got the feasibility to alter the DLT_USER_BUF_MAX_SIZE using the environmental variables the resend buffer in any scenario to be greater then dlt_user.log_buf_len to accommodate the extra headers.
|
|
|
|
|
|
|
|
| |
0xFFFF was used as a magic number in the length field of a network
message in order to trigger a resend. DLT library will now use the
nw_trace_type field and a custom type to do this, thus assuring no
external client of the library can reach this
value(DLT_NW_TRACE_RESEND).
|
|
|
|
|
|
|
|
|
|
| |
Even if network trace is not used in the application, the library
will call mq_close() and mq_unlink() to segmented queue handles
and queue names, which triggers unnecessary close(). It is now
modified to call mq_close() and mq_unlink() only when network trace
is initialized.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DLT shall not be used in a forked child until a variant of exec() is
called, because DLT is using non async-signal-safe functions.
The forking process can continue to use libdlt's logging facilities, but
any attempt to use libdlt from the forked child will be denied.
The fork-handler test is updated to reflect this by trying to log from
the forked child which will fail. The fork then calls exec and runs
another application that can continue to use DLT.
Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
|
|
|
|
|
|
|
| |
Error handling was added in case it failed to send to daemon.
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gateway
Logstorage
Event Handler
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes socket will be closed even not all of the data is flushed to daemon.
So before closing, following will be handled:
1. Use shutdown() to shut down further transmissions
2. Subsequent read() to resend_buffer
Also socket fd is reset in child fork handler since the socket itself will
not be duplicated in the child process.
Solves JIRA: SWGIII-28702
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
with ll_ts API
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
|
|
|
|
|
|
| |
registration Macro and API which has option to register log level change callback along with it. This will avoid missing of initial log level change callback when daemon sends the log level change control msg during context registration
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
| |
private data as argument
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The poll system call is now used in the daemon to enable DLT use in
POSIX compliant systems. Also added introduced new unregister_app macro
to avoid missing of logs in startup buffer.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- dlt-control couldn't receive all the GET_LOG_INFO response message
when many applications and contexts are registered.
Therefore the receiver buffer size was extended to 65K.
Also the receive buffer size macros are reduced to one variable.
- Code cleanup and improvements
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Support to send and parse periodic control messages
-add application/contexts to passive ECU list
-Refactor dlt_gateway_send_control_message
-Gateway issues with corrupted data and on demand connection
-Unit Test update
Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com
Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com
Signed-off-by: S. Hameed shameed@jp.adit-jv.com
Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
|
|
|
|
|
|
| |
Prepare daemon to store applications/context information of other ECUs as well. This commit prepares the dlt-daemon to store logs from passive nodes in a logstorage device.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
| |
In dlt_user_log_send_log and dlt_forward_msg API's when writing the data to DLT PIPE is not successful in scenario which returns "DLT_RETURN_PIPE_ERROR"(Non availability of dlt pipe post termination of DLT DAEMON) it ideally starts stores the data in internal buffer, and close the dlt user handle, which is quiet appropriate.
The scenario were dlt application fails in writing data to dlt pipe returns DLT_RETURN_PIPE_ERROR and case were application buffer is full, the return value DLT_RETURN_PIPE_ERROR is over written to "DLT_RETURN_BUFFER_FULL" were dlt user handle will not be reset to -1, it till holds the former data which causes undefined behavior of dlt application(One behavior would be which calls dlt_user_queue_resend and internally allocates memory for segmented data and tries to free it at dlt_user_trace_network_segmented_thread which is not intended behavior, instead return silently when FIFO is not available)
|
|
|
|
|
|
|
| |
To avoid busy loop due to error of mq_receive() which is called
in sub thread, 100ms sleep is added for the error case.
Error log message for mq_receive() is also corrected to have errno.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
| |
* IPC: Unix socket added
The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option.
Socket path configurable for both FIFO and Unix Socket now configurable in CMake
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt-control: Provision to control entire system trace status
1. support for setting trace status using wildcards for both app and context
2. support for setting entire system trace status
*This Logic is as same as for changing log level.
(SHA: a966393ad7003d02870bceffa08df5ddf4bbf864
dlt-control: Provision to control entire system log level)
* dlt-daemon: Fix control entire log level / trace status issue
In previous, dlt-control could send request to set
all log level / trace status with DLT_LOG_DEFAULT / DLT_TRACE_STATUS_DEFAULT(-1).
However, dlt-daemon could not accept these value.
This change fix this issue so that setting log level/trace status of
all registered contexts become possible.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix -Wpointer-compare of compare with null char
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common: fix -Wformat-truncation of snprintf
Avoid snprintf output truncation by handling return value
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_offline_trace: Fix Wformat-truncation of snprintf
Compile with Gcc 7.x has the warning of snprintf buffer length size.
Check return value of snprintf() for avoiding the warning.
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common_test: Fix memleak t_dlt_message_read
some resources were not free after using.
Detected by running
valgrind --leak-check=full ./gtest_dlt_common
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
| |
|
|\
| |
| | |
dlt-client: fix dlt_client_cleanup memory handling
|
| |
| |
| |
| |
| |
| |
| | |
Setter function introduced for seting up string parameters which are
free'd in dlt_client_cleanup
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|/
|
|
|
|
|
|
| |
When the user library receives a log with log level DLT_LOG_FATAL it
triggers a segmentation fault to provide information to the developer
via tools like coredump.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds environment variables to configure user library
ringbuffer and step size.
The following variables can be set:
DLT_USER_BUFFER_MIN - for minimal size
DLT_USER_BUFFER_MAX - for maximal size
DLT_USER_BUFFER_STEP - for step size
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|