From 0a36e65398806c03d70ba37b04be083b70db3f57 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 21 Oct 2024 11:11:16 -0400 Subject: [PATCH] MT#55283 set metafile to unbuffered Previously there were explicit calls to fflush() in some code paths. Replace with making the file fully unbuffered in case users depended on this behaviour. Change-Id: If49cf6135c0d9fe41c8896d4137e204da780be31 --- daemon/recording.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/recording.c b/daemon/recording.c index 8da7e84f0..3db1e757d 100644 --- a/daemon/recording.c +++ b/daemon/recording.c @@ -517,6 +517,7 @@ static char *meta_setup_file(struct recording *recording, const str *meta_prefix g_clear_pointer(&recording->pcap.meta_filepath, free); return NULL; } + setvbuf(mfp, NULL, _IONBF, 0); recording->pcap.meta_fp = mfp; ilog(LOG_DEBUG, "Wrote metadata file to temporary path: %s%s%s", FMT_M(meta_filepath)); return meta_filepath;