X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/d9c40fd6ed72588278c633ee5db5c2eefad6ba7c..39016687b03e6a1ffdf319f51871506de3da1e50:/unix/uxcons.c diff --git a/unix/uxcons.c b/unix/uxcons.c index 197466ea..2375a63e 100644 --- a/unix/uxcons.c +++ b/unix/uxcons.c @@ -25,10 +25,7 @@ void cleanup_exit(int code) * Clean up. */ sk_cleanup(); - - if (cfg.protocol == PROT_SSH) - random_save_seed(); - + random_save_seed(); exit(code); } @@ -187,7 +184,7 @@ void askcipher(void *frontend, char *ciphername, int cs) * Ask whether to wipe a session log file before writing to it. * Returns 2 for wipe, 1 for append, 0 for cancel (don't log). */ -int askappend(void *frontend, char *filename) +int askappend(void *frontend, Filename filename) { static const char msgtemplate[] = "The session log file \"%.*s\" already exists.\n" @@ -204,15 +201,12 @@ int askappend(void *frontend, char *filename) char line[32]; - if (cfg.logxfovr != LGXF_ASK) { - return ((cfg.logxfovr == LGXF_OVR) ? 2 : 1); - } if (console_batch_mode) { - fprintf(stderr, msgtemplate_batch, FILENAME_MAX, filename); + fprintf(stderr, msgtemplate_batch, FILENAME_MAX, filename.path); fflush(stderr); return 0; } - fprintf(stderr, msgtemplate, FILENAME_MAX, filename); + fprintf(stderr, msgtemplate, FILENAME_MAX, filename.path); fflush(stderr); { @@ -262,6 +256,7 @@ void old_keyfile_warning(void) void logevent(void *frontend, char *string) { + log_eventlog(logctx, string); } int console_get_line(const char *prompt, char *str,