GUACAMOLE-482: Fail overall encoding process if any instruction handler reports failure.

This commit is contained in:
Michael Jumper 2018-02-06 21:19:24 -08:00
parent b0c14bd59f
commit 19b5050fbf

View File

@ -63,8 +63,11 @@ static int guacenc_read_instructions(guacenc_display* display,
/* Continuously read and handle all instructions */ /* Continuously read and handle all instructions */
while (!guac_parser_read(parser, socket, -1)) { while (!guac_parser_read(parser, socket, -1)) {
guacenc_handle_instruction(display, parser->opcode, if (guacenc_handle_instruction(display, parser->opcode,
parser->argc, parser->argv); parser->argc, parser->argv)) {
guac_parser_free(parser);
return 1;
}
} }
/* Fail on read/parse error */ /* Fail on read/parse error */