summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-05-17 03:19:40 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-05-17 03:19:40 +0000
commitc8b3f476765c2f24cb50462e397262028fc28a2e (patch)
tree2e1697610c8fd4669c3fb2247894ce67518fb869 /clientloop.c
parent06b08018ef12d8bdf86b0ad3c2508666b789df70 (diff)
- markus@cvs.openbsd.org 2001/05/16 21:53:53
[clientloop.c] check for open sessions before we call select(); fixes the x11 client bug reported by bowman@math.ualberta.ca
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c
index ba957fe47..cea6e77dc 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.70 2001/05/11 14:59:55 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.71 2001/05/16 21:53:53 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -346,7 +346,13 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
346 if (buffer_len(&stderr_buffer) > 0) 346 if (buffer_len(&stderr_buffer) > 0)
347 FD_SET(fileno(stderr), *writesetp); 347 FD_SET(fileno(stderr), *writesetp);
348 } else { 348 } else {
349 FD_SET(connection_in, *readsetp); 349 /* channel_prepare_select could have closed the last channel */
350 if (session_closed && !channel_still_open()) {
351 if (!packet_have_data_to_write())
352 return;
353 } else {
354 FD_SET(connection_in, *readsetp);
355 }
350 } 356 }
351 357
352 /* Select server connection if have data to write to the server. */ 358 /* Select server connection if have data to write to the server. */