| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This timeout is necessary to prevent
blocking writev indefinitely.
Without the timeout dlt-daemon, may block
indefinitely when an app id is re-used
very frequently.
In that case dlt-daemon won't accept anymore
new connections and further communication
in any way is not possible anymore.
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
| |
* Fix macro code to use boolean value in while instruction (false)
Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
|
|
|
|
|
| |
DLT_LOG is using internally function which are not async-signal safe (like calloc, vsnprintf). Therefore, it needs to be removed from the signal handler
Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Re-Initialize internal logging in daemon mode only
Re-Initialize internal logging is triggered twice during startup.
This fixed might be a simplified initailization code for DLT.
Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
* Re-Initialize internal logging in daemon mode only
Re-Initialize internal logging is triggered twice during startup.
This fixed might be a simplified initailization code for DLT.
Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
| |
* logstorage: Adds option to write logs in gzip format
Adds functionality to allow storing offline logs in gzipped files
instead of standard dlt files.
* Ensure tests run safely with or without GZIP compression enabled
* Enforce minimum version of zlib if enabling gzip compression
|
|
|
|
|
|
| |
make sure that a string with exactly UINT16_MAX bytes does not
overflow the dlt buffer
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
| |
header list (#462)
Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
|
|
|
|
|
|
|
| |
in case the house keeper thread does not start
we should not wait indefinitely but abort
the wait after a 10s
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
| |
In AOSP, system/logging/liblog/logprint.cpp --> android_log_processLogBuffer:
entry->priority = static_cast<android_LogPriority>(msg[0])
msg[0] is used to obtain the log level
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Since android 12 release (and the introduction of this commit
https://chromium.googlesource.com/aosp/platform/system/
logging/+/b674866203f05957b2ac5db94c3c0fe3d1d36793), the define
ANDROID_LOG_RDONLY and friends have been removed (see the commit
for the explanation). Therefore, dlt-logd-converter can't compile
anymore since this version.
* ANDROID_LOG_RDONLY was a define on O_RDONLY. O_RDONLY is now used
to allow the compilation on android 12 as well as previous versions
* <log/logprint.h> include is removed because we aren't using any
API from this file and moreover, this file shouldn't be included from
vendor application (not part of public API)
* Direct include on "system/core/include" inside Android.bp is removed
because it was previously used to find <log/logprint.h>. This should
be avoided. We should keep android build system providing right
headers path for us :)
Signed-off-by: Sébastien RAILLET <sebastien.raillet@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance dlt logging such that multiple files are used as it is done
for the offline traces. Add limit-specific config values for logging.
For this purpose the pattern of index-based file names is used only.
This approach of logging to multiple files and rotating in order
to keep the limits ensures that dlt logs take care of available
space on the underlying file system and do not grow infinitely.
Signed-off-by: Daniel Weber <daniel.w.weber@daimler.com>
Co-authored-by: Oleg Tropmann <oleg.tropmann@daimler.com>
|
|
|
|
|
|
| |
(#449)
Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
Co-authored-by: Stephen Smoogen <ssmoogen@redhat.com>
|
|\
| |
| | |
dlt-connection: add socket timeout
|
| |
| |
| |
| |
| |
| |
| |
| | |
in some scenarios a socket might block forever.
This means dlt-daemon won't respond properly anymore.
To fix this a timeout is added to the dlt-daemon socket connection.
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
| |
| |
| |
| |
| |
| | |
Free the ecuid_conf in case of memory alllocated
Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
|
|\ \
| |/
|/| |
Check for negative index in dlt_file_message
|
| |
| |
| |
| |
| |
| | |
Fixes #436
Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
wait until the house keeper is up and running
this makes sure dlt_init / dlt_free in close succession
closes this thread properly.
Otherwise we might keep the dlt socket open
Check if the thread is running every 10ms
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
| |
| |
| |
| |
| | |
Free the index which already allocated memory in dlt_file_read phase
Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If dlt_free is called while dlt_init is running, the dlt-user library
crashes because the init and free where not thread safe.
This commit introduces a new field dlt_user_initialising
which will prevent entering dlt_free while dlt_init is running.
Correctness is ensured by a unit test
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|/
|
|
|
|
|
|
| |
Reset Receiver at connection close to prevent corruption
Prevent out of bounds reads
Fix connection select when processing passive node messages
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|
|
|
|
|
|
|
| |
If the file size is divisible by the package size
don't send one empty FLDA.
Also we send the correct number of FLDAs too.
Signed-off-by: Daniel Weber <daniel.w.weber@mercedes-benz.com>
|
|
|
|
| |
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt-system: Fix buffer overflow detection on 32bit targets
On 32bit target, dlt-system will termiated with error:
dlt-system: *** buffer overflow detected ***: terminated
Signed-off-by: Changqing Li <changqing.li@windriver.com>
* Fixed newline at EOF
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Co-authored-by: michael-methner <mmethner@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#420)
* dlt-receive: Allow listening to multiple udp multicast addresses
Multiple udp multicast addresses can now be specified, e.g:
dlt-receive -u 224.255.1.1 225.255.1.1
Signed-off-by: Alexander Irion <alexander_irion@mentor.com>
* dlt-receive: Add option to set host interface address
Signed-off-by: Alexander Irion <alexander_irion@mentor.com>
Signed-off-by: Alexander Irion <alexander.irion@partner.bmw.de>
Co-authored-by: Alexander Irion <alexander_irion@mentor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
dlt_daemon_client.c Adding NULL check for tok
dlt_daemon_offline_logstorage.c : Adding NULL check for application
dlt_user.c : Fix for Memory Leak
dlt-daemon.c : Fix for Resource Leak
dlt_config_file_parser.c : Add termination character at the end of string
dlt_offline_trace.c : Fix for Resource Leak
Signed-off-by: Mvaradaraj2 manoj.varadaraj2@harman.com
Co-authored-by: Le Tin <tin.le@vn.bosch.com>
|
|
|
|
|
|
| |
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
Co-authored-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
dlt_getloginfo_conv_ascii_to_id (#411)
* Avoid memory corruption behind buffer wp in function dlt_getloginfo_conv_ascii_to_id
- Introduced new function dlt_getloginfo_conv_ascii_to_string for '\0' terminated strings
- Avoid printing garbage characters in dlt-control after APID and CTID (which are not null terminated anymore)
- Added unit test for dlt_client_parse_get_log_info_resp_text and dlt_getloginfo_conv_ascii_to_string
- Use dlt_getloginfo_conv_ascii_to_string to get '\0' terminated for app_description and context_description
Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
|
|
|
|
|
|
|
| |
Switch dlt_vlog() to dlt_user_printf(), the message could be
observed in case the log can not be written in file
Signed-off-by: Le Tin <tin.le@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the following issues if access
to the internal log file is not possible (logging_mode = DLT_LOG_TO_FILE)
* dlt_log_free tried to call fclose on a nullptr
Added a nullcheck for this
* Access to log file might be denied but access to logs is still wanted
Add a new CMake option WITH_DLT_FILE_LOGGING_SYSLOG_FALLBACK
If this is set to ON and the logging moe is set to file,
the dlt-daemon will fall back to syslog if opening the internal log
file failed
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
|
|
|
|
|
|
| |
dlt-daemon now support activation via systemd socket.
This allows dlt-daemon to be started as soon as an application
is requesting access to the dlt socket.
This commits implements opening the socket only when
UNIX_SOCKET is used for IPC
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
|
|
|
|
| |
- Type of return value of strncmp() is int
- Should replace int8_t by int to avoid error when casting
Signed-off-by: Le Tin <tin.le@vn.bosch.com>
Signed-off-by: Le Tin <tin.le@vn.bosch.com>
Co-authored-by: Le Tin <tin.le@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
Connect TCP socket with non-blocking socket
Check errno and getsockopt to guarantee that the socket connection is established successfully
Signed-off-by: Le Tin <tin.le@vn.bosch.com>
Signed-off-by: Le Tin <tin.le@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
* dlt-gateway crashed when an invalid
ip address was configured as a null pointer
was used for strdup
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
|
| |
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
Co-authored-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up to now the default for logging is stdout (DLT_LOG_TO_CONSOLE).
Scenario:
program_a arg1 | dd of=/my-beauty-case
If program_a wants to log to dlt, but it fails to connect to the socket:
socket /run/dlt-files/dlt cannot be opened, error:Resource temporarily
unavailable. Retrying later...
The error will be logged by default to stdout leading in the best case
to an error and in the worst to damaged partitions.
To solve this log to STDERR (DLT_LOG_TO_STDERR) by default.
Co-authored-by: Tobias Kaufmann <Tobias.KA.Kaufmann@bmw.de>
|
|
|
|
|
|
|
|
| |
dlt-daemon allows configuration of multiple addresses.
Before this commit the daemon exits when the first binding fails.
This commit changes the behavior so that the daemon only exits
if none of the configured addresses can be opened.
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
|
| |
if an application sends a message with a level below context level
and the level enforcement is on, the message will be dropped
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common: Handle returned value
- The returned value of supporting APIs should be checked correctly.
- In case of extended header, the buffer of header must be checked
before proceeding further.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* console: Handle returned value
In case of parsing dlt file, the failed messages
should be skipped by evaluating returned value
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
In the dlt_config_file_set_section function of dlt_config_file_parser.c:
s-name is not set to null after free.
It will be freed again in the dlt_config_file_release function.
Signed-off-by: Zhongyang.Bao <Zhongyang.Bao@zeekrlife.com>
|
|\
| |
| | |
filetransfer: Fix getFileCreationDate2 stat check
|
| |
| |
| |
| | |
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|
|\ \
| | |
| | | |
cmake: Add options to enable/disable each dlt console tool
|
| |/
| |
| |
| |
| |
| |
| | |
This commits adds several cmake options to enable or disable
each console tool separately.
Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
|
|/
|
|
|
|
|
|
|
|
| |
by itself
This commit adds two options to enable the udp and stdin
adaptor indendent from each other.
Therefore only the necessary component can be enabled
Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
|
|
|
|
|
|
| |
- Fix DLT Test Client expected string in Test 5 (for Better formatting of RAWD #291)
- Fix DLT Test User Disable Macro usage: #cmakedefine01 DLT_DISABLE_MACRO (from dlt_user.h.in) still defines the macro even though DLT_DISABLE_MACRO is not set inside CMake.
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|
|
|
|
|
| |
Closes #352
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
| |
Closes #353
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
Also tested with the latest version running on Windows XP (gcc-5.4.0)
(http://www.crouchingtigerhiddenfruitbat.org/cygwin/timemachine.html).
Signed-off-by: Adder <adder_2003@yahoo.com>
|
|
|
| |
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
|