Skip to content

Commit 9b4823c

Browse files
committed
Fix Test Term Size
When running the build tests, the terminal size gets set to 0x0. When then tests finish, things like vim start to misbehave until you change your term window size. This stops changing the terminal size when the echoserver is run in echo mode.
1 parent fa648ec commit 9b4823c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/echoserver/echoserver.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,12 @@ static int ssh_worker(thread_ctx_t* threadCtx)
863863
#endif
864864

865865
#if defined(WOLFSSH_TERM) && defined(WOLFSSH_SHELL)
866-
/* set initial size of terminal based on saved size */
866+
/* if not echoing, set initial size of terminal based on saved size */
867867
#if defined(HAVE_SYS_IOCTL_H)
868-
wolfSSH_DoModes(ssh->modes, ssh->modesSz, childFd);
869-
{
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;

0 commit comments

Comments
 (0)