зеркало из https://github.com/github/putty.git
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:
Родитель
5347f9e69c
Коммит
6da1a325cc
14
ssh.c
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче