main: avoid flipping of syncstatus update

This commit is contained in:
Thomas Schoebel-Theuer 2017-01-12 09:10:45 +01:00
parent 7f9639c317
commit 1b46726241
1 changed files with 2 additions and 3 deletions

View File

@ -4434,6 +4434,8 @@ static int make_sync(void *buf, struct mars_dent *dent)
*/
if (rot->sync_finish_stamp.tv_sec && do_start)
goto shortcut;
if (!do_start)
memset(&rot->sync_finish_stamp, 0, sizeof(rot->sync_finish_stamp));
/* Don't sync when logfiles are discontiguous
*/
@ -4535,9 +4537,6 @@ static int make_sync(void *buf, struct mars_dent *dent)
MARS_DBG("start_pos = %lld end_pos = %lld sync_finish_stamp=%lu do_start=%d\n",
start_pos, end_pos, rot->sync_finish_stamp.tv_sec, do_start);
if (!do_start)
memset(&rot->sync_finish_stamp, 0, sizeof(rot->sync_finish_stamp));
/* Now do it....
*/
{