summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-10-12 11:36:09 +1000
committerDamien Miller <djm@mindrot.org>2001-10-12 11:36:09 +1000
commit164a7f42f9f5c14c0d60f5d385d535f1a2fd5537 (patch)
tree7c369bbf5a5cd5821ca2d3177e470ea4c776d3f7
parent0585d51a52350409f63b687a02619a7617643309 (diff)
- markus@cvs.openbsd.org 2001/10/11 15:24:00
[clientloop.c] clear select masks if we return before calling select().
-rw-r--r--ChangeLog5
-rw-r--r--clientloop.c11
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c7832556..805290106 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
12 delay detach of session if a channel gets closed but the child is 12 delay detach of session if a channel gets closed but the child is
13 still alive. however, release pty, since the fd's to the child are 13 still alive. however, release pty, since the fd's to the child are
14 already closed. 14 already closed.
15 - markus@cvs.openbsd.org 2001/10/11 15:24:00
16 [clientloop.c]
17 clear select masks if we return before calling select().
15 18
1620011010 1920011010
17 - (djm) OpenBSD CVS Sync 20 - (djm) OpenBSD CVS Sync
@@ -6710,4 +6713,4 @@
6710 - Wrote replacements for strlcpy and mkdtemp 6713 - Wrote replacements for strlcpy and mkdtemp
6711 - Released 1.0pre1 6714 - Released 1.0pre1
6712 6715
6713$Id: ChangeLog,v 1.1602 2001/10/12 01:35:50 djm Exp $ 6716$Id: ChangeLog,v 1.1603 2001/10/12 01:36:09 djm Exp $
diff --git a/clientloop.c b/clientloop.c
index 43332d1f4..0e477bc79 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.83 2001/10/10 22:18:47 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.84 2001/10/11 15:24:00 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -343,9 +343,12 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
343 FD_SET(fileno(stderr), *writesetp); 343 FD_SET(fileno(stderr), *writesetp);
344 } else { 344 } else {
345 /* channel_prepare_select could have closed the last channel */ 345 /* channel_prepare_select could have closed the last channel */
346 if (session_closed && !channel_still_open()) { 346 if (session_closed && !channel_still_open() &&
347 if (!packet_have_data_to_write()) 347 !packet_have_data_to_write()) {
348 return; 348 /* clear mask since we did not call select() */
349 memset(*readsetp, 0, *maxfdp);
350 memset(*writesetp, 0, *maxfdp);
351 return;
349 } else { 352 } else {
350 FD_SET(connection_in, *readsetp); 353 FD_SET(connection_in, *readsetp);
351 } 354 }