Simplifiy handling of stdin data in SSH-2.

Specifically, don't try to unblock all channels just because we've got
something to send on the main one.  It looks like the code to do that
was left over from when SSH_MSG_CHANNEL_ADJUST was handled in
do_ssh2_authconn().
This commit is contained in:
Ben Harris 2016-04-23 13:10:11 +01:00
Родитель 5347f9e69c
Коммит 6da1a325cc
1 изменённых файлов: 1 добавлений и 13 удалений

14
ssh.c
Просмотреть файл

@ -9188,7 +9188,6 @@ static void do_ssh2_authconn(Ssh ssh, const unsigned char *in, int inlen,
int pklen, alglen, commentlen; int pklen, alglen, commentlen;
int siglen, retlen, len; int siglen, retlen, len;
char *q, *agentreq, *ret; char *q, *agentreq, *ret;
int try_send;
struct Packet *pktout; struct Packet *pktout;
Filename *keyfile; Filename *keyfile;
#ifndef NO_GSSAPI #ifndef NO_GSSAPI
@ -10841,7 +10840,6 @@ static void do_ssh2_authconn(Ssh ssh, const unsigned char *in, int inlen,
ssh->send_ok = 1; ssh->send_ok = 1;
while (1) { while (1) {
crReturnV; crReturnV;
s->try_send = FALSE;
if (pktin) { if (pktin) {
/* /*
@ -10857,17 +10855,7 @@ static void do_ssh2_authconn(Ssh ssh, const unsigned char *in, int inlen,
* We have spare data. Add it to the channel buffer. * We have spare data. Add it to the channel buffer.
*/ */
ssh2_add_channel_data(ssh->mainchan, (char *)in, inlen); ssh2_add_channel_data(ssh->mainchan, (char *)in, inlen);
s->try_send = TRUE; ssh2_try_send(ssh->mainchan);
}
if (s->try_send) {
int i;
struct ssh_channel *c;
/*
* Try to send data on all channels if we can.
*/
for (i = 0; NULL != (c = index234(ssh->channels, i)); i++)
if (c->type != CHAN_SHARING)
ssh2_try_send_and_unthrottle(ssh, c);
} }
} }