Fixed ssh client problem of showing error outputs correctly

Problem was error data received were shown after output data. But order
should be kept to how it is received from the sshd server. Now we show
error and output data in the way we received from the sshd sever. Thus
typing "di" in place of "dir" in cmd shell will show the error message
correctly before the next shell prompt comes through.
This commit is contained in:
quamrulmina 2015-10-30 19:36:19 -05:00
parent bc6871e862
commit fad3c4ffc6
1 changed files with 7 additions and 0 deletions

View File

@ -2532,7 +2532,14 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
}
debug2("channel %d: rcvd ext data %d", c->self, data_len);
c->local_window -= data_len;
#ifndef WIN32_FIXME
buffer_append(&c->extended, data, data_len);
#else
if ( c->client_tty )
telProcessNetwork ( data, data_len ); // run it by ANSI engine if it is the ssh client
else
buffer_append(&c->extended, data, data_len);
#endif
free(data);
return 0;
}