diff cli-chansession.c @ 769:b2d4205b0897

reset terminal modes before printing a message
author Matt Johnston <matt@ucc.asn.au>
date Wed, 10 Apr 2013 21:32:44 +0800
parents 4a274f47eabd
children 7dcb46da72d9 84e4259dae3e
line wrap: on
line diff
--- a/cli-chansession.c	Thu Apr 04 07:51:13 2013 +0800
+++ b/cli-chansession.c	Wed Apr 10 21:32:44 2013 +0800
@@ -82,14 +82,12 @@
 
 /* If the main session goes, we close it up */
 static void cli_closechansess(struct Channel *UNUSED(channel)) {
+	cli_tty_cleanup(); /* Restore tty modes etc */
 
 	/* This channel hasn't gone yet, so we have > 1 */
 	if (ses.chancount > 1) {
 		dropbear_log(LOG_INFO, "Waiting for other channels to close...");
 	}
-
-	cli_tty_cleanup(); /* Restore tty modes etc */
-
 }
 
 void cli_start_send_channel_request(struct Channel *channel,