summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* minor compiler warning gcc 7.x (#30)Phong Tran2018-03-294-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* improve error reporting in dlt_daemon_socket (#41)Florian Castellane2018-02-141-14/+17
| | | | | | * improve error reporting in dlt_daemon_socket * use dlt_vlog
* Fix SEGV dlt_offline_trace.c (#32)kundatipradeep2018-01-221-0/+18
| | | | | | Post enabling and updating “OfflineTraceDirectory” variable default path in dlt.conf file, dlt-daemon resulted in crash with Segmentation fault(SIGSEGV) due to Invalid OfflineTraceDirectory path. dlt_offline_trace-patch-1 contains an update which verifies “existence of offline trace directory” and its “accessibility issues”. It returns -1 on failure conditions and indicates user with appropriate information instead resulting in APPCRASH.
* fix PR #26 socket_sendreliable data_send updateChristoph Lipka2018-01-191-1/+5
| | | | | | do not update data_send in case of temporal error Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Prevention for occasional corrupted messages (#26)baduras2018-01-123-21/+56
| | | Prevention for occasional corrupted messages caused mostly due to system high load.
* Fix for initialization of buffer settings in DLT user library. (#25)baduras2017-09-131-2/+2
|
* fix various memory leaks (#28)Gordan Markuš2017-09-123-14/+13
| | | | | | | | | | | | | | | | * 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>
* Minor fixes: corrected typo in CMakeLists.txt - WTIH_DLT_ADAPTOR, removed ↵Stefan Badura2017-08-302-3/+3
| | | | character from merge - +
* Data stuck in receiver buffer when dlt_daemon_user_send_log_level() fails (#21)Lutz Helwing2017-08-222-10/+21
| | | | | | | | | | | | - When dlt_daemon_user_send_log_level() called in dlt_daemon_process_user_message_register_context() fails -1 was returned which caused dlt_daemon_process_user_messages() to stop processing receiver buffer. Remaining data was stuck until new data arrived over FIFO. - Make debug output of dlt_daemon_user_send_log_level() more verbose. Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Prevent buffer overflow for mount point path in dlt_logstorage_open_log_file ↵pierreN2017-06-161-1/+6
| | | | | (#19) Signed-off-by: Pierre N <pierreN@users.noreply.github.com>
* cmake: fix unit tests compilation with systemd (#17)Gordan Markuš2017-06-161-1/+1
| | | | | | | | | By enabling the WITH_SYSTEMD and WITH_DLT_UNIT_TESTS cmake flags the build will fail with an error due to a linking issue: ../src/daemon/libdlt_daemon.so: undefined reference to `sd_booted' collect2: error: ld returned 1 exit status Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* Input parameter check & Error message modification (#15)Amber Bhardwaj2017-06-166-62/+83
| | | | | | | | | | | | | | | | | | | * Update dlt-kpi-process.c Added input param checking and added return value in non-void functions. * Update dlt-kpi.c Added Input param checking and added return values in non-void functions. * Input parameter check and Error msg modification Added null pointer checking Added input parameter checking Added return values in non-void functions Added proper error message for debugging purpose Signed-off-by: amberbhardwaj <amber.bhardwaj10@gmail.com>
* dlt-system-process-handling: fix warning (#12)Gordan Markuš2017-05-181-1/+1
| | | | | | | | | | | In function ‘daemonize’: dlt-daemon/src/system/dlt-system-process-handling.c:84:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for(i = getdtablesize(); i >= 0; i--) ^~~ dlt-daemon/src/system/dlt-system-process-handling.c:87:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ int fd = open("/dev/null",O_RDWR); ^~~ Singed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* dlt_daemon_connection_types: fix build warnings (#14)Gordan Markuš2017-05-181-1/+1
| | | | | | | | | | | | dlt-daemon/src/daemon/dlt_daemon_event_handler.c: In function ‘dlt_daemon_handle_event’: dlt-daemon/src/daemon/dlt_daemon_event_handler.c:131:30: waring: cast from pointer to integer of different size [-Wpointer-to-int-cast] DltConnectionId id = (DltConnectionId)ev->data.ptr; ^ dlt-daemon/src/daemon/dlt_daemon_event_handler.c: In function ‘dlt_connection_check_activate’: dlt-daemon/src/daemon/dlt_daemon_event_handler.c:381:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ev.data.ptr = (void *)con->id; ^ Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* dlt-adaptor-udp, dlt-adaptor-stdin: implement get of verbosity level from ↵Gianfranco Costamagna2017-03-292-4/+86
| | | | | | | | | | | input (#9) * dlt-adaptor-udp, dlt-adaptor-stdin: implement get of verbosity level from input, defaulting to INFO when wrong type or none is provided Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> * Fix minor typo (from gunnarx)
* Merge pull request #8 from amberbhardwaj/masterRalphNiemeyer2017-03-231-0/+5
|\ | | | | Added Description in dlt-system.conf
| * Added Description in dlt-system.confAmber Bhardwaj2017-02-161-0/+5
| | | | | | | | | | | | | | | | | | | | Added additional information about how to enable syslog feature properly. If still facing issue while capturing syslogs through client (e.g. dlt_viewer) after following given steps then install listed packages: build-essential build-essential checkinstall pkg-config libsystemd-journal-dev Note: It's is a known issue when you try to capture syslog via dlt_viewer then syslogs wouldn't come in dlt_viewer because of improper configuration (won't route the log to port 47111) of dlt-system.
* | Merge pull request #7 from clipka/devel_dlt_client_cleanup_fixRalphNiemeyer2017-03-238-16/+95
|\ \ | | | | | | dlt-client: fix dlt_client_cleanup memory handling
| * | dlt-client: fix dlt_client_cleanup memory handlingOnkar Palkar2017-02-068-16/+95
| |/ | | | | | | | | | | | | Setter function introduced for seting up string parameters which are free'd in dlt_client_cleanup Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* | Merge pull request #6 from clipka/devel_fatal_trapRalphNiemeyer2017-03-231-0/+14
|\ \ | | | | | | CMake Option: Trigger segmentation fault in case of FATAL log
| * | CMake Option: Trigger segmentation fault in case of FATAL logChristoph Lipka2017-02-021-0/+14
| |/ | | | | | | | | | | | | | | When the user library receives a log with log level DLT_LOG_FATAL it triggers a segmentation fault to provide information to the developer via tools like coredump. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* | dlt-daemon: Fix use after free potential issueFrederic Berat2017-02-015-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | In dlt_daemon_send_all_multiple, if the connection was broken, we closed it before getting the next available connection. This must be avoided by having a temporary next pointer. The same kind of problem is valid for pointers coming from the epoll interface. The kernel can provide back connection pointer that are not valid any longer. Therefore, we need to use an ID instead of the pointer value to retrieve the connections. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* | Event handling: Fix connection destroy bugChristoph Lipka2017-02-012-0/+8
|/ | | | | | | | | It might happen that an event is part of the epoll event queue that belongs to a connection which was destroyed before the event is handled. Due to this, the event handling main loop might stop and the daemon exits. This misbehavior is fixed with this patch. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* daemon: check payload length before cast to structChristoph Lipka2017-01-311-15/+66
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Unit Test: Event handlingChristoph Lipka2016-10-244-6/+43
| | | | | | Unit tests for DLT Daemon connection and event handling Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Unit Test: MultiNodeOnkar Palkar2016-10-243-13/+50
| | | | | | Unit test for DLT MultiNode extension Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* dlt-system-filetransfer: fix bug caused by malloc assertManikandan C2016-10-241-6/+11
| | | | | | | Remove malloc assert in inappropriate location and add error logs in case of failures. Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com>
* Environment variables for library ringbufferChristoph Lipka2016-10-242-1/+56
| | | | | | | | | | | | This patch adds environment variables to configure user library ringbuffer and step size. The following variables can be set: DLT_USER_BUFFER_MIN - for minimal size DLT_USER_BUFFER_MAX - for maximal size DLT_USER_BUFFER_STEP - for step size Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* DLT_PTR macro: Improve implementation and function API addedChristoph Lipka2016-10-241-0/+32
| | | | | | | | The original implementation result in a compile error when DLT_PTR is used with other macros like DLT_STRING. This patch overcomes that problem. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* MultiNode: Specify config file location in dlt.confChristoph Lipka2016-10-244-9/+33
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* dlt-client: Use correct port on connectChristoph Lipka2016-10-242-25/+31
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* process user message: Fix bound handlingFrederic Berat2016-10-242-26/+109
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* dlt-system-filetransfer: Fix compiler warningsChristoph Lipka2016-10-241-1/+2
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Dlt-Receive: Use PRIxxx macros for printf variablesChristoph Lipka2016-10-241-2/+3
| | | | | | This change is done to remove compiler warnings. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Offine logstorage: Remove duplicated source fileChristoph Lipka2016-10-241-467/+0
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Fix: Memory for context description is not freedYusuke Sato2016-09-231-0/+18
| | | | | | | | Currently, allocated memory for context description is not freed in dlt_free(). free() for each member variables of dlt_user.dlt_ll_ts[i] is added in the for block in dlt_free(). Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I52a81cf2918cb0014fdcfc666cb8bb93ca7cb525
* Fix: dlt-daemon overwrites ECU ID even if user log message already has the ↵Yusuke Sato2016-09-231-2/+2
| | | | | | | | | | | ECU ID that is not default value dlt-daemon overwrites ECU ID even if user log message already has the ECU ID that is not default value. This phenomenon happens when application uses dlt_forward_msg(). Therefore, dlt-daemon is modified not to overwrite ECU ID if log message has already has the ECU ID. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: Icbc6304e5571242bf75ff0d32cbe4b004f1d7f9d
* Add: Configuration of option of get log info response during context ↵Yusuke Sato2016-09-233-1/+12
| | | | | | | | | | registration Option of get log info response during context registration was fixed to 7. This modification enables to change that option. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: Ia75f15cdb33e0bffd77c5ba71a1960e820714e61
* Add: Configuration of daemon FIFO sizeYusuke Sato2016-09-233-0/+32
| | | | | | | Configuration of daemon FIFO (default: /tmp/dlt) size is added to dlt.conf. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I05cc56b9a05e4c3a0a1af49c374f35ae10f4674d
* Fix: Handle of /tmp/dlt never reset if dlt-daemon is killed during output ↵Yusuke Sato2016-09-231-1/+1
| | | | | | | | | | user buffer Handle of /tmp/dlt cannot be reset if dlt-daemon is killed during output user buffer because dlt_user_log_resend_buffer() never returns DLT_RETURN_PIPE_ERROR. Return value of dlt_user_log_resend_buffer() is modified to pass return value of dlt_user_log_out3() without change. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I506103ebebcdb3c145d1f0719a3c8caffc8d89c1
* Add: Debug log for file transfer feature of dlt-system.Yusuke Sato2016-09-231-1/+1
| | | | | | | Output debug log: File name contained in inotify event message. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I276b1373ae3b60347b4af44681f5c601f62dde4c
* Fix: Segfault in checking buffer usageYusuke Sato2016-09-231-0/+3
| | | | | | | | Segfault is caused by dlt_user_check_buffer() if this function is called during increasing the user buffer. To avoid this issue, semaphore has to be added. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: Ie56f2fb73aeacb835180468e57c9338d2ffdb072
* Fix: File Transfer accelerationYusuke Sato2016-09-231-0/+1
| | | | | | | | Currently, dlt-system just wait for free space of user buffer > 50%. To speed up the file transfer, dlt-system should try to resend user buffer contents actively. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I09d76acacf65b2c68559a05d45e00f35f402316a
* Fix: File name is broken when file is transferred on 64 bit OS.Yusuke Sato2016-09-232-20/+20
| | | | | | | | When file transfer feature of dlt-system is used on the 64 bit OS, file name is overwritten at the unique name creation phase. File serial number should be maximum 10-digit decimal number. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I18fac363a103b6806ed9eb003ebbb305af7e7f58
* Fix: Memory leak issue in dlt-dbusYusuke Sato2016-09-231-0/+3
| | | | | | | | There is possibility that dlt-dbus continues to allocate memory for each filtered DBus message. To solve this issue, free() is added after output the DBus log. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I393552c97035b6b06673cd5a9fd05c9158f47cdc
* Add dlt_user_is_logLevel_enabled APIChristoph Lipka2016-09-232-1/+51
| | | | | | | | | | This function allows an application developer to check if the DLT LogLevel is enabled before starting any log string creation. It can be used in application specific logging wrapper functions. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I4c269b12bfdeae29a4e795385cdbc54a579ba621
* Fixed D-Bus tracing not working anymoreAlexander Wenzel2016-05-131-1/+1
| | | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Topic: GENDLT-425 Change-Id: I4ec56d714804d9ee4fa904b71c58dafd00990b4f
* Fixed not working default log level.Alexander Wenzel2016-05-031-8/+12
| | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Change-Id: Id01c9a11e4b5ccf4166f10c5e45363f3a7c00535
* Fixed not returning the correct number of lost messages at exit.Alexander Wenzel2016-05-031-1/+5
| | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Change-Id: I211222d04350820098bf56dfc5b7aee50e2529f0
* dlt-daemon: Free DltDaemon structure on exitChristoph Lipka2016-04-281-3/+2
| | | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I504664fa8d2a4c6d9449a1911bf139dfe6005d76