| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Remove duplicate stdbool.h file in dlt_common.c,
which has been included in dlt_common.h
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
| |
Add -p option to dlt-control so that IP port can be configured in case
of TCP.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
1: Move the call of pthread_sigmask in dlt-qnx-systems main before DLT_REGISTER_APP, because this already spawns a thread, what was done without applying pthread_sigmask before.
2: Replaced all threads in dlt-system, that are spawned for each feature, through one poll. This poll waits for a file descriptor event, that triggers the feature routine, that was executed before in the thread. Done this for following processes:
* reading syslog and journal
* frequently reading logfile and logprocess
* triggering filetransfer, if a file was added/changed in watched directory
* checking watchdog timer of systemd service file with defined intervall
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
|
|
|
|
|
|
|
| |
Provides argument option to enable send and resync serial header
via command line.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
| |
Co-authored-by: Saya Sugiura <39760799+ssugiura@users.noreply.github.com>
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
| |
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|
|
| |
As init_p2 does the offline trace initialization, load configuration should be called prior, as LoggingMode is set through run-timeconfiguration file. With original logic it results in offline trace write failed, it is not valid trace directory errors.
|
|
|
|
|
|
|
| |
Use POSIX thread API to rename the housekeeper and segmented threads.
The currently used prctl() function is Linux specific and in general not
available on other platforms (e.g. QNX).
Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the generated .pc file was changed to export an additional
include path such that '#include <dlt.h>' and '#include <dlt/dlt.h>' can
be used. However the exported CMake config file only supports the latter
include statement. Consequently code that uses the other legacy include
statement does not compile with the exported CMake config file.
This change fixes this inconsistency. It lets users compile existing
code with either the pkg-config .pc file or the CMake config file and
avoids code clutter that is currently necessary to make this work.
Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
|
|
|
| |
According to AUTOSAR standard the TYLE for the BOOL type shall be set to 1. So I propose to initialize type_info variable for the BOOL type the same way as for uint8 type.
|
|
|
|
|
|
|
|
|
|
|
| |
If a file is deleted while a file transfer is ongoing,
the file transfer tries to seek through the whole file.
This is due to the fact the the file handle is held open.
getFileSerialNumber is already validating the file
by using stat.
If this call returns a negative value, we know
that a stat to the file is not possible anymore,
therefore further reading can be aborted.
|
|
|
|
|
|
| |
Fixing casting incorrect type
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
| |
This commit removes duplicate conditional statements.
Signed-off-by: GwanYeong Kim <gy741.kim@gmail.com>
|
|
|
|
|
|
| |
This commit removes duplicate conditional statements.
Signed-off-by: GwanYeong Kim <gy741.kim@gmail.com>
|
|
|
|
|
|
|
|
| |
* doc: remove non existing TOC
TOC has Summary, but nothing in the body.
Remove it from TOC.
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Werror=stringop-truncation
cd /build/dlt-daemon-2.18.7/obj-x86_64-linux-gnu/src/console/logstorage && /usr/bin/cc -DCONFIGURATION_FILES_DIR=\"/etc\" -DDLT_DAEMON_USE_FIFO_IPC -DDLT_LIB_USE_FIFO_IPC -DDLT_NETWORK_TRACE_ENABLE -DDLT_SYSTEMD_ENABLE -DDLT_SYSTEMD_JOURNAL_ENABLE -DDLT_UNIT_TESTS -DDLT_USER_IPC_PATH=\"/tmp\" -DDLT_USE_IPv6 -DEXTENDED_FILTERING -D_GNU_SOURCE -I/build/dlt-daemon-2.18.7 -I/build/dlt-daemon-2.18.7/obj-x86_64-linux-gnu/include/dlt -I/build/dlt-daemon-2.18.7/include/dlt -I/build/dlt-daemon-2.18.7/src/shared -I/build/dlt-daemon-2.18.7/src/core_dump_handler -I/build/dlt-daemon-2.18.7/src/offlinelogstorage -I/build/dlt-daemon-2.18.7/src/lib -I/build/dlt-daemon-2.18.7/src/daemon -I/build/dlt-daemon-2.18.7/src/console -I/build/dlt-daemon-2.18.7/src/gateway -I/build/dlt-daemon-2.18.7/systemd/3rdparty -g -O2 -ffile-prefix-map=/build/dlt-daemon-2.18.7=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Werror -std=gnu99 -Wall -Wextra -Wno-variadic-macros -Wno-strict-aliasing -o CMakeFiles/dlt-logstorage-ctrl.dir/__/dlt-control-common.c.o -c /build/dlt-daemon-2.18.7/src/console/dlt-control-common.c
make[3]: Leaving directory '/build/dlt-daemon-2.18.7/obj-x86_64-linux-gnu'
In file included from /usr/include/string.h:495,
from /build/dlt-daemon-2.18.7/src/console/dlt-control-common.c:56:
In function 'strncpy',
inlined from 'dlt_json_filter_load' at /build/dlt-daemon-2.18.7/src/console/dlt-control-common.c:716:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'dlt_json_filter_load' at /build/dlt-daemon-2.18.7/src/console/dlt-control-common.c:721:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Extend include path in *.pc file
Previously, an application using this library's pkg-config setting for
include directory would only get e.g. -I/usr/local/dlt/include/dlt
With that include dir, the application needs to write its #include
statements without any prefix, i.e. "#include "dlt_user.h"
This is considered bad practice for header files of an elaborate
library consisting of multiple header files.
For such libraries, one should write #include statements like
this: #include "dlt/dlt_user.h", i.e. prefix it with a directory.
This commit achieves that by letting the pkg-config module also return
the upper-level directory in addition to the previous one.
For instance, the include directive returned by the above example
would now be "-I/usr/local/dlt/include -I/usr/local/dlt".
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
| |
In dlt_buffer_read_block() and dlt_buffer_write_block(), read/write position
should be updated in case these positions are equal to the size of ringbuffer.
Adding boundary check in gtest_dlt_common.cpp
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
This commit fixes to increment read and write point only if memcpy()
succeeded in dlt_buffer_read_block() and dlt_buffer_write_block().
Related issues: https://github.com/GENIVI/dlt-daemon/issues/305
Signed-off-by: Sugiura, Saya <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
Several verbose condition in dlt_client.c are using printf() and fprintf()
that not print consistent logs to console. These are replaced by dlt-vlog().
Signed-off-by: KHANH LUONG HONG DUY khanh.luonghongduy@vn.bosch.com
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve logstorage to sync logs from cache to all connected
mount point when option -s with empty path is used.
E.g: dlt-logstorage-ctrl -s
Logstorage should accept a white space " " after option -s.
E.g: dlt-logstorage-ctrl -s /tmp/
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
| |
- Remove CPACK from CMakeLists.txt
- Update README.md
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
| |
First Debian release
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
| |
Adding configuration of syslog to forward log into specific port.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
When processing dlt_user_log_send_log() function, message logs will be stored in
internal buffer in error case. Then, the error value is needed to handle correctly
before exiting.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently, when config IPv6 interface for dlt component,
using syslog in dlt-system can not get data from socket.
By changing struct type and interface configuration correctly,
dlt-syslog can receive log from syslog properly.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
| |
json-c dependency was removed from libdlt ('dlt_common') and shifted into 'dlt-control-common'. By this only the command line tools have a dependency on json-c.
dlt-control-common is now built as a static library, so that it can be linked against json-c. Command line tools that included only the .c file of dlt-control-common before, are now linked against this static libarary (see console/CMakeLists.txt).
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
|
|
|
|
|
|
|
|
| |
dlt_common.c:
-Check if filter file fits into read buffer
-Cast 'filename' into non-const to make it json-c API conform
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the initial implementation of timer_thread, the signals
SIGUSR1 is blocked and only checked via sigpending.
There will be an issue if the interval of timers are quite long.
It could cause the main thread waits for a long time in case of
termination gratefully.
Fix: let the timer_thread be interrupted by signal SIGUSR1 and
handle it properly then.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HTML documentation:
-Implemented GLOB mechanism to get all md files inside '/doc' for generating html documentation
-Replacing all markdown links in generated html files with the corresponding html links (using sed)
-Bug fixes
+Marking Doxygen as required package to get a nice error message, if it's missing
+'cp' needs '-r' argument, because it includes another subdirectory with images
Man Pages:
-Also make use of GLOB and foreach loops to get rid of hardcoded filenames
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
|
|
|
|
|
|
| |
Apply uncrustify for src/daemon/* and src/lib/*
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove indentation of preprocessor directives inside #if blocks
Remove space after # of #if blocks
Remove newline between '}' and 'else'
Remove newline between 'else if' and '{'
Remove space inside braces
Remove blank lines before '}'
Ignore braces on single-line of 'while' statement
Change code width to 100 columns
Add aligning all preprocessors
Add the span for aligning comments that end lines to 2
Add spaces to indent 'case' from 'switch' to 4
Add braces on a single-line 'do', 'while', 'for', 'if' statement
Add braces to all blocks of an 'if'/'else if'/'else' chain
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
-Added 'testfile_extended.dlt', which extends the default 'testfile.dlt' by messages with very different lenghts, log levels, ContextIDs and AppIDs
-Added 'testfilter.json', which contains a valide json filter file
-Implemented gtest 't_dlt_message_print_ascii_with_json_filter' in 'gtest_dlt_common.cpp' to test the correct behavior of extended filtering and the json filter file parsing
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Added '-j' flag to dlt-receive for reading a json filter file
-Added more attributes to DltFilter (LogLevel, MaxPayload, MinPayload) for extended message filtering, when using old filters these values are set to default. Same behaviour, when they are not defined in json filter file.
-extended dlt_common.c to support json filter files and new DltFilter attributes
+add dlt_json_filter_load to parse a json filter file into a DltFilter
+add dlt_json_filter_save to print a DltFilter into a json file
-Two new libraries are used to parse the json filter files: json-c for Linux based systems and the QNX internal libjson for QNX systems
-gtest_dlt_common was modified to test the new function 'dlt_json_filter_load'
+add testfile_extended.dlt that contains a bigger varity of messages (different context/app IDs, lengths and log levels)
+add testfilter.json which is a valid json filter file
-New dependency on library was added to related CMakeLists and is described in README.md
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
|
|
|
|
|
|
|
| |
- When declare a sigaction structure to handle signal, it should be
initialized by 0 to set other fields in struct to default, which is more safety.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is to revert the following commits:
- de4a4234
- fb9ff078
- db9917b3
- e4467f0e
- a567e01d
Those commits are from improvement but they seem to
break the dlt message header in some cases.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
| |
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|
|
|
| |
Find system-provided external gtest in case a system version is available, without need to recompile the bundled version everytime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make Non-Verbose mode non-exclusive
Switching to global Non-Verbose mode now does not force Verbose messages to
also be sent as Non-Verbose ones anymore. That would not make any sense,
because Verbose messages don't have a MessageId and thus are all getting
the same MessageId of 65535.
Instead, setting global "Non-Verbose" mode will allow both Verbose and
Non-Verbose messages to be sent in a single session.
The "Verbose-APIs" (e.g. dlt_user_log_write_start()) will then only write
Verbose messages, whereas the "Non-Verbose APIs" (e.g. dlt_user_log_write_start_id())
will then only write Non-Verbose messages.
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|\
| |
| | |
daemon: check the conf inputs
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configuration of memory buffer size must be carefully
parsed and validated to avoid segmentation fault
Any misleading information in configuration file must be
considered as major error and dlt-daemon should stop
and raise error message to stderr
This commit also corrects error handling of
dlt_buffer_init_dynamic().
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create and install proper CMake *-target.cmake and *-config.cmake files,
for use by other CMake-using projects.
It installs a file called automotive-dlt-targets.cmake into a common
location for such files, namely
<prefix>/lib/cmake/automotive-dlt/automotive-dlt-targets.cmake
They can now call find_package(automotive-dlt) and obtain a target
called Genivi::dlt that they can link against with target_link_libraries(),
by which they automatically gain all necessary attributes, including libdlt's
include directories.
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the bytes of a RAWD argument were be printed onto the console
as space-separated hex values, making it difficult or impossible to see
where the RAWD argument ends and the next argument starts. For instance,
with code like this:
dlt_user_log_write_raw(&ctxData, "data", 4);
dlt_user_log_write_uint8(&ctxData, 53);
the console output is shown as:
[64 61 54 61 53]
and there is no indication that there are two arguments, one RAWD and
one UINT8.
This patch changes for console formatting of RAW data to separate by
apostrophs, making the above message appear as:
[64'61'54'61 53]
This makes it immediately obvious that there is a RAWD argument, and
still keeps the separators quite unobtrusive.
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|
|
|
| |
Co-authored-by: FIXED-TERM Kaczorowski Radoslaw (BSOT/PJ-ES21) <Fixed-Term.Radoslaw.Kaczorowski@bosch-softtec.com>
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
| |
Signed-off-by: Alexander Mohr <git@mohr.io>
|
|
|
|
|
|
| |
dlt_user_log_write_*_attr() enables to writing these types, but also support
adding "attributes" for them, i.e. a "name" and a "unit".
Signed-off-by: Martin Willers <M.Willers@gmx.net>
|