Merge pull request #2537 from MartinHaimberger/mh-autodetect-fix
autodetect: debug fixed and level adjusted
This commit is contained in:
commit
b029e78ae7
@ -66,7 +66,7 @@ static BOOL autodetect_send_rtt_measure_request(rdpContext* context, UINT16 sequ
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending RTT Measure Request PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "sending RTT Measure Request PDU");
|
||||
|
||||
Stream_Write_UINT8(s, 0x06); /* headerLength (1 byte) */
|
||||
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_REQUEST); /* headerTypeId (1 byte) */
|
||||
@ -99,7 +99,7 @@ static BOOL autodetect_send_rtt_measure_response(rdpRdp* rdp, UINT16 sequenceNum
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending RTT Measure Response PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "sending RTT Measure Response PDU");
|
||||
|
||||
Stream_Write_UINT8(s, 0x06); /* headerLength (1 byte) */
|
||||
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_RESPONSE); /* headerTypeId (1 byte) */
|
||||
@ -118,7 +118,7 @@ static BOOL autodetect_send_bandwidth_measure_start(rdpContext* context, UINT16
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending Bandwidth Measure Start PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "sending Bandwidth Measure Start PDU");
|
||||
|
||||
Stream_Write_UINT8(s, 0x06); /* headerLength (1 byte) */
|
||||
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_REQUEST); /* headerTypeId (1 byte) */
|
||||
@ -148,7 +148,7 @@ BOOL autodetect_send_bandwidth_measure_payload(rdpContext* context, UINT16 paylo
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending Bandwidth Measure Payload PDU -> payloadLength=%u");
|
||||
WLog_VRB(AUTODETECT_TAG, "sending Bandwidth Measure Payload PDU -> payloadLength=%u", payloadLength);
|
||||
|
||||
/* 4-bytes aligned */
|
||||
payloadLength &= ~3;
|
||||
@ -182,7 +182,7 @@ static BOOL autodetect_send_bandwidth_measure_stop(rdpContext* context, UINT16 p
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending Bandwidth Measure Stop PDU -> payloadLength=%u");
|
||||
WLog_VRB(AUTODETECT_TAG, "sending Bandwidth Measure Stop PDU -> payloadLength=%u", payloadLength);
|
||||
|
||||
/* 4-bytes aligned */
|
||||
payloadLength &= ~3;
|
||||
@ -237,7 +237,7 @@ static BOOL autodetect_send_bandwidth_measure_results(rdpRdp* rdp, UINT16 respon
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending Bandwidth Measure Results PDU -> timeDelta=%u, byteCount=%u", timeDelta, rdp->autodetect->bandwidthMeasureByteCount);
|
||||
WLog_VRB(AUTODETECT_TAG, "sending Bandwidth Measure Results PDU -> timeDelta=%u, byteCount=%u", timeDelta, rdp->autodetect->bandwidthMeasureByteCount);
|
||||
|
||||
Stream_Write_UINT8(s, 0x0E); /* headerLength (1 byte) */
|
||||
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_RESPONSE); /* headerTypeId (1 byte) */
|
||||
@ -258,7 +258,7 @@ static BOOL autodetect_send_netchar_result(rdpContext* context, UINT16 sequenceN
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending Bandwidth Network Characteristics Result PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "sending Bandwidth Network Characteristics Result PDU");
|
||||
|
||||
if (context->rdp->autodetect->netCharBandwidth > 0)
|
||||
{
|
||||
@ -294,7 +294,7 @@ BOOL autodetect_send_netchar_sync(rdpRdp* rdp, UINT16 sequenceNumber)
|
||||
if (!s)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "sending Network Characteristics Sync PDU -> bandwidth=%u, rtt=%u", rdp->autodetect->netCharBandwidth, rdp->autodetect->netCharAverageRTT);
|
||||
WLog_VRB(AUTODETECT_TAG, "sending Network Characteristics Sync PDU -> bandwidth=%u, rtt=%u", rdp->autodetect->netCharBandwidth, rdp->autodetect->netCharAverageRTT);
|
||||
|
||||
Stream_Write_UINT8(s, 0x0E); /* headerLength (1 byte) */
|
||||
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_RESPONSE); /* headerTypeId (1 byte) */
|
||||
@ -311,7 +311,7 @@ static BOOL autodetect_recv_rtt_measure_request(rdpRdp* rdp, wStream* s, AUTODET
|
||||
if (autodetectReqPdu->headerLength != 0x06)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "received RTT Measure Request PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "received RTT Measure Request PDU");
|
||||
|
||||
/* Send a response to the server */
|
||||
return autodetect_send_rtt_measure_response(rdp, autodetectReqPdu->sequenceNumber);
|
||||
@ -324,7 +324,7 @@ static BOOL autodetect_recv_rtt_measure_response(rdpRdp* rdp, wStream* s, AUTODE
|
||||
if (autodetectRspPdu->headerLength != 0x06)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "received RTT Measure Response PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "received RTT Measure Response PDU");
|
||||
|
||||
rdp->autodetect->netCharAverageRTT = GetTickCount() - rdp->autodetect->rttMeasureStartTime;
|
||||
if (rdp->autodetect->netCharBaseRTT == 0 || rdp->autodetect->netCharBaseRTT > rdp->autodetect->netCharAverageRTT)
|
||||
@ -340,7 +340,7 @@ static BOOL autodetect_recv_bandwidth_measure_start(rdpRdp* rdp, wStream* s, AUT
|
||||
if (autodetectReqPdu->headerLength != 0x06)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "received Bandwidth Measure Start PDU - time=%lu", GetTickCount());
|
||||
WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Start PDU - time=%lu", GetTickCount());
|
||||
|
||||
/* Initialize bandwidth measurement parameters */
|
||||
rdp->autodetect->bandwidthMeasureStartTime = GetTickCount();
|
||||
@ -398,7 +398,7 @@ static BOOL autodetect_recv_bandwidth_measure_stop(rdpRdp* rdp, wStream* s, AUTO
|
||||
payloadLength = 0;
|
||||
}
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "received Bandwidth Measure Stop PDU -> payloadLength=%u", payloadLength);
|
||||
WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Stop PDU -> payloadLength=%u", payloadLength);
|
||||
|
||||
/* Add the payload length to the bandwidth measurement parameters */
|
||||
rdp->autodetect->bandwidthMeasureByteCount += payloadLength;
|
||||
@ -423,7 +423,7 @@ static BOOL autodetect_recv_bandwidth_measure_results(rdpRdp* rdp, wStream* s, A
|
||||
if (autodetectRspPdu->headerLength != 0x0E)
|
||||
return FALSE;
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "received Bandwidth Measure Results PDU");
|
||||
WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Results PDU");
|
||||
|
||||
Stream_Read_UINT32(s, rdp->autodetect->bandwidthMeasureTimeDelta); /* timeDelta (4 bytes) */
|
||||
Stream_Read_UINT32(s, rdp->autodetect->bandwidthMeasureByteCount); /* byteCount (4 bytes) */
|
||||
@ -470,7 +470,7 @@ static BOOL autodetect_recv_netchar_result(rdpRdp* rdp, wStream* s, AUTODETECT_R
|
||||
break;
|
||||
}
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG, "received Network Characteristics Result PDU -> baseRTT=%u, bandwidth=%u, averageRTT=%u", rdp->autodetect->netCharBaseRTT, rdp->autodetect->netCharBandwidth, rdp->autodetect->netCharAverageRTT);
|
||||
WLog_VRB(AUTODETECT_TAG, "received Network Characteristics Result PDU -> baseRTT=%u, bandwidth=%u, averageRTT=%u", rdp->autodetect->netCharBaseRTT, rdp->autodetect->netCharBandwidth, rdp->autodetect->netCharAverageRTT);
|
||||
|
||||
IFCALLRET(rdp->autodetect->NetworkCharacteristicsResult, success, rdp->context, autodetectReqPdu->sequenceNumber);
|
||||
|
||||
@ -490,7 +490,7 @@ int rdp_recv_autodetect_request_packet(rdpRdp* rdp, wStream* s)
|
||||
Stream_Read_UINT16(s, autodetectReqPdu.sequenceNumber); /* sequenceNumber (2 bytes) */
|
||||
Stream_Read_UINT16(s, autodetectReqPdu.requestType); /* requestType (2 bytes) */
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG,
|
||||
WLog_VRB(AUTODETECT_TAG,
|
||||
"rdp_recv_autodetect_request_packet: headerLength=%u, headerTypeId=%u, sequenceNumber=%u, requestType=%04x",
|
||||
autodetectReqPdu.headerLength, autodetectReqPdu.headerTypeId,
|
||||
autodetectReqPdu.sequenceNumber, autodetectReqPdu.requestType);
|
||||
@ -552,7 +552,7 @@ int rdp_recv_autodetect_response_packet(rdpRdp* rdp, wStream* s)
|
||||
Stream_Read_UINT16(s, autodetectRspPdu.sequenceNumber); /* sequenceNumber (2 bytes) */
|
||||
Stream_Read_UINT16(s, autodetectRspPdu.responseType); /* responseType (2 bytes) */
|
||||
|
||||
WLog_DBG(AUTODETECT_TAG,
|
||||
WLog_VRB(AUTODETECT_TAG,
|
||||
"rdp_recv_autodetect_response_packet: headerLength=%u, headerTypeId=%u, sequenceNumber=%u, requestType=%04x",
|
||||
autodetectRspPdu.headerLength, autodetectRspPdu.headerTypeId,
|
||||
autodetectRspPdu.sequenceNumber, autodetectRspPdu.responseType);
|
||||
|
Loading…
Reference in New Issue
Block a user