File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -862,24 +862,24 @@ static int ssh_worker(thread_ctx_t* threadCtx)
862862 ChildRunning = 1 ;
863863#endif
864864
865- #if defined(WOLFSSH_TERM ) && defined(WOLFSSH_SHELL )
866- /* set initial size of terminal based on saved size */
865+ #if !defined(NO_TERMIOS ) && defined(WOLFSSH_TERM ) && defined(WOLFSSH_SHELL )
867866#if defined(HAVE_SYS_IOCTL_H )
868- wolfSSH_DoModes ( ssh -> modes , ssh -> modesSz , childFd );
869- {
867+ /* if not echoing, set initial size of terminal based on saved size */
868+ if (! threadCtx -> echo ) {
870869 struct winsize s = {0 ,0 ,0 ,0 };
871870
871+ wolfSSH_DoModes (ssh -> modes , ssh -> modesSz , childFd );
872872 s .ws_col = ssh -> widthChar ;
873873 s .ws_row = ssh -> heightRows ;
874874 s .ws_xpixel = ssh -> widthPixels ;
875875 s .ws_ypixel = ssh -> heightPixels ;
876876
877877 ioctl (childFd , TIOCSWINSZ , & s );
878- }
879- #endif /* HAVE_SYS_IOCTL_H */
880878
881879 wolfSSH_SetTerminalResizeCtx (ssh , (void * )& childFd );
882- #endif /* WOLFSSH_TERM && WOLFSSH_SHELL */
880+ }
881+ #endif /* HAVE_SYS_IOCTL_H */
882+ #endif /* !NO_TERMIOS && WOLFSSH_TERM && WOLFSSH_SHELL */
883883
884884 while (ChildRunning ) {
885885 fd_set readFds ;
You can’t perform that action at this time.
0 commit comments