summaryrefslogtreecommitdiff
path: root/cli-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli-main.c')
-rw-r--r--cli-main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cli-main.c b/cli-main.c
index 713cb09..aabbbcd 100644
--- a/cli-main.c
+++ b/cli-main.c
@@ -106,6 +106,7 @@ static void cli_dropbear_exit(int exitcode, const char* format, va_list param) {
/* Render the formatted exit message */
vsnprintf(exitmsg, sizeof(exitmsg), format, param);
+ TRACE(("Exited, cleaning up: %s", exitmsg))
/* Add the prefix depending on session/auth state */
if (!ses.init_done) {
@@ -130,6 +131,12 @@ static void cli_dropbear_log(int priority,
const char* format, va_list param) {
char printbuf[1024];
+ const char *name;
+
+ name = cli_opts.progname;
+ if (!name) {
+ name = "dbclient";
+ }
vsnprintf(printbuf, sizeof(printbuf), format, param);
@@ -139,7 +146,7 @@ static void cli_dropbear_log(int priority,
}
#endif
- fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf);
+ fprintf(stderr, "%s: %s\n", name, printbuf);
fflush(stderr);
}