comparison cli-main.c @ 40:b4874d772210

- 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
author Matt Johnston <matt@ucc.asn.au>
date Sun, 01 Aug 2004 08:54:01 +0000
parents f789045062e6
children e3adf4cf5465
comparison
equal deleted inserted replaced
39:0883c0906870 40:b4874d772210
59 "connection to %s@%s:%s exited: %s", 59 "connection to %s@%s:%s exited: %s",
60 cli_opts.username, cli_opts.remotehost, 60 cli_opts.username, cli_opts.remotehost,
61 cli_opts.remoteport, format); 61 cli_opts.remoteport, format);
62 } 62 }
63 63
64 /* Do the cleanup first, since then the terminal will be reset */
65 cli_session_cleanup();
66 common_session_cleanup();
67
64 _dropbear_log(LOG_INFO, fmtbuf, param); 68 _dropbear_log(LOG_INFO, fmtbuf, param);
65 69
66 common_session_cleanup();
67 exit(exitcode); 70 exit(exitcode);
68 } 71 }
69 72
70 static void cli_dropbear_log(int priority, const char* format, va_list param) { 73 static void cli_dropbear_log(int priority, const char* format, va_list param) {
71 74
72 char printbuf[1024]; 75 char printbuf[1024];
73 76
74 vsnprintf(printbuf, sizeof(printbuf), format, param); 77 vsnprintf(printbuf, sizeof(printbuf), format, param);
75 78
76 fprintf(stderr, "Dropbear: %s\n", printbuf); 79 fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf);
77 80
78 } 81 }