From 3e7e1eb9e8ae85721e2b05ab177b8592852a5d5f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 10 Jan 2002 19:50:07 +0000 Subject: [PATCH] Flush the log file after logging each packet (so that if we're going to crash, we get an up-to-the-minute log of what happened just before then). [originally from svn r1543] --- logging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/logging.c b/logging.c index 3caa94a4..76dcb950 100644 --- a/logging.c +++ b/logging.c @@ -60,6 +60,7 @@ void log_packet(int direction, int type, char *texttype, void *data, int len) strcpy(dumpdata + 10+1+3*16+2+j, "\n"); fputs(dumpdata, lgfp); } + fflush(lgfp); } }