changeset 1102:ae63de5caf81

Turn ChanSess's tty and term attributes into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 16:01:13 +0200
parents 94ff5316980f
children 303e27a78d2e
files chansession.h svr-chansession.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/chansession.h	Sat May 02 16:08:08 2015 +0200
+++ b/chansession.h	Sat May 02 16:01:13 2015 +0200
@@ -45,8 +45,8 @@
 	/* pty details */
 	int master; /* the master terminal fd*/
 	int slave;
-	unsigned char * tty;
-	unsigned char * term;
+	char * tty;
+	char * term;
 
 	/* exit details */
 	struct exitinfo exit;
--- a/svr-chansession.c	Sat May 02 16:08:08 2015 +0200
+++ b/svr-chansession.c	Sat May 02 16:01:13 2015 +0200
@@ -567,7 +567,7 @@
 		return DROPBEAR_FAILURE;
 	}
 
-	chansess->term = buf_getstring(ses.payload, &termlen);
+	chansess->term = (char *) buf_getstring(ses.payload, &termlen);
 	if (termlen > MAX_TERM_LEN) {
 		/* TODO send disconnect ? */
 		TRACE(("leave sessionpty: term len too long"))
@@ -583,7 +583,7 @@
 		return DROPBEAR_FAILURE;
 	}
 	
-	chansess->tty = (char*)m_strdup(namebuf);
+	chansess->tty = m_strdup(namebuf);
 	if (!chansess->tty) {
 		dropbear_exit("Out of memory"); /* TODO disconnect */
 	}