GUACAMOLE-203: Change alive interval from int to unsigned.

This commit is contained in:
Nick Couchman 2017-06-14 10:17:28 -04:00
parent 193051dfd5
commit df718395e8
7 changed files with 11 additions and 11 deletions

View File

@ -977,7 +977,7 @@ void* guac_rdp_client_thread(void* data) {
/* Attempt SSH connection */ /* Attempt SSH connection */
rdp_client->sftp_session = rdp_client->sftp_session =
guac_common_ssh_create_session(client, settings->sftp_hostname, guac_common_ssh_create_session(client, settings->sftp_hostname,
settings->sftp_port, rdp_client->sftp_user, settings->sftp_keepalive); settings->sftp_port, rdp_client->sftp_user, settings->sftp_server_alive_interval);
/* Fail if SSH connection does not succeed */ /* Fail if SSH connection does not succeed */
if (rdp_client->sftp_session == NULL) { if (rdp_client->sftp_session == NULL) {

View File

@ -785,12 +785,12 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user,
IDX_SFTP_DIRECTORY, NULL); IDX_SFTP_DIRECTORY, NULL);
/* Default keepalive value */ /* Default keepalive value */
settings->sftp_keepalive = settings->sftp_server_alive_interval =
guac_user_parse_args_int(user, GUAC_RDP_CLIENT_ARGS, argv, guac_user_parse_args_int(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_SFTP_SERVER_ALIVE_INTERVAL, 0); IDX_SFTP_SERVER_ALIVE_INTERVAL, 0);
if (settings->sftp_keepalive == 1) if (settings->sftp_server_alive_interval == 1)
guac_user_log(user, GUAC_LOG_WARNING, "The minimum allowed " guac_user_log(user, GUAC_LOG_WARNING, "The minimum allowed "
"value for keepalives by libssh2 is 2 seconds."); "value for keepalives is 2 seconds.");
#endif #endif
/* Read recording path */ /* Read recording path */

View File

@ -366,7 +366,7 @@ typedef struct guac_rdp_settings {
* of 1 is automatically increased to 2 by libssh2 to avoid busy loop corner * of 1 is automatically increased to 2 by libssh2 to avoid busy loop corner
* cases. * cases.
*/ */
int sftp_keepalive; unsigned sftp_server_alive_interval;
#endif #endif
/** /**

View File

@ -189,7 +189,7 @@ typedef struct guac_ssh_settings {
/** /**
* The number of seconds between sending server alive messages. * The number of seconds between sending server alive messages.
*/ */
int server_alive_interval; unsigned server_alive_interval;
} guac_ssh_settings; } guac_ssh_settings;

View File

@ -406,12 +406,12 @@ guac_vnc_settings* guac_vnc_parse_args(guac_user* user,
IDX_SFTP_DIRECTORY, NULL); IDX_SFTP_DIRECTORY, NULL);
/* Default keepalive value */ /* Default keepalive value */
settings->sftp_keepalive = settings->sftp_server_alive_interval =
guac_user_parse_args_int(user, GUAC_VNC_CLIENT_ARGS, argv, guac_user_parse_args_int(user, GUAC_VNC_CLIENT_ARGS, argv,
IDX_SFTP_SERVER_ALIVE_INTERVAL, 0); IDX_SFTP_SERVER_ALIVE_INTERVAL, 0);
if (settings->sftp_keepalive == 1) if (settings->sftp_server_alive_interval == 1)
guac_user_log(user, GUAC_LOG_WARNING, "The minimum allowed " guac_user_log(user, GUAC_LOG_WARNING, "The minimum allowed "
"value for keepalives by libssh2 is 2 seconds."); "value for keepalives is 2 seconds.");
#endif #endif
/* Read recording path */ /* Read recording path */

View File

@ -180,7 +180,7 @@ typedef struct guac_vnc_settings {
* of 1 is automatically increased to 2 by libssh2 to avoid busy loop corner * of 1 is automatically increased to 2 by libssh2 to avoid busy loop corner
* cases. * cases.
*/ */
int sftp_keepalive; unsigned sftp_server_alive_interval;
#endif #endif
/** /**

View File

@ -261,7 +261,7 @@ void* guac_vnc_client_thread(void* data) {
/* Attempt SSH connection */ /* Attempt SSH connection */
vnc_client->sftp_session = vnc_client->sftp_session =
guac_common_ssh_create_session(client, settings->sftp_hostname, guac_common_ssh_create_session(client, settings->sftp_hostname,
settings->sftp_port, vnc_client->sftp_user, settings->sftp_keepalive); settings->sftp_port, vnc_client->sftp_user, settings->sftp_server_alive_interval);
/* Fail if SSH connection does not succeed */ /* Fail if SSH connection does not succeed */
if (vnc_client->sftp_session == NULL) { if (vnc_client->sftp_session == NULL) {