[389-devel] Please Review: (479199) Skip dirsync if disconnected during incremental winsync update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>From 4cd3e4a5d0744a890037d4fd0b73e782e01bae06 Mon Sep 17 00:00:00 2001
From: Nathan Kinder <nkinder@xxxxxxxxxx>
Date: Mon, 9 Nov 2009 17:10:52 -0800
Subject: [PATCH] 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.
---
 .../plugins/replication/windows_inc_protocol.c     |    8 ++++++--
 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 88a91bc..f2e9034 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;
 	}
 
-- 
1.6.2.5

--
389-devel mailing list
389-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux