When receiving a disk file with the -F flag, do an fsync() after each write().

This commit is contained in:
Jef Poskanzer 2013-11-25 09:57:50 -08:00
parent 7bcbb1f653
commit 979405373d

View File

@ -2105,8 +2105,10 @@ diskfile_recv(struct iperf_stream *sp)
int r;
r = sp->rcv2(sp);
if (r > 0)
if (r > 0) {
(void) write(sp->diskfile_fd, sp->buffer, r);
(void) fsync(sp->diskfile_fd);
}
return r;
}