From c8413b3420d7401fe3b9588a7832d1e30e76a501 Mon Sep 17 00:00:00 2001 From: Dave Craft Date: Tue, 5 Jul 2011 21:34:32 -0500 Subject: 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 --- source4/dsdb/kcc/kcc_periodic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4') 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; idns_name)); memmove(&our_reps[i], &our_reps[i+1], (our_count-(i+1))*sizeof(our_reps[0])); -- cgit