X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/bf61b5660299e88399304cd8eb9bacddc73a765b..47489d8daef971352cfb1ec30c998ed7b048c97c:/console.c diff --git a/console.c b/console.c index c9284b19..27366dee 100644 --- a/console.c +++ b/console.c @@ -15,6 +15,8 @@ int console_batch_mode = FALSE; +static void *console_logctx = NULL; + /* * Clean up and exit. */ @@ -259,8 +261,15 @@ void old_keyfile_warning(void) fputs(message, stderr); } +void console_provide_logctx(void *logctx) +{ + console_logctx = logctx; +} + void logevent(void *frontend, char *string) { + if (console_logctx) + log_eventlog(console_logctx, string); } int console_get_line(const char *prompt, char *str,