]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - logging.c
Implement `Restart Session', in both Unix and Windows PuTTY. Largely
[PuTTY.git] / logging.c
index f32e9cae4c993c90bbad9edad4618e1928fbc73d..5302998fe969b300b4c15b244e038091a5a6148c 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -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