Sprinkle some header comments in various files in an attempt to explain what
[u/mdw/putty] / logging.c
index cb9c536..8122a48 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -1,3 +1,7 @@
+/*
+ * Session logging.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -80,7 +84,7 @@ static void logfopen_callback(void *handle, int mode)
     if (mode == 0) {
        ctx->state = L_ERROR;          /* disable logging */
     } else {
-       fmode = (mode == 1 ? "a" : "w");
+       fmode = (mode == 1 ? "ab" : "wb");
        ctx->lgfp = f_open(ctx->currlogfilename, fmode);
        if (ctx->lgfp)
            ctx->state = L_OPEN;