summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2009-08-25 05:24:18 +0000
committerMatt Johnston <matt@ucc.asn.au>2009-08-25 05:24:18 +0000
commitd773103730da6c62e40a2d9962ce3f08d1d363e7 (patch)
tree8de25ca3ecbc409b511194dfa478b054b678426a
parent2f1ed9a34b6b5ba611d033966ca7b067ee06c574 (diff)
- Move netcat struct to where it stays in scope.
--HG-- extra : convert_revision : e35cd321b6d4fab6ad854827249f610da3bb6878
-rw-r--r--cli-chansession.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli-chansession.c b/cli-chansession.c
index 2d97fea..49b4e06 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)