@@ -1507,12 +1507,19 @@ client_simple_escape_filter(Channel *c, char *buf, int len)
15071507
15081508#ifdef WIN32_FIXME
15091509u_char * client_ansi_parser_filter (Channel * c , u_char * * buf , u_int * len ) {
1510- /* TODO - account fo error/extended stream*/
1510+ /* TODO - account for error/extended stream*/
1511+ char * respbuf = NULL ;
1512+ size_t resplen = 0 ;
1513+
1514+
15111515 if (c -> client_tty ) {
1512- telProcessNetwork (buffer_ptr (& c -> output ), buffer_len (& c -> output ));
1513- buffer_clear (& c -> output );
1514- buffer_append (& c -> output , " \b" , 2 );
1515- * buf = buffer_ptr (& c -> output );
1516+ if (telProcessNetwork (buffer_ptr (& c -> output ), buffer_len (& c -> output ), & respbuf , & resplen ) == 0 )
1517+ buffer_clear (& c -> output );
1518+ if (respbuf != NULL ) {
1519+ sshbuf_put (& c -> input , respbuf , resplen );
1520+ buffer_clear (& c -> output );
1521+ }
1522+ * buf = buffer_ptr (& c -> output );
15161523 * len = buffer_len (& c -> output );
15171524 return * buf ;
15181525 }
@@ -2603,7 +2610,7 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
26032610 tty_make_modes (-1 , tiop );
26042611
26052612#else
2606- packet_put_cstring (term != NULL ? term : "vt220 " );
2613+ packet_put_cstring (term != NULL ? term : "ansi " );
26072614 packet_put_int ((u_int ) ScreenX );
26082615 packet_put_int ((u_int ) ScrollBottom );
26092616 packet_put_int ((u_int ) 640 );
0 commit comments