From b823192f0301e4c030b740b3a6204d254f49a590 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 24 May 2013 22:54:56 -0700 Subject: [PATCH] Ignore unhandled control codes. Implement ENQ. --- protocols/ssh/src/terminal_handlers.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/protocols/ssh/src/terminal_handlers.c b/protocols/ssh/src/terminal_handlers.c index 3b320135..89b06bd8 100644 --- a/protocols/ssh/src/terminal_handlers.c +++ b/protocols/ssh/src/terminal_handlers.c @@ -97,6 +97,11 @@ int guac_terminal_echo(guac_terminal* term, char c) { switch (codepoint) { + /* Enquiry */ + case 0x05: + guac_terminal_write_all(term->stdin_pipe_fd[1], "GUACAMOLE", 9); + break; + /* Bell */ case 0x07: break; @@ -159,6 +164,10 @@ int guac_terminal_echo(guac_terminal* term, char c) { /* Displayable chars */ default: + /* Don't bother handling control chars if unknown */ + if (codepoint < 0x20) + break; + /* Translate mappable codepoints to whatever codepoint is mapped */ if (codepoint >= 0x20 && codepoint <= 0xFF && char_mapping != NULL) codepoint = char_mapping[codepoint - 0x20];