commit c7a5a23399940d15d5552c82ec7e3f5d63f38f47 Author: Oswald Buddenhagen <o...@kde.org> Date: Sat Sep 15 14:38:39 2012 +0200
avoid that a system crash can cause messages to be propagated twice fdatasync() the journal after creating the pair record and recording the TUID, but before the message propagation actually starts. all other writes to the journal are not flushed, as they will at worst cause some unnecessary network traffic without visible effect. src/sync.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/sync.c b/src/sync.c index cf67ae1..3a1f386 100644 --- a/src/sync.c +++ b/src/sync.c @@ -1202,6 +1202,7 @@ box_loaded( int sts, void *aux ) cv->srec = srec; cv->msg = tmsg; Fprintf( svars->jfp, "# %d %d %." stringify(TUIDL) "s\n", srec->uid[M], srec->uid[S], srec->tuid ); + fdatasync( fileno( svars->jfp ) ); debug( " -> %sing message, TUID %." stringify(TUIDL) "s\n", str_hl[t], srec->tuid ); if (copy_msg( cv )) return; ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel