diff cli-session.c @ 325:0e4f225b7e07

Add -N "no remote command" dbclient option. Document -N in dbclient.1 and -P in dropbear.8
author Matt Johnston <matt@ucc.asn.au>
date Wed, 07 Jun 2006 15:01:20 +0000
parents 3be7ae2e8dfa
children d965110e3f5c
line wrap: on
line diff
--- a/cli-session.c	Wed Jun 07 14:48:35 2006 +0000
+++ b/cli-session.c	Wed Jun 07 15:01:20 2006 +0000
@@ -218,13 +218,15 @@
 #ifdef ENABLE_CLI_REMOTETCPFWD
 			setup_remotetcp();
 #endif
-			cli_send_chansess_request();
-			TRACE(("leave cli_sessionloop: cli_send_chansess_request"))
+			if (!cli_opts.no_cmd) {
+				cli_send_chansess_request();
+			}
+			TRACE(("leave cli_sessionloop: running"))
 			cli_ses.state = SESSION_RUNNING;
 			return;
 
 		case SESSION_RUNNING:
-			if (ses.chancount < 1) {
+			if (ses.chancount < 1 && !cli_opts.no_cmd) {
 				cli_finished();
 			}