Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/guacamole-server/pull/156#discussion_r178614574
  
    --- Diff: src/protocols/ssh/ssh.c ---
    @@ -296,9 +299,17 @@ void* ssh_client_thread(void* data) {
     
         }
     
    +    /* Set up the ttymode array prior to requesting the PTY */
    +    int ttymodeBytes = guac_ssh_ttymodes_init(ssh_ttymodes,
    +            GUAC_SSH_TTY_OP_VERASE, settings->backspace, 
GUAC_SSH_TTY_OP_END);
    +    if (ttymodeBytes < 1)
    +        guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR, 
"Error storing TTY mode encoding \
    --- End diff --
    
    This will actually log:
    
        Error storing TTY mode encoding                 opcodes and values in 
array.
    
    as the whitespace at the beginning of the following line is part of the 
string.
    
    To split strings in C, all you need to do is place two strings next to each 
other. They're automatically concatenated by the compiler:
    
        guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR, "Error 
storing TTY mode encoding "
                "opcodes and values in array.");
    
    As this message is meant for the user/admin, I suggest rephrasing to 
describe things from that perspective. For example:
    
        Unable to set TTY modes. Backspace may not work as expected.
    
    at the warning level may make more sense.


---

Reply via email to