Browse Source

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 1 year ago
parent
commit
0a36e65398
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      daemon/recording.c

+ 1
- 0
daemon/recording.c View File

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