GUACAMOLE-1059: Fine tune comments and log messages.
This commit is contained in:
parent
47bf3ab672
commit
557e2f5944
@ -213,8 +213,12 @@ void guac_rdpdr_process_server_announce(guac_rdp_common_svc* svc,
|
|||||||
unsigned int major, minor, client_id;
|
unsigned int major, minor, client_id;
|
||||||
|
|
||||||
/* Stream should contain at least 8 bytes (UINT16 + UINT16 + UINT32) */
|
/* Stream should contain at least 8 bytes (UINT16 + UINT16 + UINT32) */
|
||||||
if (Stream_GetRemainingLength(input_stream) < 8)
|
if (Stream_GetRemainingLength(input_stream) < 8) {
|
||||||
|
guac_client_log(svc->client, GUAC_LOG_WARNING, "Server Announce "
|
||||||
|
"Request PDU does not contain the expected number of bytes. "
|
||||||
|
"Device redirection may not work as expected.");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Stream_Read_UINT16(input_stream, major);
|
Stream_Read_UINT16(input_stream, major);
|
||||||
Stream_Read_UINT16(input_stream, minor);
|
Stream_Read_UINT16(input_stream, minor);
|
||||||
|
@ -44,8 +44,8 @@ void guac_rdpdr_process_receive(guac_rdp_common_svc* svc,
|
|||||||
*/
|
*/
|
||||||
if (Stream_GetRemainingLength(input_stream) < 4) {
|
if (Stream_GetRemainingLength(input_stream) < 4) {
|
||||||
guac_client_log(svc->client, GUAC_LOG_WARNING, "Device redirection "
|
guac_client_log(svc->client, GUAC_LOG_WARNING, "Device redirection "
|
||||||
"channel receive Stream does not contain the expected number "
|
"channel PDU header does not contain the expected number of "
|
||||||
"of bytes. Device redirection may not function as expected.");
|
"bytes. Device redirection may not function as expected.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,10 @@ void guac_rdpsnd_formats_handler(guac_rdp_common_svc* svc,
|
|||||||
/* Reset own format count */
|
/* Reset own format count */
|
||||||
rdpsnd->format_count = 0;
|
rdpsnd->format_count = 0;
|
||||||
|
|
||||||
/* Check to make sure the stream has at least 20 bytes, which */
|
/*
|
||||||
|
* Check to make sure the stream has at least 20 bytes (14 byte seek,
|
||||||
|
* 2 x UTF16 reads, and 2 x UTF8 seeks).
|
||||||
|
*/
|
||||||
if (Stream_GetRemainingLength(input_stream) < 20) {
|
if (Stream_GetRemainingLength(input_stream) < 20) {
|
||||||
guac_client_log(client, GUAC_LOG_WARNING, "Server Audio Formats and "
|
guac_client_log(client, GUAC_LOG_WARNING, "Server Audio Formats and "
|
||||||
"Version PDU does not contain the expected number of bytes. "
|
"Version PDU does not contain the expected number of bytes. "
|
||||||
|
@ -35,7 +35,7 @@ void guac_rdpsnd_process_receive(guac_rdp_common_svc* svc,
|
|||||||
guac_rdpsnd* rdpsnd = (guac_rdpsnd*) svc->data;
|
guac_rdpsnd* rdpsnd = (guac_rdpsnd*) svc->data;
|
||||||
guac_rdpsnd_pdu_header header;
|
guac_rdpsnd_pdu_header header;
|
||||||
|
|
||||||
/* Check that we at least the 4 byte header (UINT8 + UINT8 + UINT16) */
|
/* Check that we have at least the 4 byte header (UINT8 + UINT8 + UINT16) */
|
||||||
if (Stream_GetRemainingLength(input_stream) < 4) {
|
if (Stream_GetRemainingLength(input_stream) < 4) {
|
||||||
guac_client_log(svc->client, GUAC_LOG_WARNING, "Audio Stream does not "
|
guac_client_log(svc->client, GUAC_LOG_WARNING, "Audio Stream does not "
|
||||||
"contain the expected number of bytes. Audio redirection may "
|
"contain the expected number of bytes. Audio redirection may "
|
||||||
|
@ -54,9 +54,9 @@ static void guac_rdp_ai_handle_data(guac_client* client,
|
|||||||
|
|
||||||
/* Verify we have at least 1 byte in the stream (UINT8) */
|
/* Verify we have at least 1 byte in the stream (UINT8) */
|
||||||
if (Stream_GetRemainingLength(stream) < 1) {
|
if (Stream_GetRemainingLength(stream) < 1) {
|
||||||
guac_client_log(client, GUAC_LOG_WARNING, "Audio input stream does not "
|
guac_client_log(client, GUAC_LOG_WARNING, "Audio input PDU header does "
|
||||||
"contain the expected number of bytes. Audio input redirection "
|
"not contain the expected number of bytes. Audio input "
|
||||||
"may not work as expected.");
|
"redirection may not work as expected.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user