On Wed, Jun 15, 2016 at 06:29:43PM -0700, Kevin J. McCarthy wrote:
> On Thu, Jun 09, 2016 at 08:09:37PM -0400, Damien Riegel wrote:
> > diff -r 9556f8bbb5a9 -r 9eebf8f22c4d mx.c
> > --- a/mx.c Tue Jun 07 18:34:14 2016 -0400
> > +++ b/mx.c Tue Jun 07 18:41:40 2016 -0400
> > @@ -1332,8 +1332,12 @@
> >
> > int mx_commit_message (MESSAGE *msg, CONTEXT *ctx)
>
> > + r = ops->commit_msg (ctx, msg);
> >
> > if (r == 0 && (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF)
> > && (fflush (msg->fp) == EOF || fsync (fileno (msg->fp)) == -1))
> > {
> > mutt_perror _("Can't write message");
> > r = -1;
> > }
>
> I think it would be good to move the fflush and fsync inside
> mmdf_commit_message() and mbox_commit_message().
Yes, it should be done, but I would like to keep the goal of this commit
to the switch case factorization. I will resubmit the serie with the
previous commit fixed, and then send a follow up patch to move fflush
and fsync to their respective functions.
--
Damien