diff options
author | Dinh Cong Toan <toan.dinhcong@vn.bosch.com> | 2021-06-08 11:19:14 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2021-06-30 10:54:59 +0900 |
commit | 8770cbb37583b2c4654e582874d604ee50d8f68d (patch) | |
tree | 9e6e5158d234fa0fd2b7baceebc6ce1f30c0430d | |
parent | d9fe0567cd2922a8a2b9114d11ebb593e09ac557 (diff) | |
download | DLT-daemon-8770cbb37583b2c4654e582874d604ee50d8f68d.tar.gz |
Update document and fix conversion warning
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
-rw-r--r-- | doc/dlt-system.conf.5.md | 2 | ||||
-rw-r--r-- | include/dlt/dlt_common.h | 2 | ||||
-rw-r--r-- | src/console/dlt-control-common.h | 3 | ||||
-rw-r--r-- | src/daemon/dlt_daemon_client.c | 6 | ||||
-rw-r--r-- | src/lib/dlt_client.c | 2 | ||||
-rw-r--r-- | src/shared/dlt_common.c | 2 |
6 files changed, 7 insertions, 10 deletions
diff --git a/doc/dlt-system.conf.5.md b/doc/dlt-system.conf.5.md index 9a6f487..7020281 100644 --- a/doc/dlt-system.conf.5.md +++ b/doc/dlt-system.conf.5.md @@ -48,7 +48,7 @@ This value defines context id of the syslog adapter. ## SyslogPort -This value defines the UDP port opened for receiving log messages from syslog. Configuration for syslog to forward log to this port is necessary. Adding this config " *.* @localhost:47111" in config file of syslog (usually in /etc/rsyslog.d/50-default.conf) and restart the syslog service by command "sudo systemctl restart rsyslog.service". +This value defines the UDP port opened for receiving log messages from syslog. Configuration for syslog to forward log to this port is necessary. Adding this config `` *.* @localhost:47111 `` in config file of syslog (usually in /etc/rsyslog.d/50-default.conf) and restart the syslog service by command "sudo systemctl restart rsyslog.service". Default: 47111 diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h index fc5c18a..9704ac9 100644 --- a/include/dlt/dlt_common.h +++ b/include/dlt/dlt_common.h @@ -297,8 +297,6 @@ enum { # define DLT_OUTPUT_ASCII_LIMITED 5 # define DLT_FILTER_MAX 30 /**< Maximum number of filters */ -# define JSON_FILTER_NAME_SIZE 16 /* Size of buffer for the filter names in json filter files */ -# define JSON_FILTER_SIZE 200 /* Size in bytes, that the definition of one filter with all parameters needs */ # define DLT_MSG_READ_VALUE(dst, src, length, type) \ { \ diff --git a/src/console/dlt-control-common.h b/src/console/dlt-control-common.h index 697a927..d743a81 100644 --- a/src/console/dlt-control-common.h +++ b/src/console/dlt-control-common.h @@ -31,6 +31,7 @@ #define DLT_CTRL_ECUID_LEN 10 #define DLT_DAEMON_FLAG_MAX 256 +#define JSON_FILTER_NAME_SIZE 16 /* Size of buffer for the filter names in json filter files */ #define JSON_FILTER_SIZE 200 /* Size in bytes, that the definition of one filter with all parameters needs */ #ifndef pr_fmt @@ -105,4 +106,4 @@ DltReturnValue dlt_json_filter_load(DltFilter *filter, const char *filename, int */ DltReturnValue dlt_json_filter_save(DltFilter *filter, const char *filename, int verbose); #endif -#endif
\ No newline at end of file +#endif diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index fb23328..2724973 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -1603,7 +1603,7 @@ void dlt_daemon_control_callsw_cinjection(int sock, usercontext.log_level_pos = context->log_level_pos; - if (data_length_inject > msg->databuffersize) { + if (data_length_inject > (uint32_t) msg->databuffersize) { dlt_daemon_control_service_response(sock, daemon, daemon_local, id, DLT_SERVICE_RESPONSE_ERROR, verbose); return; } @@ -2462,7 +2462,7 @@ void dlt_daemon_control_service_logstorage(int sock, } } - for (i = 0; i < daemon_local->flags.offlineLogstorageMaxDevices; i++) { + for (i = 0; i < (uint32_t) daemon_local->flags.offlineLogstorageMaxDevices; i++) { connection_type = daemon->storage_handle[i].connection_type; memset(&daemon_mpoint_st, 0, sizeof(struct stat)); @@ -2591,7 +2591,7 @@ void dlt_daemon_control_service_logstorage(int sock, if (device_index == -1) { /* sync all Logstorage devices */ - for (i = 0; i < daemon_local->flags.offlineLogstorageMaxDevices; i++) + for (i = 0; i < (uint32_t) daemon_local->flags.offlineLogstorageMaxDevices; i++) if (daemon->storage_handle[i].connection_type == DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED) ret = dlt_daemon_logstorage_sync_cache( diff --git a/src/lib/dlt_client.c b/src/lib/dlt_client.c index 4530aff..25c311f 100644 --- a/src/lib/dlt_client.c +++ b/src/lib/dlt_client.c @@ -171,7 +171,6 @@ DltReturnValue dlt_client_init(DltClient *client, int verbose) DltReturnValue dlt_client_connect(DltClient *client, int verbose) { const int yes = 1; - int connect_errno = 0; char portnumbuffer[33]; struct addrinfo hints, *servinfo, *p; struct sockaddr_un addr; @@ -207,7 +206,6 @@ DltReturnValue dlt_client_connect(DltClient *client, int verbose) } if (connect(client->sock, p->ai_addr, p->ai_addrlen) < 0) { - connect_errno = errno; close(client->sock); continue; } diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c index c489d2d..8757296 100644 --- a/src/shared/dlt_common.c +++ b/src/shared/dlt_common.c @@ -1985,7 +1985,7 @@ DltReturnValue dlt_receiver_init(DltReceiver *receiver, int fd, DltReceiverType /** Reuse the receiver buffer if it exists and the buffer size * is not changed. If not, free the old one and allocate a new buffer. */ - if ((NULL != receiver->buffer) && ((uint32_t) buffersize != receiver->buffersize)) { + if ((NULL != receiver->buffer) && ( buffersize != receiver->buffersize)) { free(receiver->buffer); receiver->buffer = NULL; } |