From cd7d059ec080bf0a783272d6a0ea625c99b2f7f3 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Aug 28 2012 01:55:30 +0000 Subject: Ticket #440 - periodic dirsync timed event causes server to loop repeatedly https://fedorahosted.org/389/ticket/440 Resolves: Ticket #440 Bug Description: periodic dirsync timed event causes server to loop repeatedly Reviewed by: nhosoi (Thanks!) Branch: 389-ds-base-1.2.11 Fix Description: If we get the EVENT_RUN_DIRSYNC in state STATE_WAIT_WINDOW_OPEN, just go to sleep, and wait for some event that is able to bump from this state, such as schedule window open or agreement change. Platforms tested: RHEL6 x86_64 Flag Day: no Doc impact: no (cherry picked from commit d6ca372b30ae0c4e9fcd65c22ac3a7ce870e3f67) (cherry picked from commit 6cfc1c0ac84200535a512dd4ef28fc9dd82d6c18) --- diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c b/ldap/servers/plugins/replication/windows_inc_protocol.c index e9df9f6..b5fcadc 100644 --- a/ldap/servers/plugins/replication/windows_inc_protocol.c +++ b/ldap/servers/plugins/replication/windows_inc_protocol.c @@ -414,6 +414,11 @@ windows_inc_run(Private_Repl_Protocol *prp) state2name(current_state)); protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT); } + else if (event_occurred(prp, EVENT_RUN_DIRSYNC)) /* periodic_dirsync */ + { + /* just ignore it and go to sleep */ + protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT); + } else { /* wait until window opens or an event occurs */