aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-09-02 13:58:37 +0300
committerAris Adamantiadis <aris@0xbadc0de.be>2011-09-02 13:58:37 +0300
commit20f8e73e3eaf8d7f69786db3f6385095e244e85c (patch)
tree1fba85badc6b95baceda20f4871735eac6a2404b /src/misc.c
parentef5701a5357e3f5b71aa5c387e4f976fe5df0ab7 (diff)
downloadlibssh-20f8e73e3eaf8d7f69786db3f6385095e244e85c.tar.gz
libssh-20f8e73e3eaf8d7f69786db3f6385095e244e85c.tar.xz
libssh-20f8e73e3eaf8d7f69786db3f6385095e244e85c.zip
Update libssh to ssh_handle_packets_termination
cherry-picked from 0cb5248 Should resolve all timeout problems Conflicts: src/auth.c src/channels.c
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/misc.c b/src/misc.c
index 7dadb230..bef85313 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -933,7 +933,7 @@ int ssh_timeout_elapsed(struct ssh_timestamp *ts, int timeout) {
struct ssh_timestamp now;
if(timeout < 0)
return 0; // -1 means infinite timeout
- if(timeout == 0)
+ if(timeout == SSH_TIMEOUT_NONBLOCKING)
return 1; // 0 means no timeout
ssh_timestamp_init(&now);
@@ -948,8 +948,7 @@ int ssh_timeout_elapsed(struct ssh_timestamp *ts, int timeout) {
* @param[in] ts pointer to an existing timestamp
* @param[in] timeout timeout in milliseconds. Negative values mean infinite
* timeout
- * @returns remaining time in milliseconds, 0 if elapsed, -1 if never,
- * -2 if option-set-timeout.
+ * @returns remaining time in milliseconds, 0 if elapsed, -1 if never.
*/
int ssh_timeout_update(struct ssh_timestamp *ts, int timeout){
struct ssh_timestamp now;