summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_notify.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-08 17:14:09 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-08 06:57:42 +0000
commit11b42022c7f1fe60ce0be0911f17a7ff70881986 (patch)
treeb5bc018d0b4f975b66458d1c673cab3833e0584c /source4/dsdb/repl/drepl_notify.c
parent2763ede39937f9a0df2c6d0edf8532ce5e6f3e39 (diff)
downloadsamba-11b42022c7f1fe60ce0be0911f17a7ff70881986.tar.gz
samba-11b42022c7f1fe60ce0be0911f17a7ff70881986.tar.bz2
samba-11b42022c7f1fe60ce0be0911f17a7ff70881986.zip
s4-repl: fixed replication notifications to RODCs
We need a separate source dsa list for RODCs, as they are not in the repsFrom for our partitions, but are in the repsTo. This adds a new 'notifies' list, which contains all the source dsas for the DCs that we should send notifies to, but which we don't replicate from Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Nov 8 06:57:43 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/repl/drepl_notify.c')
-rw-r--r--source4/dsdb/repl/drepl_notify.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c
index 836509b3eb..0178e97e55 100644
--- a/source4/dsdb/repl/drepl_notify.c
+++ b/source4/dsdb/repl/drepl_notify.c
@@ -270,16 +270,24 @@ void dreplsrv_notify_run_ops(struct dreplsrv_service *s)
/*
find a source_dsa for a given guid
*/
-static struct dreplsrv_partition_source_dsa *dreplsrv_find_source_dsa(struct dreplsrv_partition *p,
+static struct dreplsrv_partition_source_dsa *dreplsrv_find_notify_dsa(struct dreplsrv_partition *p,
struct GUID *guid)
{
struct dreplsrv_partition_source_dsa *s;
+ /* first check the sources list */
for (s=p->sources; s; s=s->next) {
if (GUID_compare(&s->repsFrom1->source_dsa_obj_guid, guid) == 0) {
return s;
}
}
+
+ /* then the notifies list */
+ for (s=p->notifies; s; s=s->next) {
+ if (GUID_compare(&s->repsFrom1->source_dsa_obj_guid, guid) == 0) {
+ return s;
+ }
+ }
return NULL;
}
@@ -298,7 +306,7 @@ static WERROR dreplsrv_schedule_notify_sync(struct dreplsrv_service *service,
struct dreplsrv_notify_operation *op;
struct dreplsrv_partition_source_dsa *s;
- s = dreplsrv_find_source_dsa(p, &reps->ctr.ctr1.source_dsa_obj_guid);
+ s = dreplsrv_find_notify_dsa(p, &reps->ctr.ctr1.source_dsa_obj_guid);
if (s == NULL) {
DEBUG(0,(__location__ ": Unable to find source_dsa for %s\n",
GUID_string(mem_ctx, &reps->ctr.ctr1.source_dsa_obj_guid)));
@@ -375,7 +383,7 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service *s,
for (i=0; i<count; i++) {
struct dreplsrv_partition_source_dsa *sdsa;
uint32_t replica_flags;
- sdsa = dreplsrv_find_source_dsa(p, &reps[i].ctr.ctr1.source_dsa_obj_guid);
+ sdsa = dreplsrv_find_notify_dsa(p, &reps[i].ctr.ctr1.source_dsa_obj_guid);
replica_flags = reps[i].ctr.ctr1.replica_flags;
if (sdsa == NULL) continue;
if (sdsa->notify_uSN < uSNHighest) {