changeset 754:2400b8685762

setup tcp after requesting a channel - might hide some DNS latency
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Apr 2013 07:51:13 +0800
parents d63ef1e211ea
children b2d4205b0897
files cli-session.c debug.h
diffstat 2 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/cli-session.c	Thu Apr 04 00:18:50 2013 +0800
+++ b/cli-session.c	Thu Apr 04 07:51:13 2013 +0800
@@ -266,13 +266,6 @@
 				}
 			}
 			
-#ifdef ENABLE_CLI_LOCALTCPFWD
-			setup_localtcp();
-#endif
-#ifdef ENABLE_CLI_REMOTETCPFWD
-			setup_remotetcp();
-#endif
-
 #ifdef ENABLE_CLI_NETCAT
 			if (cli_opts.netcat_host) {
 				cli_send_netcat_request();
@@ -281,6 +274,14 @@
 			if (!cli_opts.no_cmd) {
 				cli_send_chansess_request();
 			}
+
+#ifdef ENABLE_CLI_LOCALTCPFWD
+			setup_localtcp();
+#endif
+#ifdef ENABLE_CLI_REMOTETCPFWD
+			setup_remotetcp();
+#endif
+
 			TRACE(("leave cli_sessionloop: running"))
 			cli_ses.state = SESSION_RUNNING;
 			return;
--- a/debug.h	Thu Apr 04 00:18:50 2013 +0800
+++ b/debug.h	Thu Apr 04 07:51:13 2013 +0800
@@ -39,7 +39,7 @@
  * Caution: Don't use this in an unfriendly environment (ie unfirewalled),
  * since the printing may not sanitise strings etc. This will add a reasonable
  * amount to your executable size. */
-/* #define DEBUG_TRACE */
+#define DEBUG_TRACE
 
 /* All functions writing to the cleartext payload buffer call
  * CHECKCLEARTOWRITE() before writing. This is only really useful if you're