ldap/servers/plugins/replication/repl5_tot_protocol.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
New commits:
commit c40e1cd9f64f5c0a57708f3ee9ad4abb606ecfc5
Author: Mark Reynolds <mreynolds(a)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 3895ace..2db5178 100644
--- a/ldap/servers/plugins/replication/repl5_tot_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c
@@ -343,7 +343,6 @@ repl5_tot_run(Private_Repl_Protocol *prp)
prp->stopped = 0;
if (prp->terminate)
{
- prp->stopped = 1;
goto done;
}
@@ -365,8 +364,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;
}
@@ -661,7 +659,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;
}
@@ -674,7 +671,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;
}