version 1.238, 2012/01/18 21:46:43 |
version 1.239, 2012/04/11 13:16:19 |
|
|
{ |
{ |
struct timeval tv, *tvp; |
struct timeval tv, *tvp; |
int timeout_secs; |
int timeout_secs; |
|
time_t minwait_secs; |
int ret; |
int ret; |
|
|
/* Add any selections by the channel mechanism. */ |
/* Add any selections by the channel mechanism. */ |
channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying); |
channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, |
|
&minwait_secs, rekeying); |
|
|
if (!compat20) { |
if (!compat20) { |
/* Read from the connection, unless our buffers are full. */ |
/* Read from the connection, unless our buffers are full. */ |
|
|
if (timeout_secs < 0) |
if (timeout_secs < 0) |
timeout_secs = 0; |
timeout_secs = 0; |
} |
} |
|
if (minwait_secs != 0) |
|
timeout_secs = MIN(timeout_secs, (int)minwait_secs); |
if (timeout_secs == INT_MAX) |
if (timeout_secs == INT_MAX) |
tvp = NULL; |
tvp = NULL; |
else { |
else { |