summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update CMakeLists.txt (#482)HEADmasterGianfranco Costamagna2023-05-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | * Update CMakeLists.txt Link systemd libraries, to avoid underlinking of tests with -DWITH_SYSTEMD_SOCKET_ACTIVATION=ON [ 82%] Linking CXX executable gtest_dlt_daemon_gateway cd dlt-daemon-2.18.9/obj-x86_64-linux-gnu/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/gtest_dlt_daemon_gateway.dir/link.txt --verbose=1 /usr/bin/c++ -g -O2 -ffile-prefix-map=dlt-daemon-2.18.9=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /include -std=gnu++0x -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -rdynamic CMakeFiles/gtest_dlt_daemon_gateway.dir/gtest_dlt_daemon_gateway.cpp.o CMakeFiles/gtest_dlt_daemon_gateway.dir/__/systemd/3rdparty/sd-daemon.c.o -o gtest_dlt_daemon_gateway -Wl,-rpath,dlt-daemon-2.18.9/obj-x86_64-linux-gnu/src/daemon ../src/daemon/libdlt_daemon.so /usr/lib/x86_64-linux-gnu/libgtest.a /usr/lib/x86_64-linux-gnu/libgtest_main.a -lrt /usr/lib/x86_64-linux-gnu/libgtest.a /usr/bin/ld: ../src/daemon/libdlt_daemon.so: undefined reference to `sd_listen_fds_with_names' * Add systemd libs for WITH_SYSTEMD as well and removed deprecated versions Signed-off-by: Michael Methner <mmethner@de.adit-jv.com> --------- Signed-off-by: Michael Methner <mmethner@de.adit-jv.com> Co-authored-by: Michael Methner <mmethner@de.adit-jv.com>
* build: add static lib only if necessary (#479)Alexander Mohr2023-05-172-1/+7
| | | | | | | | | adding static library should only be enabled if the dlt library is build static. Adding this to the automotive-dlt.pc.in when static libraries are disabled yocto build will break Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* dlt_user_shared: Add timeout to writev (#385)Alexander Mohr2023-05-175-4/+78
| | | | | | | | | | | | 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) (#469)michael-methner2023-05-086-39/+43
| | | | | * Fix macro code to use boolean value in while instruction (false) Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
* cmake: set version to 2.18.9 (#478)Alexander Mohr2023-05-051-1/+1
| | | | | | this version will be used to create filenames etc and should reflect the current version Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* Update AUTOSAR standard link (#480)lucafrance2023-05-051-1/+1
| | | | The current link might be dead (error 503): https://www.autosar.org/fileadmin/user_upload/standards/classic/4-0/AUTOSAR_SWS_DiagnosticLogAndTrace.pdf Replacing with working link of an updated version 4 of the standard: https://www.autosar.org/fileadmin/standards/R22-11/CP/AUTOSAR_SWS_DiagnosticLogAndTrace.pdf
* Update gtest_dlt_daemon_multiple_files_logging.cpp (#481)Gianfranco Costamagna2023-05-051-2/+2
| | | | | | | | | | | | | | | | | | | Fix build error due to dlt_vlog not having the correct format string with security build flags enabled [ 88%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon_multiple_files_logging.dir/gtest_dlt_daemon_multiple_files_logging.cpp.o cd dlt-daemon-2.18.9/obj-x86_64-linux-gnu/tests && /usr/bin/c++ -DCONFIGURATION_FILES_DIR=\"/etc\" -DDLT_DAEMON_USE_FIFO_IPC -DDLT_LIB_USE_FIFO_IPC -DDLT_NETWORK_TRACE_ENABLE -DDLT_SYSTEMD_ENABLE -DDLT_SYSTEMD_JOURNAL_ENABLE -DDLT_UNIT_TESTS -DDLT_USER_IPC_PATH=\"/tmp\" -DDLT_USE_IPv6 -DEXTENDED_FILTERING -D_GNU_SOURCE -Idlt-daemon-2.18.9 -Idlt-daemon-2.18.9/obj-x86_64-linux-gnu/include/dlt -Idlt-daemon-2.18.9/include/dlt -Idlt-daemon-2.18.9/src/shared -Idlt-daemon-2.18.9/src/core_dump_handler -Idlt-daemon-2.18.9/src/offlinelogstorage -Idlt-daemon-2.18.9/src/lib -Idlt-daemon-2.18.9/src/daemon -Idlt-daemon-2.18.9/src/console -Idlt-daemon-2.18.9/src/gateway -Idlt-daemon-2.18.9/systemd/3rdparty -g -O2 -ffile-prefix-map=dlt-daemon-2.18.9=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /include -std=gnu++0x -std=gnu++11 -Wall -Wextra -Wno-variadic-macros -Wno-strict-aliasing -DGTEST_HAS_PTHREAD=1 -MD -MT tests/CMakeFiles/gtest_dlt_daemon_multiple_files_logging.dir/gtest_dlt_daemon_multiple_files_logging.cpp.o -MF CMakeFiles/gtest_dlt_daemon_multiple_files_logging.dir/gtest_dlt_daemon_multiple_files_logging.cpp.o.d -o CMakeFiles/gtest_dlt_daemon_multiple_files_logging.dir/gtest_dlt_daemon_multiple_files_logging.cpp.o -c dlt-daemon-2.18.9/tests/gtest_dlt_daemon_multiple_files_logging.cpp dlt-daemon-2.18.9/tests/gtest_dlt_daemon_multiple_files_logging.cpp: In member function ‘virtual void t_dlt_logging_multiple_files_append_reinit_normal_Test::TestBody()’: dlt-daemon-2.18.9/tests/gtest_dlt_daemon_multiple_files_logging.cpp:106:13: error: format not a string literal and no format arguments [-Werror=format-security] 106 | dlt_vlog(LOG_INFO, log1); | ~~~~~~~~^~~~~~~~~~~~~~~~ dlt-daemon-2.18.9/tests/gtest_dlt_daemon_multiple_files_logging.cpp:110:13: error: format not a string literal and no format arguments [-Werror=format-security] 110 | dlt_vlog(LOG_INFO, log2); | ~~~~~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/string.h:535, from /usr/include/gtest/internal/gtest-port.h:264, from /usr/include/gtest/internal/gtest-internal.h:40, from /usr/include/gtest/gtest.h:62, from dlt-daemon-2.18.9/tests/gtest_dlt_daemon_multiple_files_logging.cpp:27: In function ‘strncpy’,
* Remove use of DLT_LOG in signal handler (#472)michael-methner2023-04-261-9/+1
| | | | | 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 (#459)lvklevankhanh2023-04-191-10/+0
| | | | | | | | | | | | | | | | * 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 (#442)Linus Probert2023-04-1910-136/+478
| | | | | | | | | | * 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
* Update status badges on README.md (#467)michael-methner2023-04-191-5/+2
| | | Removed deprecated LGTM, added CodeQL
* Update ReleaseNotes and version to v2.18.9 (#468)Minh Quang Luu2023-04-191-1/+67
| | | Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
* dlt-user: fix crash with certain strings (#463)v2.18.9Alexander Mohr2023-04-171-9/+9
| | | | | | 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>
* dlt_multiple_files: remove superfluous mode bits and add header file to ↵Minh Quang Luu2023-04-122-4/+3
| | | | | header list (#462) Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
* Android: Add new feature in Android bp (#461)Minh Quang Luu2023-03-291-0/+2
| | | | | | Add required sources files to Android.bp Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com> Co-authored-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
* cmake: remove duplicated option message (#454)Minh Quang Luu2023-03-221-1/+0
| | | Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
* house-keeper: remove infinite wait (#438)Alexander Mohr2023-03-221-18/+44
| | | | | | | 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>
* dlt-logd-converter: Fix getting log level from log msg (#456)RobinChenJP2023-03-201-1/+1
| | | | | 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
* dlt-logd-converter: fixes android 12 compilation (#445)v2.18.9-alphasebastienr2023-03-142-5/+1
| | | | | | | | | | | | | | | | | | | * 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>
* logfile: exhance internal dlt logging by introducing size limits (#369)Daniel Weber2023-03-1016-508/+1247
| | | | | | | | | | | 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>
* This changes a mispatch from fcb676a7 to install the udp binary correctly. ↵Stephen Smoogen2023-03-081-1/+1
| | | | | | (#449) Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com> Co-authored-by: Stephen Smoogen <ssmoogen@redhat.com>
* Installs dlt.conf on android (#446)sebastienr2023-03-081-0/+9
| | | | | * Currently on android, there is no dlt-daemon configuration installed by default. This change allows to install the dlt.conf along with the dlt-daemon during compilation phase.
* Merge pull request #439 from alexmohr/add-socket-timeoutlvklevankhanh2023-02-281-0/+15
|\ | | | | dlt-connection: add socket timeout
| * dlt-connection: add socket timeoutAlexander Mohr2023-02-221-0/+15
| | | | | | | | | | | | | | | | 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>
* | Merge pull request #441 from lvklevankhanh/fix_memory_leaklvklevankhanh2023-02-091-0/+2
|\ \ | | | | | | Fix memory leak
| * | Fix memory leakLe Van Khanh2023-02-091-0/+2
|/ / | | | | | | | | | | Free the ecuid_conf in case of memory alllocated Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
* | Merge pull request #437 from michael-methner/masterlvklevankhanh2023-02-021-1/+1
|\ \ | |/ |/| Check for negative index in dlt_file_message
| * Check for negative index in dlt_file_messageMichael Methner2023-01-271-1/+1
| | | | | | | | | | | | Fixes #436 Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
* | dlt-user: fix potential non closed socket in init/free (#435)Alexander Mohr2023-01-201-4/+39
| | | | | | | | | | | | | | | | | | 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>
* | dlt-convert: Fix memory leak by calling dlt_file_free (#434)lvklevankhanh2023-01-201-0/+2
| | | | | | | | | | Free the index which already allocated memory in dlt_file_read phase Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
* | dlt-user: Fix crashes in dlt_free during dlt_init (#362)Alexander Mohr2023-01-112-83/+187
| | | | | | | | | | | | | | | | | | 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>
* | Update contacts and removed mailing lists (#431)michael-methner2023-01-101-5/+2
| |
* | Merge pull request #429 from andreirusu96/gateway_handling_improvementslvklevankhanh2023-01-071-7/+16
|\ \ | |/ |/| gateway: Fix Node handling and ECUid checks
| * gateway: Fix Node handling and ECUid checksAndrei-Mircea Rusu2022-12-131-7/+16
| | | | | | | | | | | | | | | | 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>
* | Updates for Coding Styles (#425)Bui Nguyen Quoc Thanh2022-12-144-2739/+133
|/ | | | | | | - Remove uncrustify - Use clang-format and pre-commit hooks script - Update README accordingly Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* filetransfer: fix filesize divisible by blocksize case (#383)Daniel Weber2022-12-011-0/+7
| | | | | | | 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>
* client: Fix Get Log Info response conversion method (#422)Andrei Rusu2022-11-302-3/+4
| | | | Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
* cmake: network trace enable toggle (#424)Daniel Weber2022-11-301-6/+12
| | | | | Add cmake toggle to disable network trace. Signed-off-by: Daniel Weber <daniel.w.weber@mercedes-benz.com>
* dlt-system: Fix buffer overflow detection on 32bit targets (#398)Sandy2022-10-261-3/+4
| | | | | | | | | | | | | * 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>
* dlt-receive: set host interface and allow multiple udp multicast addresses ↵Bui Nguyen Quoc Thanh2022-10-262-36/+60
| | | | | | | | | | | | | | | | (#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>
* Fix for Resource and Memory Leak (#418)lti9hc2022-10-266-21/+39
| | | | | | | | | | | 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>
* dlt_daemon_client: Fix Control Msg ECUId comparison with active Gateway (#414)Andrei Rusu2022-10-131-1/+1
| | | | | | 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>
* Avoid memory corruption behind buffer wp in function ↵michael-methner2022-10-115-13/+131
| | | | | | | | | | | | 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>
* dlt_common: change output of message for log initialization (#412)lti9hc2022-10-061-1/+1
| | | | | | | 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>
* internal-logging: Fix issues with file logging (#378)Alexander Mohr2022-10-055-7/+35
| | | | | | | | | | | | | 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>
* systemd: add support for socket activation via systemd (#401)Alexander Mohr2022-10-055-1/+77
| | | | | | | | | | | 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>
* Update maintainer (#410)Bui Nguyen Quoc Thanh2022-10-051-1/+1
| | | | | | | Michael Methner is taking over the role from Saya Sugiura Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com> Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* dlt_daemon_client: Fix change loglevel of application (#408)lti9hc2022-09-281-4/+4
| | | | | | | | | - 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>
* dlt_client:Block in connect() (#409)Bui Nguyen Quoc Thanh2022-09-281-6/+66
| | | | | | | | | 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: Fix crash on invalid ip (#381)Alexander Mohr2022-09-282-1/+5
| | | | | | | | * 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>