GUAC-236: Log protocol violations at WARNING level.

This commit is contained in:
Michael Jumper 2016-02-27 15:24:38 -08:00
parent d1642cbcba
commit 36b625818d
14 changed files with 20 additions and 20 deletions

View File

@ -34,7 +34,7 @@ int guacenc_display_sync(guacenc_display* display, guac_timestamp timestamp) {
/* Verify timestamp is not decreasing */
if (timestamp < display->last_sync) {
guacenc_log(GUAC_LOG_DEBUG, "Decreasing sync timestamp");
guacenc_log(GUAC_LOG_WARNING, "Decreasing sync timestamp");
return 1;
}
@ -52,7 +52,7 @@ guacenc_layer* guacenc_display_get_layer(guacenc_display* display,
/* Do not lookup / allocate if index is invalid */
if (index < 0 || index > GUACENC_DISPLAY_MAX_LAYERS) {
guacenc_log(GUAC_LOG_DEBUG, "Layer index out of bounds: %i", index);
guacenc_log(GUAC_LOG_WARNING, "Layer index out of bounds: %i", index);
return NULL;
}
@ -63,7 +63,7 @@ guacenc_layer* guacenc_display_get_layer(guacenc_display* display,
/* Attempt to allocate layer */
layer = guacenc_layer_alloc();
if (layer == NULL) {
guacenc_log(GUAC_LOG_DEBUG, "Layer allocation failed");
guacenc_log(GUAC_LOG_WARNING, "Layer allocation failed");
return NULL;
}
@ -81,7 +81,7 @@ int guacenc_display_free_layer(guacenc_display* display,
/* Do not lookup / allocate if index is invalid */
if (index < 0 || index > GUACENC_DISPLAY_MAX_LAYERS) {
guacenc_log(GUAC_LOG_DEBUG, "Layer index out of bounds: %i", index);
guacenc_log(GUAC_LOG_WARNING, "Layer index out of bounds: %i", index);
return 1;
}
@ -103,7 +103,7 @@ guacenc_buffer* guacenc_display_get_buffer(guacenc_display* display,
/* Do not lookup / allocate if index is invalid */
if (internal_index < 0 || internal_index > GUACENC_DISPLAY_MAX_BUFFERS) {
guacenc_log(GUAC_LOG_DEBUG, "Buffer index out of bounds: %i", index);
guacenc_log(GUAC_LOG_WARNING, "Buffer index out of bounds: %i", index);
return NULL;
}
@ -114,7 +114,7 @@ guacenc_buffer* guacenc_display_get_buffer(guacenc_display* display,
/* Attempt to allocate buffer */
buffer = guacenc_buffer_alloc();
if (buffer == NULL) {
guacenc_log(GUAC_LOG_DEBUG, "Buffer allocation failed");
guacenc_log(GUAC_LOG_WARNING, "Buffer allocation failed");
return NULL;
}
@ -135,7 +135,7 @@ int guacenc_display_free_buffer(guacenc_display* display,
/* Do not lookup / allocate if index is invalid */
if (internal_index < 0 || internal_index > GUACENC_DISPLAY_MAX_BUFFERS) {
guacenc_log(GUAC_LOG_DEBUG, "Buffer index out of bounds: %i", index);
guacenc_log(GUAC_LOG_WARNING, "Buffer index out of bounds: %i", index);
return 1;
}

View File

@ -33,7 +33,7 @@ int guacenc_handle_blob(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 2) {
guacenc_log(GUAC_LOG_DEBUG, "\"blob\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"blob\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_cfill(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 6) {
guacenc_log(GUAC_LOG_DEBUG, "\"cfill\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"cfill\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_copy(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 9) {
guacenc_log(GUAC_LOG_DEBUG, "\"copy\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"copy\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_cursor(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 7) {
guacenc_log(GUAC_LOG_DEBUG, "\"cursor\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"cursor\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_dispose(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 1) {
guacenc_log(GUAC_LOG_DEBUG, "\"dispose\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"dispose\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_end(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 1) {
guacenc_log(GUAC_LOG_DEBUG, "\"end\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"end\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_img(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 6) {
guacenc_log(GUAC_LOG_DEBUG, "\"img\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"img\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_move(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 5) {
guacenc_log(GUAC_LOG_DEBUG, "\"move\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"move\" instruction incomplete");
return 1;
}

View File

@ -34,7 +34,7 @@ int guacenc_handle_rect(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 5) {
guacenc_log(GUAC_LOG_DEBUG, "\"rect\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"rect\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_shade(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 2) {
guacenc_log(GUAC_LOG_DEBUG, "\"shade\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"shade\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_size(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 3) {
guacenc_log(GUAC_LOG_DEBUG, "\"size\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"size\" instruction incomplete");
return 1;
}

View File

@ -68,7 +68,7 @@ int guacenc_handle_sync(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 1) {
guacenc_log(GUAC_LOG_DEBUG, "\"sync\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"sync\" instruction incomplete");
return 1;
}

View File

@ -32,7 +32,7 @@ int guacenc_handle_transfer(guacenc_display* display, int argc, char** argv) {
/* Verify argument count */
if (argc < 9) {
guacenc_log(GUAC_LOG_DEBUG, "\"transform\" instruction incomplete");
guacenc_log(GUAC_LOG_WARNING, "\"transform\" instruction incomplete");
return 1;
}