diff options
author | Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com> | 2020-03-03 10:16:25 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2020-07-06 10:04:07 +0900 |
commit | fbe9c0c0ee1b134ac335392ff18d239d69ab50c7 (patch) | |
tree | cd3412dd10b9623b3eda9a1f5e774a2b1bc2f603 /src/daemon/dlt_daemon_client.c | |
parent | d46840c9cd0e52dd7d133bbd64805fb9b8aa2aac (diff) | |
download | DLT-daemon-fbe9c0c0ee1b134ac335392ff18d239d69ab50c7.tar.gz |
daemon: Avoid spamming message buffer overflow
- In existing implementation, control message "message_buffer_overflow"
is sent for every incoming message which is dropped since buffer is full.
So UDP and logstorage will receive a lot of these messages.
That could be considered as unnecessary.
- In order to reduce the useless effort to send "message_buffer_overflow"
for every missing message, daemon will only send it out
right after buffer is full or right after real client is connected.
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
Diffstat (limited to 'src/daemon/dlt_daemon_client.c')
-rw-r--r-- | src/daemon/dlt_daemon_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index 3d90a47..c47c808 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -362,7 +362,7 @@ int dlt_daemon_client_send_message_to_all_client(DltDaemon *daemon, } /* check if overflow occurred */ - if (daemon->overflow_counter) { + if (daemon->overflow_counter == 1) { ret = dlt_daemon_send_message_overflow(daemon, daemon_local, verbose); if (DLT_DAEMON_ERROR_OK == ret) { dlt_vlog(LOG_WARNING, "%s: %u messages discarded! Now able to send messages to the client.\n", |