summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* doc: update a note for logstorage with wildcardBui Nguyen Quoc Thanh2020-07-061-0/+3
| | | | | | | If both of the parameter "LogAppName" and "ContextName" are set to wildcard or not present in the configuration file, "EcuID" must be specified. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.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-066-10/+287
| | | | | 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>
* doc: Logstorage non-verbose filterSaya Sugiura2020-07-061-1/+39
| | | | | | Add explanation and example to non-verbose 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>
* Fix dlt-sortbytimestampBui Nguyen Quoc Thanh2020-07-061-4/+34
| | | | | | | | In case there is only one cycle of boot, perform sort by timestamp and write all messages out. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* Remove DLT_PACKED redefinition guard in dlt_common.hFelix Herrmann2020-07-061-3/+1
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* rename definition PACKED to DLT_PACKEDFelix Herrmann2020-07-064-47/+39
| | | | | Signed-off-by: Felix Herrmann <external.Felix.Herrmann3@de.bosch.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* daemon: Remove empty line in daemon logSaya Sugiura2020-07-061-16/+17
| | | | | | | New empty line was generated from daemon internal log because of '\n'. This is removed from daemon internal log and added to dlt_vlog(). Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Revert "dlt_common: Fix buffer overflow in dlt_buffer_get (#215)"Saya Sugiura2020-06-161-4/+2
| | | | This reverts commit e420ee62d89d5efab6ad7275910cb3eec8497da6.
* FIX: prevent usage of uninitialized message queue handleRudolf Svanda2020-05-181-1/+3
| | | | | | | | | Problem occurs always if application exits and dlt_user.dlt_segmented_queue_read_handle is not initialized. Warning "NWTSegmented: Error while reading queue" is printed on terminal on embedded devices. Signed-off-by: Rudolf Svanda <rudolf.svanda@globallogic.com>
* Add unit tests for new sized string functionsMartin Willers2020-05-181-0/+100
| | | | Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Add documentation for new sized string functionsMartin Willers2020-05-181-2/+34
| | | | Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Add macro wrappers for new sized string functionsMartin Willers2020-05-181-0/+33
| | | | Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Minor optimizationMartin Willers2020-05-181-1/+1
| | | | | | | There is no need to have both an array and a pointer to it; just use the array directly. Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Add functions for writing strings with known sizesMartin Willers2020-05-182-0/+50
| | | | Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Add helper function for writing strings with known sizesMartin Willers2020-05-181-3/+17
| | | | | | | | | | | This use case is common in C++ code nowadays, due to the usage of e.g. std::string_view, which does not provide a function for retrieving a null-terminated C-string, but which provides quick access to the string length via std::string_view::size(). Such use cases can now avoid an entirely unnecessary strlen() call. Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Fixed empty internal message in dlt-daemon.c (#225)Francesco Montefoschi2020-04-291-1/+3
| | | | | | | | `dlt_daemon_log_internal` is called with with a null `local_str`. This has been introduced by mistake during a code refactoring. Code has been reverted to the previous version: https://github.com/GENIVI/dlt-daemon/commit/bfa7026b355db32d91374997cc86b56fedc3e861 Signed-off-by: Francesco Montefoschi <francesco.montefoschi@artgroup-spa.com>
* common: Fix uint64 type (#217)Saya Sugiura2020-04-021-1/+1
| | | | | | The log message was printed as a signed value for uint64 type. This commit fixes to print as an unsigned value. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* dlt_common: Fix buffer overflow in dlt_buffer_get (#215)Ricardo Leite2020-03-301-2/+4
| | | | | | A DLT lib user can create a message large enough that dlt_user.resend_buffer is not large enough, and thus it will overflow Signed-off-by: Ricardo Leite <rleite@dcc.fc.up.pt>
* FIX: Check validity of `file` pointer before usage.Sebastian Kloska2020-02-201-3/+3
| | | | | | | Check for file == null before accessing the pointer for a debug message Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
* doc/dlt_for_developers.md: Fix wrong DLT include directiveSebastian Lipponer2020-02-111-1/+1
| | | | | | | | | | | | The include directive '#include <dlt/dlt.h>' that is stated in the developer guide (see 'doc/dlt_for_developers.md') does not work when the include path is set via the pkg-config file 'automotive-dlt.pc'. The include path set via this file requires users to use the include directive '#include <dlt.h>'. This is also in accordance with older DLT documentation. Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
* Remove naming of variadic macro parametersTed Lyngmo2020-02-061-8/+8
| | | | | | | The GNU preprocessor supports naming of the variadic macro parameter, but not preprocessors does. Signed-off-by: Ted Lyngmo <ted@lyncon.se>
* sys/poll.h: deprecate old sys/poll.h include header, now glibc/musl wants ↵Gianfranco Costamagna2020-01-275-5/+5
| | | | | | | | | poll.h being included directly. This fixes a build failure on musl systems with strict c hardening flags Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* dlt-test-init-free: fix build failure with strict compiler flags, due to ↵Gianfranco Costamagna2020-01-271-2/+2
| | | | | | | | | uint being undefined. This is actually an "int" type, looking at the test implementation Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* dlt_user.h: fix build when musl is the libc implementation, by adding a ↵Gianfranco Costamagna2020-01-271-0/+1
| | | | | | | | | | | missing include for pthread_t reference: see https://errors.yoctoproject.org/Errors/Details/308000/ for details Thanks Khem Raj <raj.khem@gmail.com> for the report Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* dlt.conf: suppress the warnings udp multicast (#197)Phong Tran2019-12-111-3/+3
| | | | | | | | | | | | | There are some warnings while running dlt-daemon: $dlt-daemon Unknown option: UDPConnectionSetup=1 Unknown option: UDPMulticastIPAddress=225.0.0.37 Unknown option: UDPMulticastIPPort=3491 cause the WITH_UDP_CONNECTION is not enabled by default (c9d1ba4b). The configuration for this feature should be sync. Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_daemon_socket: leave while socket binds failsPhong Tran2019-12-111-0/+1
| | | | | | | CID 351398 (#1 of 1): Use after close (USE_AFTER_FREE) 8. pass_closed_arg: Passing closed handle *sock as an argument to dlt_daemon_socket_get_send_qeue_max_size Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_user: init DltContextData before usePhong Tran2019-12-111-5/+4
| | | | | | | | for fixing the coverity warnings type Uninitialized scalar variable (UNINIT). Using uninitialized value log.use_timestamp when calling dlt_user_log_send_log. Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt-daemon: fix resource leakPhong Tran2019-12-111-0/+2
| | | | | | | return without close the file descriptor. reported by Resource leak (RESOURCE_LEAK) Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* console: fix memleak of dlt-logstorage-listPhong Tran2019-12-111-0/+2
| | | | | | report by coverity with Resource leak (RESOURCE_LEAK) Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* BugFix: SEGFAULT when using AppArmor (#192)Sebastian Kloska2019-12-102-15/+18
| | | | | | | | | | | | | | | | | | | | | | | * Symptome: If access to the trace directory is not granted by AppArmor access(...) still reports otherwise. dlt_offline_trace_get_total_size(...) tries to open the dir via opendir(...) and tries a readdir without any further check, which results in an SEGFAULT * Solution: (1) Make dlt_offline_trace_get_total_size return ssize_t instead of unsigned long, which gives us a chance to return an error state (2) Check the return value from opendir(...) and bail out on error. Use this to return DLT_RETURN_ERROR in dlt_offline_trace_check_size. * ToDo: (1) Error state is not yet checked and reported back. On Error we just don't generate any offline log files without any further complain. (2) Find a replacement for access(...) which reports properly under AppArmor. (3) Report the confusing behaviour of access(...) to the AppArmor team. Signed-off-by: Sebastian Kloska <seebastian.kloska@snafu.de>
* Fix compiler warnings: pointer of type ‘void *’ used in arithmetic (#196)Sebastian Lipponer2019-12-103-13/+13
| | | Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
* Change the DLT_CHECK_RCV_DATA_SIZE macro to an internal function (#191)Sebastian Lipponer2019-11-254-23/+29
| | | | | | | | | The use of this macro in a if condition is actually non-standard C++ code. GCC issues a warning that ISO C++ forbids braced-groups within expressions when compiled with -Wpedantic. Other compilers fail with an error. Change the macro to an internal function in order to improve the portability to other platforms (i.e. MSVC, proprietary embedded). Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
* Fix a potential memory leak in file transfer (#126)Andreas2019-11-192-7/+12
| | | | | | | | | | * Fix a potential memory leak in file transfer This potential memory leak in dlt-system-filetransfer.c can happen if only a filename is passed to dirname(). In the current implementation of dlt-daemon, this issue cannot happen. But in case of refactoring or different usage there is a chance that it can be triggered. See: https://linux.die.net/man/3/dirname Signed-off-by: Andreas Seidl <andreas.seidl@daimler.com>
* Provide DLT_GET_APPID macro (#187) (#188)Vo Trung Chi2019-11-144-0/+44
| | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* dlt-offline-trace: fix bug and hardcode (#174) (#186)Vo Trung Chi2019-11-143-30/+40
| | | | | | | | Fix the issue that DLT offline trace creating mutiple files even after reaching MaxTrace size when filename is index based. Related to: https://github.com/GENIVI/dlt-daemon/pull/174 Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
* Avoided Seg fault in dlt_message_payload (#179) (#181)Vo Trung Chi2019-11-144-113/+113
| | | | | | | | | * Avoided Seg fault in dlt_message_payload (#179) Avoided Seg fault by adding boundary check before buffer access. Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com> Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
* Improvement: Make ZLib dependency optional (#182)Sebastian Kloska2019-11-084-11/+25
| | | | | | | | * New CMake option WITH_DLT_FILETRANSFER * Only request ZLIB package if WITH_DLT_COREDUMPHANDLER==ON or WITH_DLT_FILETRANSFER==ON Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
* fix the dlt offline trace file name creation (#178)Vo Trung Chi2019-10-292-14/+19
| | | | | | | The function dlt_offline_trace_file_name() use sizeof the pointer as the maximum file name size, so it cannot create the file name as expected. Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
* libdlt: fix memory leakVo Trung Chi2019-10-241-8/+20
| | | | | | | This commit is fixed the memory leak in case the dlt application do reattach to the daemon. Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
* Removed unused headers(epoll) in UDP connectionsunil.s2019-10-144-10/+21
| | | | Signed-off-by: sunil.s <sunil.s@lge.com>
* Fix: Propper usage of LoggingMode: "uncrustification"Sebastian Kloska2019-10-102-41/+35
| | | | Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
* Fix: Propper usage of LoggingMode in ".../dlt-runtime.cfg"Sebastian Kloska2019-10-102-8/+12
| | | | | | | | | | | | | | | | | | * Symptom: no offline trace file gets created even if runtime config LoggingMode==(2|3). * Reason: runtime config gets read *after* offline logging setup. * Solution: Read runtime config *before* offline logging setup. * Make the "read runtime config" function set a proper default value for logging mode instead if the *_init_* function setting up the logging. Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
* libdlt: reattachment and improvement in dlt thread (#171)Vo Trung Chi2019-10-013-111/+62
| | | | | | | | | | | | | | | | | Improvement: housekeeper thread with poll - Change name receiver thread to housekeeper thread - Use poll() in housekeeper thread to get new received message from DLT Daemon. - Remove resend buffer inside of dlt_user_log_reattach_to_daemon() - Only try to resend buffer if fd is valid. This commit removes the event driven dlt_user_log_reattach_to_daemon() that is called e.g. by DLT_LOG. Now, only the DLT housekeeper thread handles the retrial to attach to daemon. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com> Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>