Flush the log file after logging each packet (so that if we're going
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 10 Jan 2002 19:50:07 +0000 (19:50 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 10 Jan 2002 19:50:07 +0000 (19:50 +0000)
to crash, we get an up-to-the-minute log of what happened just
before then).

git-svn-id: svn://svn.tartarus.org/sgt/putty@1543 cda61777-01e9-0310-a592-d414129be87e

logging.c

index 3caa94a..76dcb95 100644 (file)
--- 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);
     }
 }