light: safeguard position update

This commit is contained in:
Thomas Schoebel-Theuer 2016-02-29 10:40:19 +01:00
parent fafad9512a
commit e70ac4df8c
1 changed files with 2 additions and 0 deletions

View File

@ -4437,6 +4437,8 @@ static int make_sync(void *buf, struct mars_dent *dent)
/* Disallow overwrite of newer data
*/
if (do_start)
write_info_links(rot);
if (do_start && compare_replaylinks(rot, peer, my_id()) < 0) {
MARS_INF("cannot start sync because my data is newer than the remote one at '%s'!\n", peer);
do_start = false;