changeset 1112:5eb00b6b9040

Turn ChanSess's cmd attribute into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 23:28:28 +0200
parents 848dac90c923
children 367d3800555b
files chansession.h svr-chansession.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/chansession.h	Sat May 02 23:24:23 2015 +0200
+++ b/chansession.h	Sat May 02 23:28:28 2015 +0200
@@ -39,7 +39,7 @@
 
 struct ChanSess {
 
-	unsigned char * cmd; /* command to exec */
+	char * cmd; /* command to exec */
 	pid_t pid; /* child process pid */
 
 	/* pty details */
--- a/svr-chansession.c	Sat May 02 23:24:23 2015 +0200
+++ b/svr-chansession.c	Sat May 02 23:28:28 2015 +0200
@@ -649,7 +649,7 @@
 	if (iscmd) {
 		/* "exec" */
 		if (chansess->cmd == NULL) {
-			chansess->cmd = buf_getstring(ses.payload, &cmdlen);
+			chansess->cmd = (char *) buf_getstring(ses.payload, &cmdlen);
 
 			if (cmdlen > MAX_CMD_LEN) {
 				m_free(chansess->cmd);