File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -864,6 +864,25 @@ static int ssh_worker(thread_ctx_t* threadCtx)
864864 ChildRunning = 1 ;
865865#endif
866866
867+ #if defined(WOLFSSH_TERM ) && defined(WOLFSSH_SHELL )
868+ /* set initial size of terminal based on saved size */
869+ #if defined(HAVE_SYS_IOCTL_H )
870+ wolfSSH_DoModes (ssh -> modes , ssh -> modesSz , childFd );
871+ {
872+ struct winsize s = {0 };
873+
874+ s .ws_col = ssh -> widthChar ;
875+ s .ws_row = ssh -> heightRows ;
876+ s .ws_xpixel = ssh -> widthPixels ;
877+ s .ws_ypixel = ssh -> heightPixels ;
878+
879+ ioctl (childFd , TIOCSWINSZ , & s );
880+ }
881+ #endif /* HAVE_SYS_IOCTL_H */
882+
883+ wolfSSH_SetTerminalResizeCtx (ssh , (void * )& childFd );
884+ #endif /* WOLFSSH_TERM && WOLFSSH_SHELL */
885+
867886 while (ChildRunning ) {
868887 fd_set readFds ;
869888 WS_SOCKET_T maxFd ;
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c \
77 examples/echoserver/echoserver.h
88examples_echoserver_echoserver_LDADD = src/libwolfssh.la
99examples_echoserver_echoserver_DEPENDENCIES = src/libwolfssh.la
10- examples_echoserver_echoserver_CFLAGS = $(AM_CFLAGS)
10+ examples_echoserver_echoserver_CFLAGS = $(AM_CFLAGS) ${AM_CPPFLAGS}
1111endif
Original file line number Diff line number Diff line change 1818if BUILD_SFTP
1919tests_unit_test_CPPFLAGS += -DWOLFSSH_SFTP
2020endif
21+ if BUILD_TERM
22+ tests_unit_test_CPPFLAGS += -DWOLFSSH_TERM
23+ endif
2124if BUILD_SHELL
2225tests_unit_test_CPPFLAGS += -DWOLFSSH_SHELL
2326endif
4548if BUILD_SFTP
4649tests_api_test_CPPFLAGS += -DWOLFSSH_SFTP
4750endif
51+ if BUILD_TERM
52+ tests_api_test_CPPFLAGS += -DWOLFSSH_TERM
53+ endif
4854if BUILD_SHELL
4955tests_api_test_CPPFLAGS += -DWOLFSSH_SHELL
5056endif
7783if BUILD_SFTP
7884tests_testsuite_test_CPPFLAGS += -DWOLFSSH_SFTP
7985endif
86+ if BUILD_TERM
87+ tests_testsuite_test_CPPFLAGS += -DWOLFSSH_TERM
88+ endif
8089if BUILD_SHELL
8190tests_testsuite_test_CPPFLAGS += -DWOLFSSH_SHELL
8291endif
You can’t perform that action at this time.
0 commit comments