summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update ReleaseNotes and version to v2.18.7v2.18.7devel_2.18.7Saya Sugiura2021-06-302-2/+40
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* dlt_common: correct read/write positionDinh Cong Toan2021-06-302-7/+40
| | | | | | | | | 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>
* Update document and fix conversion warningDinh Cong Toan2021-06-306-10/+7
| | | | Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
* dlt_common: Increment size after memcpy()Dinh Cong Toan2021-06-301-3/+2
| | | | | | | | | 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>
* Using dlt_vlog in verbose option in dlt_client.cDinh Cong Toan2021-06-301-47/+113
| | | | | | | 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
* dlt-logstorage-ctrl: Improve option force to syncDinh Cong Toan2021-06-301-15/+15
| | | | | | | | | | | | | 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>
* Do not use CpackBui Nguyen Quoc Thanh2021-06-302-10/+1
| | | | | | | - Remove CPACK from CMakeLists.txt - Update README.md Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Debian packagingBui Nguyen Quoc Thanh2021-06-3010-0/+121
| | | | | | First Debian release Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Update dlt-system.conf documentationDinh Cong Toan2021-06-301-2/+2
| | | | | | Adding configuration of syslog to forward log into specific port. Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
* dlt_user: correct handling return valueDinh Cong Toan2021-06-301-14/+18
| | | | | | | | 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>
* Update dlt-system-syslog with IPv6Dinh Cong Toan2021-06-301-6/+15
| | | | | | | | | | 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>
* Alternative solutions for json-c dependencyBiastoch, Darian (ADITG/ESM)2021-06-3013-395/+420
| | | | | | | 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-receive:Fix compiler warningdbiastoch2021-06-302-4/+9
| | | | | | | | 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>
* daemon: Improve signal handler for timersBui Nguyen Quoc Thanh2021-06-301-41/+43
| | | | | | | | | | | | | 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>
* dlt-doc:Fix generating HTML documentation and man pagesdbiastoch2021-06-302-114/+67
| | | | | | | | | | | | | 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/*Dinh Cong Toan2021-06-3012-165/+267
| | | | | | Apply uncrustify for src/daemon/* and src/lib/* Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Update uncrustifyKHANH LUONG HONG DUY2021-06-301-17/+17
| | | | | | | | | | | | | | | | | | 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>
* dlt-receive: Implemented gtest for extended filteringdbiastoch2021-06-304-0/+92
| | | | | | | | -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>
* dlt-receive: Enabled more filtering by using json filter filesdbiastoch2021-06-3010-184/+626
| | | | | | | | | | | | | | | -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>
* dlt_receive: handle exception in signal handler.Dinh Cong Toan2021-06-301-0/+3
| | | | | | | - 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>
* dlt message header brokenDinh Cong Toan2021-06-3017-159/+159
| | | | | | | | | | | | | 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>
* Add missing string functions (#309)Martin Willers2021-05-315-6/+333
| | | Signed-off-by: Martin Willers <M.Willers@gmx.net>
* gtest: Find system-provided external gtest (#301)Gianfranco Costamagna2021-05-171-1/+5
| | | | Find system-provided external gtest in case a system version is available, without need to recompile the bundled version everytime
* Make nonverbose mode non exclusive (#300)Martin Willers2021-05-174-56/+133
| | | | | | | | | | | | | | | | * 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>
* Merge pull request from GHSA-7cqp-2hqj-mh3fBui Nguyen Quoc Thanh2021-05-123-7/+47
|\ | | | | daemon: check the conf inputs
| * daemon: check the conf inputsBui Nguyen Quoc Thanh2021-05-103-7/+47
|/ | | | | | | | | | | | | | 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>
* Export cmake config file (#289)Martin Willers2021-05-103-6/+133
| | | | | | | | | | | | | | 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>
* Better formatting of RAWD (#291)Martin Willers2021-04-051-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fix bad funcion cast in dlt_user_log_out_error_handling (#294)Radek Kaczorowski2021-03-261-5/+5
| | | Co-authored-by: FIXED-TERM Kaczorowski Radoslaw (BSOT/PJ-ES21) <Fixed-Term.Radoslaw.Kaczorowski@bosch-softtec.com>
* Contact information update (#299)Saya Sugiura2021-03-161-1/+1
| | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* dlt-receive: Add option to configure port of dlt receive (#293)Alex2021-03-162-2/+15
| | | Signed-off-by: Alexander Mohr <git@mohr.io>
* Add verbose mode attribute handling (#292)Martin Willers2021-03-167-531/+1376
| | | | | | 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>
* Resolving broken link in README (#297)Darian Biastoch2021-03-111-2/+2
| | | Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
* fscanf() uses dynamic formatting to prevent buffer overflow (#288)Kevin-Luong2021-01-291-2/+5
| | | | | | | CVE: CVE-2020-29394 Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com> Co-authored-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Make dlt pipe only readable by user (#285)Mostafa2021-01-191-1/+1
| | | | | | security-wise dlt pip(FIFO) should be exclusively readable only by owner not the dlt group to prevent eavesdropping by clients Signed-off-by: Mostafa Emami <mustafaemami@gmail.com>
* dlt_client_main_loop running in an infinite loop restricts graceful exit of ↵Sreeharsha Ramanavarapu2021-01-083-2/+42
| | | | | | | | | | | | | | | | | | | | | | | DLT Client code (#284) Issue: ------ dlt_client_main_loop currently uses an infinite loop ("while (1)"). This creates problems when a DLT client is running in a thread as part of a larger application. Graceful exit (for example: during object destruction) is not possible because a thread is running dlt_client_main_loop in the background. It is also not possible to exit the client, if we want it to fetch only a pre-decided number of messages. Solution: --------- Allow user to define a callback function to check whether the next message should be fetched. dlt-test-client.c has a new option to fetch a pre-decided number of messages, after which the client will exit. Signed-off-by: Sreeharsha Ramanavarapu <sreeharsha.r@gmail.com>
* Update ReleaseNotes and version to v2.18.6v2.18.6Saya Sugiura2021-01-062-2/+70
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doc: Limitation to SIGUSR1 usage on AndroidSaya Sugiura2021-01-062-0/+12
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* gtest_dlt_common: fix seg fault when using memcpy().Dinh Cong Toan2021-01-062-5/+11
| | | | | | | | - Checking size of buffer and size of message before using memcpy(). - Adding configuration file for testfilter in /tests/CMakeLists.txt. Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
* example: Added customization of CxtID and AppIDdbiastoch2021-01-062-5/+126
| | | | | | | | -It's now possbile to enter a custom app and context ID by using the new implemented "-A" and "-C" arguments. -Also added a markdown manual in the doc directory for dlt-example-user. Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
* other: fix remaining conversion warningsDinh Cong Toan2021-01-0616-97/+97
| | | | | | | | | | | - Converting datatype to the correct one. - As macro do not perform type-checking before, so these functions used it with different datatype could create a lot of conversion warnings. For this reason, these warnings could be consider as normal information and will not be fixed. Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
* library: fix conversion warningsDinh Cong Toan(RBVH/ECM12)2021-01-066-106/+130
| | | | | | | | | | | | - Change the data type of variable 'size' in DltContextData struct (dlt_user.h.in). Variable 'size' was used repeated with function 'sizeof()' many time, so change type to 'size_t' can avoid a lot of warnings. - Adding temporary variable to calculate the datasize header (define in dlt_common.h) in 'dlt_common.c' file. Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
* tests: fix conversion warningsiod1hc2021-01-069-55/+55
| | | | | | - Casting data type to the right format. Signed-off-by: Dinh Cong Toan <Toan.DinhCong@vn.bosch.com>
* daemon: fix conversion warningsiod1hc2021-01-069-166/+179
| | | | | | | | | | | | | - Instead of casting frequently, change the data type of 'to_remove' to 'uint32_t' for the correct format, also adding temp variable to check return value. - Change data type of 2 variable 'offset' and 'sizecont' to 'size_t' (dlt_daemon_client.c), because these variable using many time with function 'sizeof', and they was used as local variable so it will not effect dlt library. Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
* shared: fix conversion warningsiod1hc2021-01-063-74/+74
| | | | | | | | | | | - Data type of 'textlength' create a lot of warnings while using in function 'snprintf()', so change data type to 'size_t' will resolve these warnings. - Change data type of variable 'size' to the right type 'unsigned int', which is located in struct DltBuffer in dlt_common.h (line 832). Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* logstorage: fix conversion warningsDinh Cong Toan(RBVH/ECM12)2021-01-062-65/+65
| | | | | | | | | | | | - Some functions like 'strncmp()', 'strncat()', 'strcpy()' and 'memcpy()' take an argument in type 'size_t', so explicit data type to 'size_t' in this case is needed to avoid conversion warnings. - Function 'strlen' return data type 'size_t', which still need to cast data type Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
* console :fix conversion warningsDinh Cong Toan(RBVH/ECM12)2021-01-069-48/+48
| | | | | | - Explicit type conversion from 'signed' to 'unsigned' Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
* gateway: fix compile warningsDinh Cong Toan(RBVH/ECM12)2021-01-065-36/+35
| | | | | | | | | - Correct the data type of 'headersize' and 'datasize' variables in header 'dlt_common.h', then config those functions using this library. - Explicit the data type. Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
* readme: cpack document for debian packageKHANH LUONG HONG DUY2021-01-061-0/+11
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* CMakeList: implement cpack for debian packageKHANH LUONG HONG DUY2021-01-061-0/+6
| | | | | | Introduce cpack options to build DLT debian package Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>