summaryrefslogtreecommitdiffhomepage
path: root/cli-main.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-08-01 08:54:01 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-08-01 08:54:01 +0000
commit051b7454f80a52d2b0bea2e34562949a3bc70fe4 (patch)
tree4414c89d8e9ffc08d15721d3d02756b6f0dcdd83 /cli-main.c
parentcb071834dab43b2edf6112a9918714691f27f3de (diff)
- Added terminal mode handling etc for the client, and window change
- Refactored the terminal-mode handling for the server - Improved session closing for the client --HG-- extra : convert_revision : 9d19b4f22c39798af5f3f24c2022f8caec4919e8
Diffstat (limited to 'cli-main.c')
-rw-r--r--cli-main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cli-main.c b/cli-main.c
index c5d5b3e..106cc64 100644
--- a/cli-main.c
+++ b/cli-main.c
@@ -61,9 +61,12 @@ static void cli_dropbear_exit(int exitcode, const char* format, va_list param) {
cli_opts.remoteport, format);
}
+ /* Do the cleanup first, since then the terminal will be reset */
+ cli_session_cleanup();
+ common_session_cleanup();
+
_dropbear_log(LOG_INFO, fmtbuf, param);
- common_session_cleanup();
exit(exitcode);
}
@@ -73,6 +76,6 @@ static void cli_dropbear_log(int priority, const char* format, va_list param) {
vsnprintf(printbuf, sizeof(printbuf), format, param);
- fprintf(stderr, "Dropbear: %s\n", printbuf);
+ fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf);
}