From 6d8d5e3ebec89ac1937cdf8b91a9b5aba0f56e0c Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 11 Apr 2025 10:14:07 +0200 Subject: [PATCH 1/2] [core,caps] only warn in rdp_write_order_capability_set warn about inconsistencies between settings and OrderSupport flags but do not abort. --- libfreerdp/core/capabilities.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 73c83fc1a..e153ea25e 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -657,17 +657,15 @@ static BOOL rdp_write_order_capability_set(wLog* log, wStream* s, const rdpSetti { if ((orderSupportExFlags & CACHE_BITMAP_V3_SUPPORT) == 0) { - WLog_Print(log, WLOG_ERROR, + WLog_Print(log, WLOG_WARN, "rdpSettings::BitmapCacheV3Enabled=TRUE, but CACHE_BITMAP_V3_SUPPORT not " "set in rdpSettings::OrderSupportEx, aborting."); - return FALSE; } if ((orderFlags & ORDER_FLAGS_EXTRA_SUPPORT) == 0) { - WLog_Print(log, WLOG_ERROR, + WLog_Print(log, WLOG_WARN, "rdpSettings::BitmapCacheV3Enabled=TRUE, but ORDER_FLAGS_EXTRA_SUPPORT not " "set in rdpSettings::OrderSupport, aborting."); - return FALSE; } } @@ -676,17 +674,15 @@ static BOOL rdp_write_order_capability_set(wLog* log, wStream* s, const rdpSetti if ((orderSupportExFlags & ALTSEC_FRAME_MARKER_SUPPORT) == 0) { WLog_Print( - log, WLOG_ERROR, + log, WLOG_WARN, "rdpSettings::FrameMarkerCommandEnabled=TRUE, but " "ALTSEC_FRAME_MARKER_SUPPORT not set in rdpSettings::OrderSupportEx, aborting."); - return FALSE; } if ((orderFlags & ORDER_FLAGS_EXTRA_SUPPORT) == 0) { - WLog_Print(log, WLOG_ERROR, + WLog_Print(log, WLOG_WARN, "rdpSettings::FrameMarkerCommandEnabled=TRUE, but ORDER_FLAGS_EXTRA_SUPPORT " "not set in rdpSettings::OrderSupport, aborting."); - return FALSE; } } From b24d13a8255c272e94cacc7f75a764aa8809b085 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 11 Apr 2025 09:13:44 +0200 Subject: [PATCH 2/2] [channels,rdpdr] improve logging * remove error logging in success path * downgrade non fatal errror message to warning --- channels/rdpdr/client/rdpdr_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 6c7647783..5de2d87fd 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -1494,7 +1494,7 @@ static UINT dummy_irp_response(rdpdrPlugin* rdpdr, wStream* s) const uint32_t FileId = Stream_Get_UINT32(s); /* FileId (4 bytes) */ const uint32_t CompletionId = Stream_Get_UINT32(s); /* CompletionId (4 bytes) */ - WLog_Print(rdpdr->log, WLOG_ERROR, + WLog_Print(rdpdr->log, WLOG_WARN, "Dummy response {DeviceId=%" PRIu32 ", FileId=%" PRIu32 ", CompletionId=%" PRIu32 "}", DeviceId, FileId, CompletionId); @@ -1521,13 +1521,13 @@ static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s) if (!irp) { - WLog_Print(rdpdr->log, WLOG_ERROR, "irp_new failed with %" PRIu32 "!", error); - - if (error == CHANNEL_RC_OK || (error == ERROR_DEV_NOT_EXIST && rdpdr->ignoreInvalidDevices)) + if ((error == CHANNEL_RC_OK) || + (error == ERROR_DEV_NOT_EXIST && rdpdr->ignoreInvalidDevices)) { return dummy_irp_response(rdpdr, s); } + WLog_Print(rdpdr->log, WLOG_ERROR, "irp_new failed with %" PRIu32 "!", error); return error; }