GUACAMOLE-203: Add option entries for ServerAliveInterval.

This commit is contained in:
Nick Couchman 2017-05-30 16:40:33 -04:00 committed by Nick Couchman
parent 9ee224f2ca
commit f42f05aab7
2 changed files with 17 additions and 0 deletions

View File

@ -51,6 +51,7 @@ const char* GUAC_SSH_CLIENT_ARGS[] = {
"recording-name", "recording-name",
"create-recording-path", "create-recording-path",
"read-only", "read-only",
"server-alive-interval",
NULL NULL
}; };
@ -165,6 +166,12 @@ enum SSH_ARGS_IDX {
*/ */
IDX_READ_ONLY, IDX_READ_ONLY,
/**
* Number of seconds between sending alive packets. A default of 0
* tells SSH not to send these packets.
*/
IDX_SERVER_ALIVE_INTERVAL,
SSH_ARGS_COUNT SSH_ARGS_COUNT
}; };
@ -279,6 +286,11 @@ guac_ssh_settings* guac_ssh_parse_args(guac_user* user,
guac_user_parse_args_boolean(user, GUAC_SSH_CLIENT_ARGS, argv, guac_user_parse_args_boolean(user, GUAC_SSH_CLIENT_ARGS, argv,
IDX_CREATE_RECORDING_PATH, false); IDX_CREATE_RECORDING_PATH, false);
/* Parse server alive interval */
settings->server_alive_interval =
guac_user_parse_args_int(user, GUAC_SSH_CLIENT_ARGS, argv,
IDX_SERVER_ALIVE_INTERVAL, 0);
/* Parsing was successful */ /* Parsing was successful */
return settings; return settings;

View File

@ -181,6 +181,11 @@ typedef struct guac_ssh_settings {
*/ */
bool create_recording_path; bool create_recording_path;
/**
* The number of seconds between sending server alive messages.
*/
int server_alive_interval;
} guac_ssh_settings; } guac_ssh_settings;
/** /**