summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication/windows_inc_protocol.c
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2009-11-09 17:10:52 -0800
committerNathan Kinder <nkinder@redhat.com>2009-11-10 09:23:20 -0800
commit7cdc2ad5d49b2e016628adb8562eae2ecd9d095e (patch)
tree9d630507b263db01e3672b702dd2edf8f852eb00 /ldap/servers/plugins/replication/windows_inc_protocol.c
parentb403fae442eabcb41cc3e9da355d17350ecb26fa (diff)
downloadds-7cdc2ad5d49b2e016628adb8562eae2ecd9d095e.tar.gz
ds-7cdc2ad5d49b2e016628adb8562eae2ecd9d095e.tar.xz
ds-7cdc2ad5d49b2e016628adb8562eae2ecd9d095e.zip
Bug 497199 - Skip dirsync if disconnected during incremental update
If some sort of error occurs during the sending updates to AD phase of an incremental winsync update, we still attempt to send the dirsync control to AD. This can cause spurious error messages to be logged to the errors log stating that we can't send the control since we are not connected to AD anymore. This patch simply skips sending the dirsync control if we encountered an error sending updates to AD.
Diffstat (limited to 'ldap/servers/plugins/replication/windows_inc_protocol.c')
-rw-r--r--ldap/servers/plugins/replication/windows_inc_protocol.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c b/ldap/servers/plugins/replication/windows_inc_protocol.c
index 88a91bce..f2e9034d 100644
--- a/ldap/servers/plugins/replication/windows_inc_protocol.c
+++ b/ldap/servers/plugins/replication/windows_inc_protocol.c
@@ -864,8 +864,12 @@ windows_inc_run(Private_Repl_Protocol *prp)
if ( run_dirsync )
{
- windows_dirsync_inc_run(prp);
- windows_private_save_dirsync_cookie(prp->agmt);
+ /* Don't run dirsync if we encountered
+ * an error when sending updates to AD. */
+ if (rc == UPDATE_NO_MORE_UPDATES) {
+ windows_dirsync_inc_run(prp);
+ windows_private_save_dirsync_cookie(prp->agmt);
+ }
run_dirsync = PR_FALSE;
}