GUACAMOLE-1047: Remove unnecessary use of snprintf() in favor of guacd_log().

This commit is contained in:
Michael Jumper 2021-12-18 15:13:10 -08:00
parent a8cf250c98
commit daa052398e

View File

@ -280,13 +280,8 @@ static int guacd_route_connection(guacd_proc_map* map, guac_socket* socket) {
/* Warn and ward off client if requested connection does not exist */ /* Warn and ward off client if requested connection does not exist */
if (proc == NULL) { if (proc == NULL) {
char message[2048]; guacd_log(GUAC_LOG_INFO, "Connection \"%s\" does not exist", identifier);
guac_protocol_send_error(socket, "No such connection.",
snprintf(message, sizeof(message),
"Connection \"%s\" does not exist", identifier);
guacd_log(GUAC_LOG_INFO, message);
guac_protocol_send_error(socket, message,
GUAC_PROTOCOL_STATUS_RESOURCE_NOT_FOUND); GUAC_PROTOCOL_STATUS_RESOURCE_NOT_FOUND);
} }