summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Init logd crash bufferTobias Öhrström2020-11-191-6/+14
| | | | | | | | | - Earlier the crash buffer wasn't initalized, claimed to be binary which isn't true. https://cs.android.com/android/platform/superproject/+/master:system/logging/logcat/logcat.cpp;drc=5837d33d1cfecce0632e385c8ede89c02685238f;l=194 - Also no need register buffers which isnt used. Signed-off-by: Tobias Öhrström <tobias.ohrstrom@volvocars.com>
* Avoid memory access errors with 4-chars context ids (#250)Martin Willers2020-11-171-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | For a 4-chars CTXID, i.e. one that does not include a null character, the strlen() calls were happily accessing memory until they eventually encountered a null character somewhere in memory. This was detected by valgrind, which reported a memory error when using a CTXID such as "INTM": ==21924== Conditional jump or move depends on uninitialised value(s) ==21924== at 0x4C30F78: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21924== by 0x4E4B5A0: dlt_print_id (dlt_common.c:303) ==21924== by 0x4E4CF47: dlt_message_header_flags (dlt_common.c:687) ==21924== by 0x4E51434: dlt_message_print_ascii (dlt_common.c:3169) ==21924== by 0x4E4247A: dlt_user_print_msg (dlt_user.c:4108) ==21924== by 0x4E46D92: dlt_user_log_send_log (dlt_user.c:3670) ==21924== by 0x4E46F14: dlt_user_log_write_finish (dlt_user.c:1611) Sanitize some code Using memset() and memcpy() is always preferable to hand-rolled loops, because compilers have built-in support for them. Signed-off-by: Martin Willers <M.Willers@gmx.net>
* dlt_client.c: remove misleading error message (#258)Moritz Warning2020-11-171-3/+3
| | | | | | Several IP address might be tested for connect. Only output an error if no address succeeds at all. Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Fix overflow for -d argument in dlt-example-user (#270)Martin Ejdestig2020-11-171-4/+4
| | | | | | atoi(dvalue) * 1000000 overflows if given a value >= 2147 when sizeof(int) is 4. (2^31 / 10000000 ~= 2147.48) Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* dlt-daemon.c: exit early on error (#261)Moritz Warning2020-11-121-3/+6
| | | | | | Change warning to error, as it will abort the daemon startup. Also reduce the amount of follow up error messages. Signed-off-by: Moritz Warning <moritzwarning@web.de>
* dlt-control.c: initialize dltdata via struct literal (#257)Moritz Warning2020-11-101-20/+10
| | | | | | this make the code easier to read and initializes all other variables with 0 Signed-off-by: Moritz Warning <moritzwarning@web.de>
* dlt-common.c: ensure null terminated string (#256)Moritz Warning2020-11-101-1/+1
| | | Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Make it easier to use libdlt when building DLT as a CMake subproject (#254)Martin Ejdestig2020-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By calling target_include_directories() for the dlt target in src/lib/. CMake filters out duplicate include paths. So even if the include directories are already added with include_directories() in the top-level CMakeLists.txt, they are not duplicated when the compiler is invoked. For example, with this patch, the following works: [~/Source/foo]$ ls bar CMakeLists.txt dlt-daemon [~/Source/foo]$ cat CMakeLists.txt cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(foo) add_subdirectory(dlt-daemon) add_subdirectory(bar) [~/Source/foo]$ cat bar/CMakeLists.txt cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(bar) add_executable(bar main.cpp) target_link_libraries(bar dlt) install(TARGETS bar RUNTIME DESTINATION bin) bar/main.cpp contains the example from the top of doc/dlt_for_developers.md that does "#include <dlt.h>" and then uses the DLT logging macros. Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* dlt_offline: fix build failures with gcc-10 (#245)Gianfranco Costamagna2020-09-013-2/+4
| | | | | | | | | | | | | | | see bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957140 /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_client.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_offline_logstorage.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* Implement DLTClient for UDP multicast (#240)João Sousa2020-08-314-7/+113
| | | | | | | | | * Add UDP multicast support on client side UDP multicast support is already present on server side. This patch add seemless support for UDP multicast on client side in dlt-receive. Signed-off-by: Joao Sousa <joao.sa.sousa@ctw.bmwgroup.com>
* Revert "dlt_offline: fix build failures with gcc-10"Saya Sugiura2020-08-281-2/+2
| | | | This reverts commit 2fdbe5d1d2d580e643274d0b716b782190ad740d.
* dlt_offline: fix build failures with gcc-10Gianfranco Costamagna2020-08-261-2/+2
| | | | | | | | | | | | | see bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957140 /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_client.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_offline_logstorage.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
* dlt_user.c: fix the lack of DLT_NETWORK_TRACE_ENABLE definitionKHANH LUONG HONG DUY2020-08-031-0/+2
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* slog2 adapter on QNXNguyen Dinh Thi2020-07-087-0/+869
| | | | | | | | | | | | | | | dlt-qnx-system can be used to send syslog on QNX to dlt-daemon using slog2 API. It was be built with setting cmake option WITH_DLT_QNX_SYSTEM to ON. Add markdown manual page for dlt-qnx-system Signed-off-by: Nguyen Dinh Thi (RBVH/ENG2) <Thi.NguyenDinh@vn.bosch.com> Signed-off-by: Le Hoang Ngoc Quynh <Quynh.LeHoangNgoc@vn.bosch.com> Signed-off-by: Sebastian Unger <sunger@de.adit-jv.com> Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* dlt-daemon.c: fix printf format %d to %ld that formats a longKHANH LUONG HONG DUY2020-07-061-2/+2
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* network trace: Fix macro usageKHANH LUONG HONG DUY2020-07-061-1/+1
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* limit logspam in gateway on client overflowFelix Herrmann2020-07-063-61/+39
| | | | | | | | update client buffer overflow counter in send function. Gather all overflow checks into dlt_daemon_client. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* logstorage: Issue with more than 2 filtersBui Nguyen Quoc Thanh2020-07-061-1/+3
| | | | | | | | | | While allocating new memory for record of newest file name, it is mistake to not point to the last element of list. So the total size of list was only 2 at all. Solution: must reserve the last pointer in order the newest file list is updated correctly. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* logstorage: support all stragegiesBui Nguyen Quoc Thanh2020-07-062-57/+63
| | | | | | | | In case cached-based strategy is used, the information of newest log file must be updated everytime of synchronization to file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* update cmake VERSION variablesFelix Herrmann2020-07-061-1/+1
| | | | | | | align variable names with cmake 3.3 change. => DLT_VERSION* -> PROJECT_VERSION* Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* logstorage: fix syncbehaviourBui Nguyen Quoc Thanh2020-07-061-26/+44
| | | | | | | - In case sync is not ON_MSG, the newest file information does not need to be updated. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* daemon: Fix smoketestBui Nguyen Quoc Thanh2020-07-061-1/+1
| | | | | | - Fix wrong allocation of memory while preparing table Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* offline storage: Improvement log messages at bottomBui Nguyen Quoc Thanh2020-07-065-53/+195
| | | | | | | | | | | | | | - In case there are several filters in config dlt_logstorage.conf which are sharing the same file name, the dlt-daemon could not handle to write the dlt messages at the proper file. It means the latest dlt messages might be not written into the newest file. - In order to resolve this, dlt-daemon must keep the newest file for each filename. Everytime new dlt message is going to be written, dlt-daemon must ensure that it must be written out to the newest file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* common: Isolate FIFO/Unix socketLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-062-7/+31
| | | | | | | | | | | | | | dlt_common - Add preprocessor DLT_USE_UNIX_SOCKET_IPC for dlt_log_set_fifo_basedir() and dltFifoBaseDir variable - Rename input parameter of dlt_log_set_fifo_basedir() dlt-daemon - Replace setting dltFifoBaseDir by dlt_log_set_fifo_basedir() and add preproc DLT_USE_UNIX_SOCKET_IPC - Update -h opt and flags.loggingFilename based on IPC type Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* libdlt: Relocate dltFifoBaseDir settingLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-062-3/+3
| | | | | | | Relocate the setting of dltFifoBaseDir variable from dlt_init() to dlt_check_envvar() Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* doc: md file for dlt_gateway.confBui Nguyen Quoc Thanh2020-07-061-2/+0
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* network trace: Include necessary headersSaya Sugiura2020-07-068-16/+0
| | | | | | | | | | | Some components which links dlt seem to depend on following headers, which will be included by mqueue.h. - sys/types.h - fcntl.h So explicitly include them if mqueue interface is not supported in dlt_user.h. Also two headers are removed if dlt_used.h is included. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* network trace: Add mqueue verificationSaya Sugiura2020-07-062-18/+77
| | | | | | | | | | There is some OS (e.g. Android) which doesn't support message queue. Since network trace uses it as IPC, we need to disable it if following calls are not available: mq_open, mq_close, mq_unlink, mq_send, mq_receive Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Remove duplicate definition of DLT_CONVERT_TEXTBUFSIZEBui Nguyen Quoc Thanh2020-07-061-1/+0
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Improve performance of DLT file parsingBui Nguyen Quoc Thanh2020-07-061-0/+69
| | | | | | Introduce new API to support quick parsing a DLT file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* relocation dlt_check_envvar() and update dlt_init() functionsLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-061-6/+6
| | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* Redirect stdout to stderrLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-062-14/+49
| | | | | | | | | | | | - daemon: New feature for LoggingMode at /etc/dlt.conf to be able to set value at 3 in order to redirect all stdout messages to stderr. - libdlt: New feature for DLT_LOG_MODE environment variable to be able to set value at 3 in order to redirect all stdout messages to stderr. - unit test: Add test cases for DLT_LOG_TO_STDERR Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* gateway: Improvement of handling Gateway configBui Nguyen Quoc Thanh2020-07-063-11/+51
| | | | | | | | | | | | | | In the current implementation, we believe in user to treat General section as Mandatory. Hence system could be reset due to memory of connections incorrectly. At the moment, General could be handled as Optional with default value of interval. It means General could be absent from config file. Improvement is to raise WARNING to user, set default value and update the number of connections properly. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* daemon: Avoid spamming message buffer overflowBui Nguyen Quoc Thanh2020-07-062-20/+9
| | | | | | | | | | | | | - In existing implementation, control message "message_buffer_overflow" is sent for every incoming message which is dropped since buffer is full. So UDP and logstorage will receive a lot of these messages. That could be considered as unnecessary. - In order to reduce the useless effort to send "message_buffer_overflow" for every missing message, daemon will only send it out right after buffer is full or right after real client is connected. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* gateway: Support infinite loop of retryBui Nguyen Quoc Thanh2020-07-062-6/+17
| | | | | | | | | | | - In order to enable endless retry of reconnection, "Timeout" in dlt_gateway.conf must be set to 0. - In case of "Timeout" is an integer A and A is greater than 0, so after A times of retry, the connection to passive Node will be marked as DISABLED. There won't be any retry afterward. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* gateway: Configurable interval timeBui Nguyen Quoc Thanh2020-07-065-47/+172
| | | | | | | | | - Introduce "General" section for dlt_gateway.conf - In new section, the interval is used for gateway timer. This entry is optional. By default, it is set to 1 second as the existing hardcoded value. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* disable android services by defaultFelix Herrmann2020-07-062-0/+2
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* logstorage: Add NULL check of IDsSaya Sugiura2020-07-061-1/+2
| | | | | | | | | | | | | There is a missing NULL check for APID and CTID in dlt_logstorage_create_keys() function in following condition: - APID is wildcard - CTID is wildcard - ECUID is set Related commit: 557624f SOPL-8567: daemon: logstorage with wildcards Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* snprintf ret > 0 is not always an errorFelix Herrmann2020-07-061-6/+12
| | | | | | | | | snprintf returns the size the resulting string would take. In order to detect truncation, this size needs to be checked against the buffer size. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* fix some gcc9 compiler warningsFelix Herrmann2020-07-069-79/+92
| | | | | | | | | Many stringop-truncation and stringop-overflow warnings are still there (so many). https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* fix clang warnings about GNU stuffFelix Herrmann2020-07-063-34/+28
| | | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* android logd forwarderFelix Herrmann2020-07-063-0/+244
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* fix gateway config element searchFelix Herrmann2020-07-061-5/+4
| | | | | | | Only the first configured passive node was checked when a connection request was issued. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* daemon: logstorage with wildcardsBui Nguyen Quoc Thanh2020-07-061-4/+6
| | | | | | | | | | | | In the current implementation, if FILTER section is setting wildcard for both "LogAppName" and "ContextName", it will be ignored. But it is still a valid configuration for NON-VERBOSE. In order to consolidate the daemon's behavior, the combination of wildcard for both "LogAppName" and "ContextName" in FILTER section will be treated as only ECUID is specified. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* Limit log messages on full bufferFelix Herrmann2020-07-062-5/+10
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* Android: Enable Android buildFelix Herrmann2020-07-063-9/+46
| | | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* logstorage: Filter section handlingSaya Sugiura2020-07-061-53/+48
| | | | | | | | | | | | When following filter is used, dlt-daemon gives an error message even it's using optional sections: NON-VERBOSE-STORAGE-FILTER NON-VERBOSE-LOGLEVEL-CTRL This commit fixes to check if the section is optional or not and just gives debug message if it's optional. Also, new static function is introduced to harmonize all the behavior in logstorage filter. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* correct errno usage in dlt_stop_threadsVo Trung Chi2020-07-061-11/+6
| | | | | | | | | | | Most pthreads functions return 0 on success, and an error number on failure. Note that the pthreads functions do not set errno. Refer to man page of pthreads for detail. So we have to use the return value as the error number instead of errno variable. Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
* shared: Read DLT header until it's foundSaya Sugiura2020-07-061-13/+31
| | | | | | | | | Current dlt_file_read_header() function which is used for e.g. dlt-convert, dlt-sortbytimestamp, etc. stops finding DLT header if it's not available in the next file position. It is improved to read the header in a loop until it's found. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Use ssize_t for bytes_writtenBui Nguyen Quoc Thanh2020-07-061-1/+1
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>