You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2017/06/25 19:02:32 UTC
[18/21] incubator-guacamole-server git commit: GUACAMOLE-203: Change
remaining instances of timer to timeout.
GUACAMOLE-203: Change remaining instances of timer to timeout.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/041fcc46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/041fcc46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/041fcc46
Branch: refs/heads/master
Commit: 041fcc4651613a383e4d208e603486072ed81594
Parents: 711cdd6
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Jun 25 05:13:22 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Jun 25 05:13:22 2017 -0400
----------------------------------------------------------------------
src/protocols/ssh/ssh.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/041fcc46/src/protocols/ssh/ssh.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index afbfe33..aa9fdae 100644
--- a/src/protocols/ssh/ssh.c
+++ b/src/protocols/ssh/ssh.c
@@ -323,8 +323,8 @@ void* ssh_client_thread(void* data) {
/* Track total amount of data read */
int total_read = 0;
- /* Timer for polling socket activity */
- int timer;
+ /* Timeout for polling socket activity */
+ int timeout;
pthread_mutex_lock(&(ssh_client->term_channel_lock));
@@ -336,14 +336,14 @@ void* ssh_client_thread(void* data) {
/* Send keepalive at configured interval */
if (settings->server_alive_interval > 0) {
- int timeout = 0;
+ timeout = 0;
if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0)
break;
- timer = timeout * 1000;
+ timeout *= 1000;
}
/* If keepalive is not configured, sleep for the default of 1 second */
else
- timer = GUAC_SSH_DEFAULT_POLL_TIMEOUT;
+ timeout = GUAC_SSH_DEFAULT_POLL_TIMEOUT;
/* Read terminal data */
bytes_read = libssh2_channel_read(ssh_client->term_channel,
@@ -384,8 +384,8 @@ void* ssh_client_thread(void* data) {
.revents = 0,
}};
- /* Wait up to computed timer */
- if (poll(fds, 1, timer) < 0)
+ /* Wait up to computed timeout */
+ if (poll(fds, 1, timeout) < 0)
break;
}