[core,connection] fix log level of several messages

WARN messages that occur during normal operation have been downgraded to
debug.
This commit is contained in:
akallabeth
2025-06-20 11:39:15 +02:00
parent 37a9ce2323
commit 2386bda6a0
4 changed files with 16 additions and 15 deletions

View File

@@ -1184,7 +1184,7 @@ state_run_t rdp_handle_message_channel(rdpRdp* rdp, wStream* s, UINT16 channelId
return rc;
}
BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s)
BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s, DWORD logLevel)
{
WINPR_ASSERT(rdp);
WINPR_ASSERT(rdp->mcs);
@@ -1206,8 +1206,9 @@ BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s)
}
else
{
WLog_WARN(TAG, "expected messageChannelId=%" PRIu16 ", got %" PRIu16, messageChannelId,
channelId);
wLog* log = WLog_Get(TAG);
WLog_Print(log, logLevel, "expected messageChannelId=%" PRIu16 ", got %" PRIu16,
messageChannelId, channelId);
}
}

View File

@@ -46,7 +46,7 @@ FREERDP_LOCAL BOOL rdp_client_redirect(rdpRdp* rdp);
FREERDP_LOCAL BOOL rdp_client_skip_mcs_channel_join(rdpRdp* rdp);
FREERDP_LOCAL BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, wStream* s);
FREERDP_LOCAL BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s);
FREERDP_LOCAL BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s, DWORD logLevel);
FREERDP_LOCAL state_run_t rdp_client_connect_license(rdpRdp* rdp, wStream* s);
FREERDP_LOCAL state_run_t rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s);

View File

@@ -1037,7 +1037,7 @@ void license_generate_randoms(rdpLicense* license)
#ifdef LICENSE_NULL_CLIENT_RANDOM
ZeroMemory(license->ClientRandom, sizeof(license->ClientRandom)); /* ClientRandom */
#else
winpr_RAND(license->ClientRandom, sizeof(license->ClientRandom)); /* ClientRandom */
winpr_RAND(license->ClientRandom, sizeof(license->ClientRandom)); /* ClientRandom */
#endif
winpr_RAND(license->ServerRandom, sizeof(license->ServerRandom)); /* ServerRandom */
@@ -1490,7 +1490,7 @@ BOOL license_read_binary_blob_data(wLog* log, LICENSE_BLOB* blob, UINT16 wBlobTy
*/
if ((blob->type != BB_ANY_BLOB) && (blob->length == 0))
{
WLog_Print(log, WLOG_WARN, "license binary blob::type %s, length=0, skipping.",
WLog_Print(log, WLOG_DEBUG, "license binary blob::type %s, length=0, skipping.",
licencse_blob_type_string(blob->type));
return TRUE;
}
@@ -1577,7 +1577,7 @@ static BOOL license_write_encrypted_premaster_secret_blob(wLog* log, wStream* s,
if (!Stream_EnsureRemainingCapacity(s, length + 4))
return FALSE;
Stream_Write_UINT16(s, blob->type); /* wBlobType (2 bytes) */
Stream_Write_UINT16(s, blob->type); /* wBlobType (2 bytes) */
Stream_Write_UINT16(s, (UINT16)length); /* wBlobLen (2 bytes) */
if (blob->length > 0)
@@ -2387,7 +2387,7 @@ BOOL license_read_new_license_request_packet(rdpLicense* license, wStream* s)
if (!license_check_preferred_alg(license, PreferredKeyExchangeAlg, "new license request"))
return FALSE;
Stream_Read_UINT32(s, license->PlatformId); /* PlatformId (4 bytes) */
Stream_Read_UINT32(s, license->PlatformId); /* PlatformId (4 bytes) */
Stream_Read(s, license->ClientRandom,
sizeof(license->ClientRandom)); /* ClientRandom (32 bytes) */

View File

@@ -240,8 +240,8 @@ BOOL rdp_write_security_header(rdpRdp* rdp, wStream* s, UINT16 flags)
WLog_Print(rdp->log, WLOG_TRACE, "%s", rdp_security_flag_string(flags, buffer, sizeof(buffer)));
/* Basic Security Header */
WINPR_ASSERT((flags & SEC_FLAGSHI_VALID) == 0); /* SEC_FLAGSHI_VALID is unsupported */
Stream_Write_UINT16(s, flags); /* flags */
Stream_Write_UINT16(s, 0); /* flagsHi (unused) */
Stream_Write_UINT16(s, flags); /* flags */
Stream_Write_UINT16(s, 0); /* flagsHi (unused) */
return TRUE;
}
@@ -383,9 +383,9 @@ BOOL rdp_write_share_data_header(rdpRdp* rdp, wStream* s, size_t length, BYTE ty
Stream_Write_UINT8(s, STREAM_LOW); /* streamId (1 byte) */
Stream_Write_UINT16(
s, WINPR_ASSERTING_INT_CAST(uint16_t, length)); /* uncompressedLength (2 bytes) */
Stream_Write_UINT8(s, type); /* pduType2, Data PDU Type (1 byte) */
Stream_Write_UINT8(s, 0); /* compressedType (1 byte) */
Stream_Write_UINT16(s, 0); /* compressedLength (2 bytes) */
Stream_Write_UINT8(s, type); /* pduType2, Data PDU Type (1 byte) */
Stream_Write_UINT8(s, 0); /* compressedType (1 byte) */
Stream_Write_UINT16(s, 0); /* compressedLength (2 bytes) */
return TRUE;
}
@@ -2081,7 +2081,7 @@ static state_run_t rdp_recv_callback_int(WINPR_ATTR_UNUSED rdpTransport* transpo
break;
case CONNECTION_STATE_CONNECT_TIME_AUTO_DETECT_REQUEST:
if (!rdp_client_connect_auto_detect(rdp, s))
if (!rdp_client_connect_auto_detect(rdp, s, WLOG_DEBUG))
{
if (!rdp_client_transition_to_state(rdp, CONNECTION_STATE_LICENSING))
status = STATE_RUN_FAILED;
@@ -2104,7 +2104,7 @@ static state_run_t rdp_recv_callback_int(WINPR_ATTR_UNUSED rdpTransport* transpo
break;
case CONNECTION_STATE_MULTITRANSPORT_BOOTSTRAPPING_REQUEST:
if (!rdp_client_connect_auto_detect(rdp, s))
if (!rdp_client_connect_auto_detect(rdp, s, WLOG_DEBUG))
{
(void)rdp_client_transition_to_state(
rdp, CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE);