| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Introduce new API to support quick parsing a DLT file.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@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>
|
|
|
|
| |
This reverts commit e420ee62d89d5efab6ad7275910cb3eec8497da6.
|
|
|
|
|
|
| |
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>
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
| |
Replace all Linux specific shared memory APIs with POSIX alternatives.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
DLT limits the path length and does not do anything else to determine
the actual value, because the least that is supported on any system
that DLT runs on is 1024 bytes.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
| |
There were a couple of places which used snprintf-dlt_log. It is
now replaced with dlt_vlog().
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When it fails to send a log message to connected client, daemon
tries to store the remaining partial message to internal ring
buffer and send again later. When calculating the number of bytes
which were sent to client, it had a bug which it keeps on
incrementing instead of initializing the variable on every message,
which never reached to the condition mentioned above and had a
possibility to overflow and access invalid memory. On the other hand,
daemon doesn't need to store the unsent partial message, as the socket
to the client will be closed on failure and the sent partial message
will be dropped anyways.
This commit removes the lines where the daemon tries to store the
partial message to ring buffer. With this, variable bytes_sent is
now removed.
Related commit: 2262f8b Made socket send reliable
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
strtol converts extra data in the array, so it leads to data crash.
It is now fixed to fill the last byte of the array with null
character once data copy complete and before convert.
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
|
|
| |
Error handling was added in case it failed to send to daemon.
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
Made TCP socket send reliable by storing the unsent/partial message
in the ring buffer. This will avoid the corrupted messages/Gaps in
Viewer side
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
Add more logs to places where any pointer of buffer may get modified,
to get more information when we get unexpected behaviour
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible to change the default buffer size for log message creation via
environment variable:
export DLT_LOG_MSG_BUF_LEN=<value>
Instead of using a static buffer with size of 1390 bytes, the buffer is
allocated dynamically with the specified value.The max size is restricted to approx 65k.
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The poll system call is now used in the daemon to enable DLT use in
POSIX compliant systems. Also added introduced new unregister_app macro
to avoid missing of logs in startup buffer.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- dlt-control couldn't receive all the GET_LOG_INFO response message
when many applications and contexts are registered.
Therefore the receiver buffer size was extended to 65K.
Also the receive buffer size macros are reduced to one variable.
- Code cleanup and improvements
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Support to send and parse periodic control messages
-add application/contexts to passive ECU list
-Refactor dlt_gateway_send_control_message
-Gateway issues with corrupted data and on demand connection
-Unit Test update
Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com
Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com
Signed-off-by: S. Hameed shameed@jp.adit-jv.com
Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
|
|
|
|
|
|
|
|
|
|
| |
- improvements and refactor key creation
- Sync strategies added
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* IPC: Unix socket added
The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option.
Socket path configurable for both FIFO and Unix Socket now configurable in CMake
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix -Wpointer-compare of compare with null char
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common: fix -Wformat-truncation of snprintf
Avoid snprintf output truncation by handling return value
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_offline_trace: Fix Wformat-truncation of snprintf
Compile with Gcc 7.x has the warning of snprintf buffer length size.
Check return value of snprintf() for avoiding the warning.
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common_test: Fix memleak t_dlt_message_read
some resources were not free after using.
Detected by running
valgrind --leak-check=full ./gtest_dlt_common
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt_common: Fix resource leak
Close the file before returning from function.
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* dlt-kpi-process: Fix memory leak
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* dlt-kpi-options: Clean up resources on malloc fail
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On context and application registration, the data needs to be read in 2
parts. If the first part was at the end of the receiver buffer, it was
wrongly removed whereas the complete data is not full received and
therefore interpretable. This has to be fixed by not removing the data
before everything is checked.
Thus, while readjusting the buffer to the first found header, the offset
was not properly updated.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
Process User Messages: Fix buffer handling
In case application and context registration the buffer need to be read
two times. But before removing the data, the data need to be readjusted
to its origin. This was missing in a previous fix.
Furthermore, in case of corrupted description field, applications and
contexts will be registered anyway with the dummy description "Unknown".
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
| |
The receiver structures have been removed from the dlt-daemon structure,
they are now part of the connection.
The overall usage of the receiver structrure has also been reviewed in
the daemon.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
Change-Id: I7cf80d79ed73bd6d4f370bb3f278d26ccc9d8d7a
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
|
|
|
|
|
| |
DLT daemon improvement - parameter value range check
Adapt unit tests to check for enum return values
Changed C version to gnu99 and C++ version to gnu++0c
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Make dlt-daemon configurable to specify directory of fifos and port of dlt-daemon, this
allows to run multiple instances of dlt-daemon at one node at the same time. This is useful
in testing environment where simultanous tests should not interfere due to the same
instance of dlt-daemon
- dlt-daemon: add option -t <dir> to specify a directory where all fifos will be created
- dlt-daemon: add option -p <port> to specify the port under which dlt-daemon can be connected
- client-library: add environment variable DLT_PIPE_DIR to specify a non-default directory
of fifos for logging applications
- client-library: add environment variable DLT_DAEMON_TCP_PORT to specify the port under which
dlt-daemon can be reached (especially when using dlt-receive)
Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
|
|
|
|
|
|
|
| |
- remove compiler warnings
- fix file permissions
Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
| |
Signed-off-by: Stefan Held <stefan_held@mentor.com>
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
|
|
|
|
| |
- sprintf was used were snprint was intended
- make proper usage of 64bit values in printf-formatting
- remove some not used variables
- make some casts to make printf happy
Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
|
|
|
|
|
|
|
| |
Fix all nullpointer errors in dlt_common.c
Signed-off-by: Stefan Held <stefan_held@mentor.com>
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
|
| |
Scan findings. Renamed and cleanup further files.
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|