diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-03-21 16:56:19 +1300 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-07-15 12:46:14 +0200 |
commit | 483d5e36f13154b8ca6d0bb7ceb9225f5f20d9d4 (patch) | |
tree | a0e6b5d952da3644e681bbf4d577d392192ceef2 | |
parent | a2d3f1a861f2f3d98565dc199be5dc87e2e78648 (diff) | |
download | samba-483d5e36f13154b8ca6d0bb7ceb9225f5f20d9d4.tar.gz |
dsdb: Clarify how the DSDB_REPL_FLAG_PRIORITISE_INCOMING flag works
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: Ib9f2f4ba417dbf0ee24b6e7db02d78a9bfe8850c
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit dac1411b9ef9863152932698ce8c4e0a8cc79b1c)
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 5533b56ac97..58e8253d5de 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -4396,11 +4396,19 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar) } if (ar->objs->dsdb_repl_flags & DSDB_REPL_FLAG_PRIORITISE_INCOMING) { - /* if we compare equal then do an - update. This is used when a client - asks for a FULL_SYNC, and can be - used to recover a corrupt - replica */ + /* + * if we compare equal then do an + * update. This is used when a client + * asks for a FULL_SYNC, and can be + * used to recover a corrupt + * replica. + * + * This call is a bit tricky, what we + * are doing it turning the 'is_newer' + * call into a 'not is older' by + * swapping i and j, and negating the + * outcome. + */ cmp = !replmd_replPropertyMetaData1_is_newer(&rmd->ctr.ctr1.array[i], &nmd.ctr.ctr1.array[j]); } else { |