projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flush the logfile reasonably frequently in `printable output only' and
[u/mdw/putty]
/
logging.c
diff --git
a/logging.c
b/logging.c
index
f32e9ca
..
5302998
100644
(file)
--- a/
logging.c
+++ b/
logging.c
@@
-35,6
+35,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
* entries to stderr when a command-line tool is in verbose mode.
* 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
* entries to stderr when a command-line tool is in verbose mode.