[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

‘ssh_channel_read’ should honor the session timeout?


Hi again,

Current ‘ssh_channel_read’ always passes an infinite timeout.  What
about changing it along these lines?

diff --git a/src/channels.c b/src/channels.c
index 538956dd..48cf6f89 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -2618,7 +2618,7 @@ static int ssh_channel_read_termination(void *s){
  */
 int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_stderr)
 {
-    return ssh_channel_read_timeout(channel, dest, count, is_stderr, -1);
+    return ssh_channel_read_timeout(channel, dest, count, is_stderr, SSH_TIMEOUT_USER);
 }
 
 /**
Thanks,
Ludo’.

Follow-Ups:
Re: ‘ssh_channel_read’ should honor the session timeout?Andreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org