| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <external.Felix.Herrmann3@de.bosch.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
This reverts commit e420ee62d89d5efab6ad7275910cb3eec8497da6.
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Check for file == null before accessing the pointer
for a debug message
Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
return without close the file descriptor.
reported by Resource leak (RESOURCE_LEAK)
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
| |
report by coverity with Resource leak (RESOURCE_LEAK)
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
|
|
|
|
|
|
|
|
|
| |
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
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>
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
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)
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>
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: sunil.s <sunil.s@lge.com>
|
|
|
|
| |
Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Since localtime() was calling tzset() internally, it should be used
before localtime_r(). Refer to man page of localtime_r() for detail.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
* Don't pass a NULL pointer to localtime_r(...) and strftime(...)
* Make sure that localtime_r(...) gets a pointer to time_t
Signed-off-by: Sebastian Kloska <sebastian.kloska@daimler.com>
|
|
|
|
|
|
|
|
|
|
| |
* Replace all start_XXX functions with one start_thread
* Don't make pthread_t static
* Don't use pthread_attr_t. Simply pass NULL
* Bail out when pthread_create() fails
* Check if MAX_THREADS gets exceeded
Signed-off-by: Sebastian Kloska <sebastian.kloska@daimler.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
| |
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
|
|
|
|
|
|
| |
This commit includes improvement of related code.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix from commit 376bf6c is considered as a workaround.
From now, the resend buffer size is calculated based on
(dlt_user.log_buf_len + header_size)
- Remove the macro DLT_USER_EXTRA_BUFF_SIZE
- Use env_disable_extended_header_for_nonverbose instead of
env_nonverbose_extended_header
Related commit: 376bf6c Size of Resend buffer less than or equal to DLT_USER_BUF_MAX_SIZE res… (#116)
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
|
|
|
| |
dlt-test-non-verbose test application is also added.
Signed-off-by: Onkar Palkar <onkar.palkar@wipro.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
After dlt-client connects to dlt-daemon successfully, all the stored
dlt messages in daemon was not flushed to dlt client when using shared
memory as IPC. It is harmonized with dlt_daemon_process_user_message_log().
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|