summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-23 15:38:07 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-25 10:38:44 -0700
commit3aea12d0ab70997355904aa6625fce6015657aa7 (patch)
treead0abfde57e565314f4774291e5ab1a3d076bd0d /source4/dsdb
parentca847b593d83f7ce09473469bd79531fdc8d0359 (diff)
downloadsamba-3aea12d0ab70997355904aa6625fce6015657aa7.tar.gz
samba-3aea12d0ab70997355904aa6625fce6015657aa7.tar.bz2
samba-3aea12d0ab70997355904aa6625fce6015657aa7.zip
s4-repl: use dreplsrv_partition_source_dsa_by_guid to find source dsa
this avoids a list walk in the calling code
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/repl/drepl_extended.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/dsdb/repl/drepl_extended.c b/source4/dsdb/repl/drepl_extended.c
index 2c9d1f04e6..07c2328512 100644
--- a/source4/dsdb/repl/drepl_extended.c
+++ b/source4/dsdb/repl/drepl_extended.c
@@ -137,11 +137,12 @@ static WERROR drepl_create_extended_source_dsa(struct dreplsrv_service *service,
for (p=service->partitions; p; p=p->next) {
if (ldb_dn_compare(p->dn, nc_root) == 0) {
struct dreplsrv_partition_source_dsa *s;
- for (s=p->sources; s; s=s->next) {
- if (GUID_equal(&s->repsFrom1->source_dsa_obj_guid,
- &sdsa->repsFrom1->source_dsa_obj_guid)) {
- sdsa->repsFrom1->highwatermark = s->repsFrom1->highwatermark;
- }
+ werr = dreplsrv_partition_source_dsa_by_guid(p,
+ &sdsa->repsFrom1->source_dsa_obj_guid,
+ &s);
+ if (W_ERROR_IS_OK(werr)) {
+ sdsa->repsFrom1->highwatermark = s->repsFrom1->highwatermark;
+ sdsa->repsFrom1->replica_flags = s->repsFrom1->replica_flags;
}
}
}