summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-07-17 21:04:56 +0000
committermarkus <markus@openbsd.org>2001-07-17 21:04:56 +0000
commitcee7fc8e6063aceabcfa833981882a2124ee0f25 (patch)
tree0bc0838b13fe8eaeeda9a490232e05dc0dc884f2 /usr.bin/ssh/clientloop.c
parentnow you can display and set acls (diff)
downloadwireguard-openbsd-cee7fc8e6063aceabcfa833981882a2124ee0f25.tar.xz
wireguard-openbsd-cee7fc8e6063aceabcfa833981882a2124ee0f25.zip
keep track of both maxfd and the size of the malloc'ed fdsets.
update maxfd if maxfd gets closed.
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 83b2d4d8e3a..41aff8354e9 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -59,7 +59,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.80 2001/06/30 18:08:40 stevesk Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.81 2001/07/17 21:04:57 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -318,10 +318,10 @@ client_check_window_change(void)
static void
client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
- int *maxfdp, int rekeying)
+ int *maxfdp, int *nallocp, int rekeying)
{
/* Add any selections by the channel mechanism. */
- channel_prepare_select(readsetp, writesetp, maxfdp, rekeying);
+ channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying);
if (!compat20) {
/* Read from the connection, unless our buffers are full. */
@@ -770,7 +770,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
{
fd_set *readset = NULL, *writeset = NULL;
double start_time, total_time;
- int max_fd = 0, len, rekeying = 0;
+ int max_fd = 0, max_fd2 = 0, len, rekeying = 0, nalloc = 0;
char buf[100];
debug("Entering interactive session.");
@@ -877,8 +877,9 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
* Wait until we have something to do (something becomes
* available on one of the descriptors).
*/
+ max_fd2 = max_fd;
client_wait_until_can_do_something(&readset, &writeset,
- &max_fd, rekeying);
+ &max_fd2, &nalloc, rekeying);
if (quit_pending)
break;