From 3cf73dfdbdd33189e0f9f22e0e494962376f9b86 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Sep 2009 03:43:26 -0700 Subject: s4-repl: fall back to repsFrom if repsTo not set Windows does not seem to be always setting up repsTo using DsUpdateRefs(). For now we will fall back to using repsFrom if repsTo is empty. This is almost certainly incorrect, but it does get notification based replication working with both w2k3 and w2k8. --- source4/dsdb/repl/drepl_notify.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/repl') diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c index 83c6df48dc..73280917c5 100644 --- a/source4/dsdb/repl/drepl_notify.c +++ b/source4/dsdb/repl/drepl_notify.c @@ -293,13 +293,16 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service *s, struct dreplsrv_partition *p, TALLOC_CTX *mem_ctx) { - uint32_t count; + uint32_t count=0; struct repsFromToBlob *reps; WERROR werr; uint64_t uSN; int ret, i; werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsTo", &reps, &count); + if (count == 0) { + werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsFrom", &reps, &count); + } if (!W_ERROR_IS_OK(werr)) { DEBUG(0,(__location__ ": Failed to load repsTo for %s\n", ldb_dn_get_linearized(p->dn))); @@ -331,7 +334,6 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service *s, } } - return WERR_OK; } -- cgit