Commit ce6d50b99420a4e0994cf9be285a92eb8c4bac0e

Brad Morgan 2013-05-09T17:37:42

Changed to use libssh2_channel_exec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 31625cb..f11b5fb 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -79,12 +79,9 @@ static int send_command(ssh_stream *s)
 	if (error < 0)
 		goto cleanup;
 	
-	error = libssh2_channel_process_startup(
-		s->channel, 
-		"exec", 
-		(uint32_t)sizeof("exec") - 1, 
-		request.ptr,
-		request.size
+	error = libssh2_channel_exec(
+		s->channel,
+		request.ptr
 	);
 
 	if (0 != error)