GUACAMOLE-422: Merge explicit handling of "nop" instruction.

This commit is contained in:
Mike Jumper 2019-07-26 14:37:54 -07:00 committed by GitHub
commit c26672e281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -51,6 +51,7 @@ __guac_instruction_handler_mapping __guac_instruction_handler_map[] = {
{"put", __guac_handle_put}, {"put", __guac_handle_put},
{"audio", __guac_handle_audio}, {"audio", __guac_handle_audio},
{"argv", __guac_handle_argv}, {"argv", __guac_handle_argv},
{"nop", __guac_handle_nop},
{NULL, NULL} {NULL, NULL}
}; };
@ -588,6 +589,12 @@ int __guac_handle_put(guac_user* user, int argc, char** argv) {
return 0; return 0;
} }
int __guac_handle_nop(guac_user* user, int argc, char** argv) {
guac_user_log(user, GUAC_LOG_TRACE,
"Received nop instruction");
return 0;
}
int __guac_handle_disconnect(guac_user* user, int argc, char** argv) { int __guac_handle_disconnect(guac_user* user, int argc, char** argv) {
guac_user_stop(user); guac_user_stop(user);
return 0; return 0;

View File

@ -177,6 +177,13 @@ __guac_instruction_handler __guac_handle_size;
*/ */
__guac_instruction_handler __guac_handle_disconnect; __guac_instruction_handler __guac_handle_disconnect;
/**
* Internal handler for the nop instruction. This handler will be called when
* the nop instruction is received, and will do nothing more than a TRACE level
* log of the instruction.
*/
__guac_instruction_handler __guac_handle_nop;
/** /**
* Internal handler function that is called when the size instruction is * Internal handler function that is called when the size instruction is
* received during the handshake process. * received during the handshake process.