diff options
author | Colin Watson <cjwatson@debian.org> | 2012-09-06 23:20:10 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2012-09-06 23:20:10 +0100 |
commit | c6a2c0334e45419875687d250aed9bea78480f2e (patch) | |
tree | d8f01bef9f3921fa1ca7592a19474be9c8349f76 /clientloop.c | |
parent | dd5ed53e20d218607260916a6b04d1c8c5b3d88f (diff) | |
parent | 8b13b5bdc4f19bd52ee673104d66b71c21153b96 (diff) |
merge 6.1p1
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c index 75daea816..7bb63c73b 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.238 2012/01/18 21:46:43 dtucker Exp $ */ | 1 | /* $OpenBSD: clientloop.c,v 1.240 2012/06/20 04:42:58 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -587,10 +587,12 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, | |||
587 | { | 587 | { |
588 | struct timeval tv, *tvp; | 588 | struct timeval tv, *tvp; |
589 | int timeout_secs; | 589 | int timeout_secs; |
590 | time_t minwait_secs = 0; | ||
590 | int ret; | 591 | int ret; |
591 | 592 | ||
592 | /* Add any selections by the channel mechanism. */ | 593 | /* Add any selections by the channel mechanism. */ |
593 | channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying); | 594 | channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, |
595 | &minwait_secs, rekeying); | ||
594 | 596 | ||
595 | if (!compat20) { | 597 | if (!compat20) { |
596 | /* Read from the connection, unless our buffers are full. */ | 598 | /* Read from the connection, unless our buffers are full. */ |
@@ -643,6 +645,8 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, | |||
643 | if (timeout_secs < 0) | 645 | if (timeout_secs < 0) |
644 | timeout_secs = 0; | 646 | timeout_secs = 0; |
645 | } | 647 | } |
648 | if (minwait_secs != 0) | ||
649 | timeout_secs = MIN(timeout_secs, (int)minwait_secs); | ||
646 | if (timeout_secs == INT_MAX) | 650 | if (timeout_secs == INT_MAX) |
647 | tvp = NULL; | 651 | tvp = NULL; |
648 | else { | 652 | else { |