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
pull/1876/head
Richard Fuchs 2 years ago
parent 33ea7382ca
commit 0a36e65398

@ -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;

Loading…
Cancel
Save