summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update contacts and removed mailing listsupdate-contacts-and-remove-mailing-listmichael-methner2023-01-031-5/+2
|
* 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>
* Update dlt_for_developers.md (#405)Bruno Marques2022-09-281-1/+2
| | | Fix error in suggested best-practice code snippet
* logstorage: Truncate ECUid in Logstorage filter to prevent crash (#402)Andrei Rusu2022-09-211-4/+4
| | | | | | 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_common.c: Change default logging_mode (#406)wusto2022-09-211-1/+1
| | | | | | | | | | | | | | | | | 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-connection: Start up even if not all bindings are valid (#380)Alexander Mohr2022-08-101-4/+10
| | | | | | | | 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>
* enforce-trace-limit: ContextLogLevel is now enforced in the daemon (#382)Alexander Mohr2022-08-102-4/+23
| | | | | | 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>
* automotive-dlt.pc: add the path to find the static library (#387)Charles Chan2022-07-181-1/+1
| | | Make the user find the static library by pkg-config, when BUILD_SHARED_LIBS=OFF.
* systemd: install adaptor-udp service for adaptor=on (#393)Daniel Weber2022-07-131-1/+1
| | | | | | | Re-add install adaptor-udp service for WITH_DLT_ADAPTOR=ON. Signed-off-by: Daniel Weber <daniel.w.weber@mercedes-benz.com> Co-authored-by: Daniel Weber <daniel.w.weber@mercedes-benz.com>
* Fix handle returned value (#384)Bui Nguyen Quoc Thanh2022-07-073-25/+59
| | | | | | | | | | | | | | | | * 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>
* README: Update link to github actions (#392)Saya Sugiura2022-06-291-1/+1
| | | | | Set link to github actions in COVESA/dlt-daemon. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Update for CI (#389)Bui Nguyen Quoc Thanh2022-06-293-67/+40
| | | | | | | - Add ctest in Actions - Remove travis ci - Update Build Status in README.md Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Fix a double-free bug.Safe-BCY2022-05-111-0/+1
| | | | | | | | 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>
* Merge pull request #361 from andreirusu96/masterBui Nguyen Quoc Thanh2022-05-101-5/+5
|\ | | | | filetransfer: Fix getFileCreationDate2 stat check
| * filetransfer: Fix getFileCreationDate2 stat checkAndrei-Mircea Rusu2022-01-031-5/+5
| | | | | | | | Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
* | Merge pull request #363 from alexmohr/make-console-tools-configurableBui Nguyen Quoc Thanh2022-05-102-2/+20
|\ \ | | | | | | cmake: Add options to enable/disable each dlt console tool
| * | cmake: Add options to enable/disable each dlt console toolAlexander Mohr2022-01-252-2/+20
| |/ | | | | | | | | | | | | This commits adds several cmake options to enable or disable each console tool separately. Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
* | Merge pull request #364 from alexmohr/make-adaptor-configurableBui Nguyen Quoc Thanh2022-05-104-17/+27
|\ \ | | | | | | cmake: Add option to enable each adaptor by itself
| * | Issue-ID: make-adaptor-configurablecmake: Add option to enable each adaptor ↵Alexander Mohr2022-05-094-17/+27
| |/ | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #372 from mawillers/fix_cmake_target_name_in_readmeBui Nguyen Quoc Thanh2022-05-091-1/+1
|\ \ | |/ |/| Fix the target name in documentation
| * Fix the target name in documentationMartin Willers2022-04-091-1/+1
|/ | | | | | Closes #365 Signed-off-by: Martin Willers <M.Willers@gmx.net>
* tests: Deplicate unused files and variables (#359)Saya Sugiura2021-12-232-3/+0
| | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fix DLT User/Client tests (#357)Andrei Rusu2021-12-212-22/+22
| | | | | | - 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>
* lib: Correct VARI usage in dlt_user_log_write_uint (#356)Saya Sugiura2021-12-101-14/+86
| | | | | Closes #352 Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* filetransfer: Return error if no free space (#354)Saya Sugiura2021-12-091-1/+3
| | | | | Closes #353 Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Support for Cygwin toolchain. (#351)DoctorNoobingstoneIPresume2021-11-1510-4/+10
| | | | | | 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>
* dlt-system: fix invalid free by removing unused TempDir (#350)Andrei Rusu2021-11-122-12/+0
| | | Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
* fix -Wformat issues reported by clang (#349)sebastienr2021-11-092-8/+8
| | | | | | | | | | | | | | * some previous dlt_vlog was using %lu specifier to display an uint64_t variable. However, this isn't portable as depending on the system you're targeting (32bits, 64bits, Linux, android, etc.), the uint64_t can be an unsigned long long. This prevents compilation on system where -Werror and -Wformat is activated coupled with a less tolerant compiler (e.g clang). Instead, PRIxN macros (e.g PRIu64 for uint64_t) are now used as specifier to ensure compatibility for each platforms * for bytes_read which is of type ssize_t, zd specifier is used as indicated in C99 standard * for st_size (from struct stat) which is of type off_t, POSIX says that it should be a signed integer. To be safe, we now use %jd specifier to ensure that it will fit correctly
* Forcibly the severity level set (#346)dhnatiuk12021-11-031-0/+3
| | | | | | | | | Some QNX components when bringing up send messages of severity type "FATAL" instead of "INFO" via slogger2. QNX component send messages of payload data_type = SLOG2_TYPE_ONLINE. The buffer is new and just came online. dlt-qnx-slogger2 does not support info->data_type = SLOG2_TYPE_ONLINE and therefore sets the wrong log level. This commit forcibly change the severity level for all info->data_type = SLOG2_TYPE_ONLINE to SLOG2_INFO. Signed-off-by: Dinidrol <vamovitch@gmail.com>
* daemon: Do not exit when accept returns ECONNABORTED (#347)rvalovyi2021-11-031-0/+2
| | | | | | | | | | | | Scan of port 3490 from a Linux machine by 'nmap -v -p 3490 -Pn IP_address_of_QNX_board' leads to dlt-daemon crash. It is necessary to parse the code of the returned error in errno. If errno = ECONNABORTED it means there was an attempt to scan port 3490 and on this error there is no need to exit the application by error. Fix for the issue https://github.com/GENIVI/dlt-daemon/issues/341 Signed-off-by: Ruslan Valovyi <ruslan.valovyi@volvocars.com>
* dlt-system : fix invalid free with ConfigurationFileNameMarc TITINGER2021-10-211-2/+2
| | | | | | | | | when using default const string. this location is free()'ed in the cleanup routine, leading to bugcheck upon exit. Use strdup to allocate memory, that can be free()'ed. Signed-off-by: Marc TITINGER <marc.titinger@non.se.com>
* dlt-daemon: Only create directories if they do not exist yetAlexander Mohr2021-10-211-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | dlt_mkdir_recursive runs mkdir for directories which already exist. This fails if the directory already exists and the dlt-daemon does not have the permissions to change the mode on the directory. On many systems the directories are not created by dlt-daemon itself but rather through the build system or while the root filesystem is created. At this stage the permissions are already set properly and they might be less permissive than what dlt-daemon expects but still sufficient. For example is rwx not necessary for each directory in the tree. Before this commit the following scenario would fail: * Path is set to /mnt/dlt/ * mnt has 755 permissions for root * dlt has 755 for dlt user As dlt daemon would try to run mkdir on /mnt dlt_mkdir_recursive would fail due to lack of permissions although the permissions are sufficient for dlt-daemon to work and write its files into /mnt/dlt/ With this commit /mnt would not be created anymore because it already exists. If the permissions are not sufficient for dlt-daemon to write in it will fail when trying to create files and exit at this point Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
* fixes compilation issue with clangSebastien RAILLET2021-10-131-2/+2
| | | | | | | * function atomic_compare_exchange_strong expect a pointer to an _Atomic type. dlt_user_initialised is now an atomic_bool * function dlt_set_filesize_max returned a DLT_LOG_ERROR which isn't a DltReturnValue. This commit replaces DLT_LOG_ERROR by DLT_RETURN_ERROR which is the expected return type Signed-off-by: Sebastien RAILLET <sebastien.raillet@marelli.com>
* dlt-daemon: create sockets using "android way"Sebastien RAILLET2021-10-125-40/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Before this commit, dlt-daemon sockets were created inside /data/local/tmp. This works but have many drawbacks: - /data/local/tmp isn't always a tmpfs depending of the android system you have. Means sockets are potentially created on a filesystem which binds to a real device - as the sockets are created by the dlt-daemon itself, this prevent the usage of specific SELinux labels / contexts as they will inherit the label / context from its parent location (e.g the ones from /data/local/tmp). This prevent a fine control of the SELinux label / context that you would like to apply on them * This commit adapts the dlt-daemon in such way: - application and control sockets are now created inside /dev/socket which is the standard path for sockets on android - these sockets are now created by init (see dlt-daemon.rc) and their fds are recovered by dlt-daemon through a specific android API (dlt_daemon_unix_android_get_socket). If the fds can't be recovered, we fallback to the previous mechanism by creating by ourself the sockets (even if this will prevent SELinux label / context on this socket) - all these modifications have been put under compilation flag for android Signed-off-by: Sebastien RAILLET <sebastien.raillet@marelli.com>
* dlt-system: fix a libc buffer overflow detection on 32bit targetsMarc TITINGER2021-10-081-2/+2
| | | | | | rather self-exp: 32bits native hint will not hold 8 bits. Signed-off-by: Marc TITINGER <marc.titinger@hotmail.com>