[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
‘ssh_channel_read’ should honor the session timeout?
[Thread Prev] | [Thread Next]
- Subject: ‘ssh_channel_read’ should honor the session timeout?
- From: Ludovic Courtès <ludo@xxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 10 Jan 2019 18:12:45 +0100
- To: libssh@xxxxxxxxxx
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’.
| Re: ‘ssh_channel_read’ should honor the session timeout? | Andreas Schneider <asn@xxxxxxxxxxxxxx> |