From d773103730da6c62e40a2d9962ce3f08d1d363e7 Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Tue, 25 Aug 2009 05:24:18 +0000
Subject: [PATCH] - Move netcat struct to where it stays in scope.

--HG--
extra : convert_revision : e35cd321b6d4fab6ad854827249f610da3bb6878
---
 cli-chansession.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/cli-chansession.c b/cli-chansession.c
index 2d97fea1..49b4e06a 100644
--- a/cli-chansession.c
+++ b/cli-chansession.c
@@ -381,20 +381,20 @@ static int cli_initchansess(struct Channel *channel) {
 
 #ifdef ENABLE_CLI_NETCAT
 
+const struct ChanType cli_chan_netcat = {
+	0, /* sepfds */
+	"direct-tcpip",
+	cli_init_stdpipe_sess, /* inithandler */
+	NULL,
+	NULL,
+	cli_closechansess
+};
+
 void cli_send_netcat_request() {
 
 	const unsigned char* source_host = "127.0.0.1";
 	const int source_port = 22;
 
-	const struct ChanType cli_chan_netcat = {
-		0, /* sepfds */
-		"direct-tcpip",
-		cli_init_stdpipe_sess, /* inithandler */
-		NULL,
-		NULL,
-		cli_closechansess
-	};
-
 	cli_opts.wantpty = 0;
 
 	if (send_msg_channel_open_init(STDIN_FILENO, &cli_chan_netcat) 
-- 
GitLab