1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 01:27:35 -05:00

Flush the logfile reasonably frequently in `printable output only' and

`all session data' modes, without completely mauling the performance, by
fflush()ing once per term_out(). If anyone complains I suppose we can
make this optional.

[originally from svn r4445]
This commit is contained in:
Jacob Nevins
2004-08-12 01:02:01 +00:00
parent 181e6fdfe1
commit 088a1d37e9
3 changed files with 12 additions and 0 deletions

View File

@ -34,6 +34,16 @@ void logtraffic(void *handle, unsigned char c, int logmode)
}
}
/*
* Flush any open log file.
*/
void logflush(void *handle) {
struct LogContext *ctx = (struct LogContext *)handle;
if (ctx->cfg.logtype > 0)
if (ctx->lgfp)
fflush(ctx->lgfp);
}
/*
* Log an Event Log entry. Used in SSH packet logging mode; this is
* also as convenient a place as any to put the output of Event Log