From fad3c4ffc625d0d6ef073428e11492a889fe154a Mon Sep 17 00:00:00 2001 From: quamrulmina Date: Fri, 30 Oct 2015 19:36:19 -0500 Subject: [PATCH] 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. --- channels.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/channels.c b/channels.c index b30e92a..c1b5c12 100644 --- a/channels.c +++ b/channels.c @@ -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; }