diff options
-rw-r--r-- | src/daemon/dlt-daemon.c | 11 | ||||
-rw-r--r-- | src/daemon/dlt_daemon_client.c | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index 54587dc..ee8b929 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -2849,10 +2849,15 @@ int dlt_daemon_process_user_message_log(DltDaemon *daemon, } ret = dlt_daemon_client_send_message_to_all_client(daemon, - daemon_local, verbose); + daemon_local, verbose); - if (DLT_DAEMON_ERROR_OK != ret) - dlt_log(LOG_ERR, "failed to send message to client\n"); + if (ret == DLT_DAEMON_ERROR_BUFFER_FULL && daemon->overflow_counter == 1) { + dlt_vlog(LOG_WARNING, "%s: buffer full, messages will be discarded.\n", + __func__); + } else if (ret != DLT_DAEMON_ERROR_OK && + ret != DLT_DAEMON_ERROR_BUFFER_FULL) { + dlt_vlog(LOG_ERR, "%s: failed to send message to client\n", __func__); + } /* keep not read data in buffer */ size = daemon_local->msg.headersize + diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index acd46f4..3d90a47 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -365,8 +365,8 @@ int dlt_daemon_client_send_message_to_all_client(DltDaemon *daemon, if (daemon->overflow_counter) { ret = dlt_daemon_send_message_overflow(daemon, daemon_local, verbose); if (DLT_DAEMON_ERROR_OK == ret) { - dlt_vlog(LOG_WARNING, "%u messages discarded!\n", - daemon->overflow_counter); + dlt_vlog(LOG_WARNING, "%s: %u messages discarded! Now able to send messages to the client.\n", + __func__, daemon->overflow_counter); daemon->overflow_counter = 0; } } |