From f5e4ca6f6af1f81c96694216c0b8bdeb00cfb127 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 16 Nov 2022 16:19:28 +0100 Subject: [PATCH] [core] Log data not processed in event loop --- libfreerdp/core/peer.c | 5 +++-- libfreerdp/core/rdp.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index 75e94ccf8..8de025676 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -1155,8 +1155,9 @@ static state_run_t peer_recv_callback(rdpTransport* transport, wStream* s, void* Stream_SetPosition(s, start); rc = peer_recv_callback_internal(transport, s, extra); - WLog_VRB(TAG, "(server)[%s -> %s] current return %s", old, rdp_get_state_string(rdp), - state_run_result_string(rc, buffer, sizeof(buffer))); + WLog_VRB(TAG, "(server)[%s -> %s] current return %s [%" PRIuz " bytes not processed]", old, + rdp_get_state_string(rdp), state_run_result_string(rc, buffer, sizeof(buffer)), + Stream_GetRemainingLength(s)); } while ((rc == STATE_RUN_TRY_AGAIN) || (rc == STATE_RUN_CONTINUE) || (rc == STATE_RUN_ACTIVE)); return rc; diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index f104b687e..6519fed45 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -1984,8 +1984,9 @@ state_run_t rdp_recv_callback(rdpTransport* transport, wStream* s, void* extra) Stream_SetPosition(s, start); rc = rdp_recv_callback_int(transport, s, extra); - WLog_VRB(TAG, "(client)[%s -> %s] current return %s", old, rdp_get_state_string(rdp), - state_run_result_string(rc, buffer, sizeof(buffer))); + WLog_VRB(TAG, "(client)[%s -> %s] current return %s [%" PRIuz " bytes not processed]", old, + rdp_get_state_string(rdp), state_run_result_string(rc, buffer, sizeof(buffer)), + Stream_GetRemainingLength(s)); } while ((rc == STATE_RUN_TRY_AGAIN) || (rc == STATE_RUN_CONTINUE)); return rc; }