diff cli-chansession.c @ 801:7dcb46da72d9 ecc

merge in HEAD
author Matt Johnston <matt@ucc.asn.au>
date Tue, 21 May 2013 12:09:35 +0800
parents ac2158e3e403 b2d4205b0897
children 4095b6d7c9fc
line wrap: on
line diff
--- a/cli-chansession.c	Thu May 09 23:27:23 2013 +0800
+++ b/cli-chansession.c	Tue May 21 12:09:35 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,