Make local_terminal a member variable

This commit is contained in:
Keith Winstein
2011-09-30 13:32:09 -04:00
parent e817d05b22
commit 3bc3b6f6e1
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -20,6 +20,7 @@ private:
int winch_fd, shutdown_signal_fd;
struct winsize window_size;
Terminal::Complete *local_terminal;
Network::Transport< Network::UserStream, Terminal::Complete > *network;
uint64_t last_remote_num;
@@ -34,6 +35,7 @@ public:
saved_termios(), raw_termios(),
winch_fd(), shutdown_signal_fd(),
window_size(),
local_terminal( NULL ),
network( NULL ),
last_remote_num( -1 )
{}
@@ -44,6 +46,10 @@ public:
~STMClient()
{
if ( local_terminal != NULL ) {
delete local_terminal;
}
if ( network != NULL ) {
delete network;
}