[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ssh_select possible improvement? SOLVED, patch attached.
[Thread Prev] | [Thread Next]
- Subject: Re: ssh_select possible improvement? SOLVED, patch attached.
- From: Vic Lee <llyzs@xxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 21 Sep 2010 00:37:57 +0800
- To: libssh@xxxxxxxxxx
Hi Andreas, This is a really trivial fix and a tiny patch. Please review. Do you have a plan for 0.4.7 already? If so, I will fire a bug to Squeeze and ask them to upgrade. Thanks, Vic
From e0db48d2c5142f42499513a04cd6d01ba2ede875 Mon Sep 17 00:00:00 2001 From: Vic Lee <llyzs@xxxxxxx> Date: Tue, 21 Sep 2010 00:32:08 +0800 Subject: [PATCH] socket.c: fix a trivial mistake setting max_fd that breaks ssh_select() function Signed-off-by: Vic Lee <llyzs@xxxxxxx> --- libssh/socket.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libssh/socket.c b/libssh/socket.c index 516639c..e956092 100644 --- a/libssh/socket.c +++ b/libssh/socket.c @@ -265,7 +265,7 @@ void ssh_socket_fd_set(struct socket *s, fd_set *set, socket_t *max_fd) { if (s->fd == SSH_INVALID_SOCKET) return; FD_SET(s->fd,set); - if (s->fd >= 0 && s->fd != SSH_INVALID_SOCKET) { + if (s->fd >= *max_fd && s->fd != SSH_INVALID_SOCKET) { *max_fd = s->fd + 1; } } -- 1.7.1
Re: ssh_select possible improvement? SOLVED, patch attached. | Andreas Schneider <asn@xxxxxxxxxxxx> |
ssh_select possible improvement? | Vic Lee <llyzs@xxxxxxx> |
Re: ssh_select possible improvement? | Andreas Schneider <asn@xxxxxxxxxxxx> |
Re: ssh_select possible improvement? | Vic Lee <llyzs@xxxxxxx> |
Re: ssh_select possible improvement? | Vic Lee <llyzs@xxxxxxx> |