Created a shiny new abstraction for the socket handling. Has many
[u/mdw/putty] / misc.c
diff --git a/misc.c b/misc.c
index 370eea0..6bb09c5 100644 (file)
--- a/misc.c
+++ b/misc.c
 static FILE *fp = NULL;
 
 void mlog(char *file, int line) {
-    if (!fp)
+    if (!fp) {
        fp = fopen("putty_mem.log", "w");
+       setvbuf(fp, NULL, _IONBF, BUFSIZ);
+    }
     if (fp)
        fprintf (fp, "%s:%d: ", file, line);
 }