summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Craft <wimberosa@gmail.com>2011-07-05 21:34:32 -0500
committerAndrew Tridgell <tridge@samba.org>2011-07-14 07:05:10 +1000
commitc8413b3420d7401fe3b9588a7832d1e30e76a501 (patch)
tree452dc416a338e8de99f91196733aeed698d9cf7c
parent4b19415f5b5f5e6df5ca03ffa5fb0f8b212726ec (diff)
downloadsamba-c8413b3420d7401fe3b9588a7832d1e30e76a501.tar.gz
samba-c8413b3420d7401fe3b9588a7832d1e30e76a501.tar.bz2
samba-c8413b3420d7401fe3b9588a7832d1e30e76a501.zip
Add kccsrv_add_repsFrom() possibility of NULL res argument
We need the ability to utilize this function in a different manner. KCC intra-site topology has already vetted the replica as being appropriate to produce a repsFrom from. We do not want kccsrv_add_repsFrom() to produce further checking as was the case for simple topology. Thus if we pass a NULL (res) parameter this extra check will be skipped. Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--source4/dsdb/kcc/kcc_periodic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index ad61e71025..820aee3500 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -226,7 +226,7 @@ NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ctx,
/* we don't have the new one - add it
* if it is a master
*/
- if (!check_MasterNC(p, &reps[i], res)) {
+ if (res && !check_MasterNC(p, &reps[i], res)) {
/* its not a master, we don't
want to pull from it */
continue;
@@ -246,7 +246,7 @@ NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ctx,
/* remove any stale ones */
for (i=0; i<our_count; i++) {
if (!reps_in_list(&our_reps[i], reps, count) ||
- !check_MasterNC(p, &our_reps[i], res)) {
+ (res && !check_MasterNC(p, &our_reps[i], res))) {
DEBUG(4,(__location__ ": Removed repsFrom for %s\n",
our_reps[i].ctr.ctr1.other_info->dns_name));
memmove(&our_reps[i], &our_reps[i+1], (our_count-(i+1))*sizeof(our_reps[0]));