summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-15 14:06:07 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-15 18:45:43 -0700
commit458dda1f15db3db674cf8846b3c08340378a29a8 (patch)
tree2fbc255a8899ef10fe28424a08ef501a9cab7b6b /source4/libnet
parent654672008cb8c1293c7637718a84ac40a4476aa6 (diff)
downloadsamba-458dda1f15db3db674cf8846b3c08340378a29a8.tar.gz
samba-458dda1f15db3db674cf8846b3c08340378a29a8.tar.bz2
samba-458dda1f15db3db674cf8846b3c08340378a29a8.zip
s4-repl: don't do double replication
When we replicate from a remote DC, we need to note the new uSN that the local changes have resulted in, and modify the uSN that the notify task uses to determine if it should send a ReplicaSync message back to the remote DC. Otherwise we end up always triggering a ReplicaSync every time we replicate from another DC
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_vampire.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 5e516afaee..327a64daea 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -168,6 +168,7 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
uint32_t i;
int ret;
bool ok;
+ uint64_t seq_num;
DEBUG(0,("Analyze and apply schema objects\n"));
@@ -301,7 +302,7 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
s_dsa,
uptodateness_vector,
c->gensec_skey,
- s, &objs);
+ s, &objs, &seq_num);
if (!W_ERROR_IS_OK(status)) {
DEBUG(0,("Failed to commit objects: %s\n", win_errstr(status)));
return werror_to_ntstatus(status);
@@ -465,6 +466,7 @@ static NTSTATUS vampire_store_chunk(void *private_data,
struct repsFromTo1 *s_dsa;
char *tmp_dns_name;
uint32_t i;
+ uint64_t seq_num;
s_dsa = talloc_zero(s, struct repsFromTo1);
NT_STATUS_HAVE_NO_MEMORY(s_dsa);
@@ -541,7 +543,7 @@ static NTSTATUS vampire_store_chunk(void *private_data,
s_dsa,
uptodateness_vector,
c->gensec_skey,
- s, &objs);
+ s, &objs, &seq_num);
if (!W_ERROR_IS_OK(status)) {
DEBUG(0,("Failed to commit objects: %s\n", win_errstr(status)));
return werror_to_ntstatus(status);