summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* libdlt: Avoid busy loop in error case of mq_receive() (#59)Yusuke Sato2018-05-292-1/+16
| | | | | | | To avoid busy loop due to error of mq_receive() which is called in sub thread, 100ms sleep is added for the error case. Error log message for mq_receive() is also corrected to have errno. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Output signal number at exit (#68)Yusuke Sato2018-05-291-7/+8
| | | | | | | | | | | So far, signal number had been output in signal handler. However this was not so safety. And when syslog was used as log output destination of dlt_log(), we could not see any info in the same Life Cycle. So dlt_log() is removed from signal handler and signal number is newly output by DLT message and dlt_log() at exit. This info will help analysis why dlt-daemon exits. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Improve error logging on accept() failure (#69)Yusuke Sato2018-05-281-3/+3
| | | | | | | | | Error log in case of accept() failure is improved with errno info. This helps us to analyze dlt-daemon's issue in future. (e.g.) Connection request come to wrong socket unexpectedly and this causes exiting dlt-daemon. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Avoid to output duplicated application registration message (#63)Yusuke Sato2018-05-232-12/+22
| | | | | | | | | | | | | | | | If application tries to send application registration request before dlt-daemon startup, the request is sent twice as below: 1. Buffered request in user library buffer 2. New request when user app succeeds to attach to dlt-daemon In previous, dlt-daemon had been output the registration messages 2 times even though these messages were come from same application. This duplicated output is avoided by this change. Warning message in case of dlt-runtime-context.cfg exists is also avoided. This file is created when Control message: "Store Config" is used. This is not irregular case. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Not output Context un-/registration DLT message by default (#62)Yusuke Sato2018-05-231-5/+11
| | | | | | | | | | | This patch changes Context un-/registration message not to output DLT by default for the purpose of reducing trace messages. Actually dlt-daemon already sends almost same meaning control message which can show Context un-/registration([get_log_info] and [unregister_context]). These are duplicate message and should be suppressed in normal case. Only if "Verbose = 1" is set in dlt.conf, the messages are output as same as before. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Continue to send log level / connection status even if error ↵Yusuke Sato2018-05-231-3/+3
| | | | | | | | | | | | | | | | | | occurs (#61) In previous, there was possibility that application could not get notification from dlt-daemon due to wrong error handling. (e.g.) 1. App1, App2 and App3 register App/Context 2. App2 crashes without unregistering App/Context 3. Change default log level from DLT Viewer --> App1 can receive new default log level from dlt-daemon but App3 cannot. This patch makes processing non-stop even if error occurs in below cases: - While updating log level of all registered apps - While updating default log level/ default trace status - While updating connection status between dlt-daemon and dlt-client Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* IPC: Unix socket added (#43)ManikandanChockalingam2018-05-1816-196/+528
| | | | | | | | | * 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>
* Introduce controlling entire system trace status feature from dlt-control (#57)Yusuke Sato2018-05-188-63/+341
| | | | | | | | | | | | | | | | | | | | | * dlt-control: Provision to control entire system trace status 1. support for setting trace status using wildcards for both app and context 2. support for setting entire system trace status *This Logic is as same as for changing log level. (SHA: a966393ad7003d02870bceffa08df5ddf4bbf864 dlt-control: Provision to control entire system log level) * dlt-daemon: Fix control entire log level / trace status issue In previous, dlt-control could send request to set all log level / trace status with DLT_LOG_DEFAULT / DLT_TRACE_STATUS_DEFAULT(-1). However, dlt-daemon could not accept these value. This change fix this issue so that setting log level/trace status of all registered contexts become possible. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Lower log level of logs not to output unintentional warning (#58)Yusuke Sato2018-05-181-8/+5
| | | | | | | | | | | | | * dlt-daemon: Lower log level of several logs not to output unintentional warning Change log level of several logs from WARNING to INFO. 1. User FIFO cannot be opened because the FIFO does not exist --> This case can happen if DLT user app is one-shot 2. Runtime configuration file (dlt-runtime-application.cfg / dlt-runtime-context.cfg) cannot be opened --> This case can happen in normal use case. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Fix infinite loop on set log level using wildcards (#55)Yusuke Sato2018-05-081-1/+1
| | | | | | dlt-daemon entered to infinite loop when set log level request with wildcards came from dlt-control due to variable size. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Fix repeated output of marker message (#54)Yusuke Sato2018-05-081-1/+4
| | | | | | | | Marker message had been continued to output if application called dlt_log_marker() due to missing byte removing processing against marker message. Therefore the byte removing for marker message processing is added. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-control: Fix Setting default trace status issue (#53)Yusuke Sato2018-05-081-3/+3
| | | | | Default trace status could not be set by "-f" option. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* Fix ForceContextLogLevelAndTraceStatus handling in dlt_daemon_client.c (#50)kundatipradeep2018-04-271-4/+33
| | | | | Even Forcing log level and trace status of context to not exceed "ContextLogLevel" and "ContextTraceStatus" in dlt.conf file with ForceContextLogLevelAndTraceStatus = 1, the default log level is being overwritten with high value than expected by client(DLT_Viewer when default trace data request is sent ) and by dlt-control application on usage of (dlt-control -d loglevel IP_ADDRESS) With provided patch/changes in place, when ForceContextLogLevelAndTraceStatus is enabled the requested log level is checked with ContextLogLevel and if it satisfied the daemon default loglevel gets updated. Added a conditional checks to not to overwrite the individual contextLoglevel and ContextTracesStatus when ForceContextLogLevelAndTraceStatus is enabled in dlt.conf file and taken care of review comments.
* minor compiler warning gcc 7.x (#30)Phong Tran2018-03-295-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* README: Update contact informationChristoph Lipka2017-11-062-1/+4
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Updated release notes for 2.17v2.17.0ManikandanC2017-09-152-2/+33
| | | | Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* 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>
* Merge pull request #24 from baduras/some-minor-fixesRalphNiemeyer2017-09-053-5/+5
|\ | | | | Minor fixes for typo in CMakeLists and merge issue
| * Minor fixes: corrected typo in CMakeLists.txt - WTIH_DLT_ADAPTOR, removed ↵Stefan Badura2017-08-303-5/+5
|/ | | | character from merge - +
* Data stuck in receiver buffer when dlt_daemon_user_send_log_level() fails (#21)Lutz Helwing2017-08-223-12/+23
| | | | | | | | | | | | - 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>
* Update dlt_user.h (#22)Jens Lorenz2017-08-071-2/+2
| | | | | | | The dlt_user_log_write_start* function description mention the verbose/non-verbose option. According to my understanding verbose means that the code contains the verbose version of message (message as full string). The non-verbose version uses identifiers in order to reduce the message content and the interpretation of ids will be done by the viewer. Therefore the comments should be modified to capture this correctly.
* Add short explanation for DLT log level (#20)Lutz Helwing2017-08-072-0/+137
| | | 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>
* journald adaptor: test with sudo privileges (#18)Gordan Markuš2017-06-161-2/+2
| | | | | | | | Users in the 'systemd-journal' group can see all journalctl messages. Usually the user is not found in that group and the "start_systemd_journal_test.sh" script might hang because of this. Starting "dlt-system" with sudo privileges will mitigate this risk. Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.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>
* Tell cmake to use README.md instead of README to fix doc generation (#16)pierreN2017-05-221-1/+1
| | | Signed-off-by: Pierre N <pierreN@users.noreply.github.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>
* Updated README (#10)Jeremiah C. Foster2017-05-101-10/+3
| | | | Changed formatting by removing excess horizontal lines Updated source code URLs
* 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-239-16/+119
|\ \ | | | | | | dlt-client: fix dlt_client_cleanup memory handling
| * | dlt-client: fix dlt_client_cleanup memory handlingOnkar Palkar2017-02-069-16/+119
| |/ | | | | | | | | | | | | 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-232-0/+20
|\ \ | | | | | | CMake Option: Trigger segmentation fault in case of FATAL log
| * | CMake Option: Trigger segmentation fault in case of FATAL logChristoph Lipka2017-02-022-0/+20
| |/ | | | | | | | | | | | | | | 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>
* | Merge pull request #5 from clipka/devel_connection_handling_fixesRalphNiemeyer2017-03-235-3/+56
|\ \ | |/ |/| Daemon connection handling fixes
| * 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>
* Remove duplicate README (#4)Gianpaolo Macario2017-02-011-86/+0
| | | | | | | | README.md exists and is displayed by default in GitHub. Remove duplicate README to avoid confusion in case only one of the two is updated in the future. Signed-off-by: Gianpaolo Macario <gianpaolo_macario@mentor.com>
* daemon: check payload length before cast to structChristoph Lipka2017-01-311-15/+66
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* - Added missing build steps to INSTALLmetal4people2016-11-171-2/+9
| | | | | | | I've faced with cmake error while generating make files for dlt-daemon. After searching a bit, I've found out that zlib and dbus packages needed to be installed for default dlt-daemon configuration. I used Ubuntu 16.04 for build and after I installed the packages cmake generated project successfully. I think that is good idea to mention required packages in INSTALL notes in order to save the time of someone who will try to build dlt-daemon as I did.
* Switch to working version 2.17 UNSTABLEChristoph Lipka2016-11-161-2/+2
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* pkg-config: fix library directory.Mathieu Duponchelle2016-11-151-1/+1
| | | | | The install destination might be lib64, and a CMake variable exists that contains this information, CMAKE_INSTALL_LIBDIR.