From 471b10f6b547bb9b6088c8b079360ad91aaf8510 Mon Sep 17 00:00:00 2001 From: Håkon Nessjøen Date: Fri, 1 Oct 2010 09:34:16 +0200 Subject: Header-cleanup and get terminal type from ENV --- devices.c | 1 + main.c | 3 +-- udp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devices.c b/devices.c index 70daabe..c380ead 100644 --- a/devices.c +++ b/devices.c @@ -16,6 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include #include #include diff --git a/main.c b/main.c index fade8c1..f8125f5 100644 --- a/main.c +++ b/main.c @@ -56,7 +56,7 @@ unsigned char password[255]; void sendAuthData(unsigned char *username, unsigned char *password) { unsigned char data[1500]; - unsigned char *terminal = "linux"; + unsigned char *terminal = getenv("TERM"); int userLen = strlen(username); int terminalLen = strlen(terminal); unsigned short width = 0; @@ -100,7 +100,6 @@ void sig_winch(int sig) { void handlePacket(unsigned char *data, int data_len) { struct mt_mactelnet_hdr pkthdr; - struct mt_mactelnet_control_hdr cpkthdr; parsePacket(data, &pkthdr); if (DEBUG) diff --git a/udp.c b/udp.c index 3b55d17..2bed39a 100644 --- a/udp.c +++ b/udp.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3