ldap/servers/plugins/replication/repl5_tot_protocol.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
New commits: commit e0fd1ffcd84d533e4cd62aae15aea504677798ab Author: Mark Reynolds mreynolds@redhat.com Date: Fri Mar 7 14:07:01 2014 -0500
Ticket 47729 - Directory Server crashes if shutdown during a replication initialization
Bug Description: When a shutdown was detected we marked that the total update was done prematurely(prp->stopped). This allowed the replication plugin to close while the total update was still in progress. Other plugins continued to be shutdown (e.g. ldbm database), while the total update was using shared resources - which lead to a crash.
Fix Description: Only mark the total update protocol as stopped, after it is finished using shared resources.
https://fedorahosted.org/389/ticket/47729
Reviewed by: nhosoi(Thanks!) (cherry picked from commit e7f7e9127717c1d432b10493b626fed334cc595f)
diff --git a/ldap/servers/plugins/replication/repl5_tot_protocol.c b/ldap/servers/plugins/replication/repl5_tot_protocol.c index b10d2d0..9829984 100644 --- a/ldap/servers/plugins/replication/repl5_tot_protocol.c +++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c @@ -340,7 +340,6 @@ repl5_tot_run(Private_Repl_Protocol *prp) prp->stopped = 0; if (prp->terminate) { - prp->stopped = 1; goto done; }
@@ -362,8 +361,7 @@ repl5_tot_run(Private_Repl_Protocol *prp) } else if (prp->terminate) { - conn_disconnect(prp->conn); - prp->stopped = 1; + conn_disconnect(prp->conn); goto done; } @@ -646,7 +644,6 @@ int send_entry (Slapi_Entry *e, void *cb_data) if (prp->terminate) { conn_disconnect(prp->conn); - prp->stopped = 1; ((callback_data*)cb_data)->rc = -1; return -1; } @@ -659,7 +656,6 @@ int send_entry (Slapi_Entry *e, void *cb_data) if (rc) { conn_disconnect(prp->conn); - prp->stopped = 1; ((callback_data*)cb_data)->rc = -1; return -1; }
389-commits@lists.fedoraproject.org