GUACAMOLE-927: Abort RDP connection if FreeRDP fails to initialize.

This commit is contained in:
Michael Jumper 2020-01-17 15:30:36 -08:00
parent 39f7d5a843
commit 0676e70325

View File

@ -367,7 +367,14 @@ static int guac_rdp_handle_connection(guac_client* client) {
/* Allocate FreeRDP context */ /* Allocate FreeRDP context */
rdp_inst->ContextSize = sizeof(rdp_freerdp_context); rdp_inst->ContextSize = sizeof(rdp_freerdp_context);
freerdp_context_new(rdp_inst); if (!freerdp_context_new(rdp_inst)) {
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR,
"FreeRDP initialization failed before connecting. Please "
"check for errors earlier in the logs and/or enable "
"debug-level logging for guacd.");
return 1;
}
((rdp_freerdp_context*) rdp_inst->context)->client = client; ((rdp_freerdp_context*) rdp_inst->context)->client = client;
/* Load keymap into client */ /* Load keymap into client */