From 661193fcb0a83fef8e1124692f963f7822111e82 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 9 Nov 2014 20:44:49 -0800 Subject: [PATCH] GUAC-911: Add debug messages to common pieces dealing with guac_client. --- src/common/guac_clipboard.c | 11 +++++++++++ src/common/guac_dot_cursor.c | 3 +++ src/common/guac_pointer_cursor.c | 3 +++ 3 files changed, 17 insertions(+) diff --git a/src/common/guac_clipboard.c b/src/common/guac_clipboard.c index 9501e252..0f880bc9 100644 --- a/src/common/guac_clipboard.c +++ b/src/common/guac_clipboard.c @@ -57,6 +57,10 @@ void guac_common_clipboard_send(guac_common_clipboard* clipboard, guac_client* c guac_stream* stream = guac_client_alloc_stream(client); guac_protocol_send_clipboard(client->socket, stream, clipboard->mimetype); + guac_client_log(client, GUAC_LOG_DEBUG, + "Created stream %i for %s clipboard data.", + stream->index, clipboard->mimetype); + /* Split clipboard into chunks */ while (remaining > 0) { @@ -67,6 +71,9 @@ void guac_common_clipboard_send(guac_common_clipboard* clipboard, guac_client* c /* Send block */ guac_protocol_send_blob(client->socket, stream, current, block_size); + guac_client_log(client, GUAC_LOG_DEBUG, + "Sent %i bytes of clipboard data on stream %i.", + block_size, stream->index); /* Next block */ remaining -= block_size; @@ -74,6 +81,10 @@ void guac_common_clipboard_send(guac_common_clipboard* clipboard, guac_client* c } + guac_client_log(client, GUAC_LOG_DEBUG, + "Clipboard stream %i complete.", + stream->index); + /* End stream */ guac_protocol_send_end(client->socket, stream); guac_client_free_stream(client, stream); diff --git a/src/common/guac_dot_cursor.c b/src/common/guac_dot_cursor.c index a08022e2..559c9d80 100644 --- a/src/common/guac_dot_cursor.c +++ b/src/common/guac_dot_cursor.c @@ -78,5 +78,8 @@ void guac_common_set_dot_cursor(guac_client* client) { /* Free buffer */ guac_client_free_buffer(client, cursor); + guac_client_log(client, GUAC_LOG_DEBUG, + "Client cursor image set to generic built-in dot."); + } diff --git a/src/common/guac_pointer_cursor.c b/src/common/guac_pointer_cursor.c index c09968bd..5c1d2d97 100644 --- a/src/common/guac_pointer_cursor.c +++ b/src/common/guac_pointer_cursor.c @@ -89,5 +89,8 @@ void guac_common_set_pointer_cursor(guac_client* client) { /* Free buffer */ guac_client_free_buffer(client, cursor); + guac_client_log(client, GUAC_LOG_DEBUG, + "Client cursor image set to generic built-in pointer."); + }