I'm not convinced I've done this the right way (I've introduced a static for
logctx in console.c) but it will do for now.
git-svn-id: svn://svn.tartarus.org/sgt/putty@2674
cda61777-01e9-0310-a592-
d414129be87e
int console_batch_mode = FALSE;
+static void *console_logctx = NULL;
+
/*
* Clean up and exit.
*/
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,
}
logctx = log_init(NULL, &cfg);
back->provide_logctx(backhandle, logctx);
+ console_provide_logctx(logctx);
sfree(realhost);
}
connopen = 1;
}
logctx = log_init(NULL, &cfg);
back->provide_logctx(backhandle, logctx);
+ console_provide_logctx(logctx);
ssh_sftp_init();
if (verbose && realhost != NULL)
printf("Connected to %s\n", realhost);
*/
extern int console_batch_mode;
int console_get_line(const char *prompt, char *str, int maxlen, int is_pw);
+void console_provide_logctx(void *logctx);
/*
* Exports from printing.c.
bump("ssh_init: %s", err);
logctx = log_init(NULL, &cfg);
back->provide_logctx(backhandle, logctx);
+ console_provide_logctx(logctx);
ssh_scp_init();
if (verbose && realhost != NULL)
tell_user(stderr, "Connected to %s\n", realhost);