1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Flush log file after asynchronous askappend.

When I made the 'overwrite or append log file?' dialog box into a
non-modal one, it exposed a bug in logging.c's handling of an
asynchronous response to askappend(): we queued all the pending log
data and wrote it out to the log file, but forgot the final fflush
that would have made sure it all actually _went_ to the log file. So
one stdio buffer's worth could still be held in the C library, to be
released the next time log data shows up.

Added the missing logflush().
This commit is contained in:
Simon Tatham 2018-10-01 21:03:34 +01:00
parent db188040ea
commit 5d6d052d8b

View File

@ -153,6 +153,7 @@ static void logfopen_callback(void *vctx, int mode)
logwrite(ctx, data, len);
bufchain_consume(&ctx->queue, len);
}
logflush(ctx);
}
/*