diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-14 03:43:26 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-14 09:41:52 -0700 |
commit | 3cf73dfdbdd33189e0f9f22e0e494962376f9b86 (patch) | |
tree | 4db96c3e7b4d2bf0b4e6f9033f8e8d4027a6bbfc /source4/dsdb/repl | |
parent | 667b825d183f6b438b2329aef32686c20e55b7d3 (diff) | |
download | samba-3cf73dfdbdd33189e0f9f22e0e494962376f9b86.tar.gz samba-3cf73dfdbdd33189e0f9f22e0e494962376f9b86.tar.bz2 samba-3cf73dfdbdd33189e0f9f22e0e494962376f9b86.zip |
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.
Diffstat (limited to 'source4/dsdb/repl')
-rw-r--r-- | source4/dsdb/repl/drepl_notify.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |