diff options
author | Damien Miller <djm@mindrot.org> | 2001-10-12 11:36:09 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-10-12 11:36:09 +1000 |
commit | 164a7f42f9f5c14c0d60f5d385d535f1a2fd5537 (patch) | |
tree | 7c369bbf5a5cd5821ca2d3177e470ea4c776d3f7 /clientloop.c | |
parent | 0585d51a52350409f63b687a02619a7617643309 (diff) | |
download | openssh-git-164a7f42f9f5c14c0d60f5d385d535f1a2fd5537.tar.gz |
- markus@cvs.openbsd.org 2001/10/11 15:24:00
[clientloop.c]
clear select masks if we return before calling select().
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clientloop.c b/clientloop.c index 43332d1f..0e477bc7 100644 --- a/clientloop.c +++ b/clientloop.c @@ -59,7 +59,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: clientloop.c,v 1.83 2001/10/10 22:18:47 markus Exp $"); +RCSID("$OpenBSD: clientloop.c,v 1.84 2001/10/11 15:24:00 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -343,9 +343,12 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, FD_SET(fileno(stderr), *writesetp); } else { /* channel_prepare_select could have closed the last channel */ - if (session_closed && !channel_still_open()) { - if (!packet_have_data_to_write()) - return; + if (session_closed && !channel_still_open() && + !packet_have_data_to_write()) { + /* clear mask since we did not call select() */ + memset(*readsetp, 0, *maxfdp); + memset(*writesetp, 0, *maxfdp); + return; } else { FD_SET(connection_in, *readsetp); } |