|
|
ba46c7 |
From f8e95c2189dca53daf98d3ae7249c20ca9fc4541 Mon Sep 17 00:00:00 2001
|
|
|
ba46c7 |
From: Noriko Hosoi <nhosoi@redhat.com>
|
|
|
ba46c7 |
Date: Fri, 1 Nov 2013 18:22:47 -0700
|
|
|
ba46c7 |
Subject: [PATCH 49/49] Ticket #47581 - Winsync plugin segfault during
|
|
|
ba46c7 |
incremental backoff (phase 2)
|
|
|
ba46c7 |
|
|
|
ba46c7 |
Fix description: Apply the previous patch Ticket #47581 against the
|
|
|
ba46c7 |
replication plug-in (repl5_inc_protocol.c):
|
|
|
ba46c7 |
Make sure to delete the backoff timer when
|
|
|
ba46c7 |
1) a replication agreement is removed and the protocol is deleted, and
|
|
|
ba46c7 |
2) a new backoff timer set and there is already a backoff timer set up.
|
|
|
ba46c7 |
|
|
|
ba46c7 |
https://fedorahosted.org/389/ticket/47581
|
|
|
ba46c7 |
|
|
|
ba46c7 |
Reviewed by rmeggins (Thank you, Rich!!)
|
|
|
ba46c7 |
(cherry picked from commit 8eecc43e0160e132949ed504162b4536d6040620)
|
|
|
ba46c7 |
(cherry picked from commit 962fc45a15a4bc2e0d13d3d8b12225105ef43dbb)
|
|
|
ba46c7 |
(cherry picked from commit 0df4c665401db297f303ad91f5e892b1e604e63a)
|
|
|
ba46c7 |
---
|
|
|
ba46c7 |
ldap/servers/plugins/replication/repl5_inc_protocol.c | 9 +++++++++
|
|
|
ba46c7 |
1 file changed, 9 insertions(+)
|
|
|
ba46c7 |
|
|
|
ba46c7 |
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
|
|
|
ba46c7 |
index fa442fe..612fe46 100644
|
|
|
ba46c7 |
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
|
|
|
ba46c7 |
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
|
|
|
ba46c7 |
@@ -509,6 +509,11 @@ repl5_inc_waitfor_async_results(result_data *rd)
|
|
|
ba46c7 |
static void
|
|
|
ba46c7 |
repl5_inc_delete(Private_Repl_Protocol **prpp)
|
|
|
ba46c7 |
{
|
|
|
ba46c7 |
+ repl5_inc_private *prp_priv = (repl5_inc_private *)(*prpp)->private;
|
|
|
ba46c7 |
+ /* if backoff is set, delete it (from EQ, as well) */
|
|
|
ba46c7 |
+ if (prp_priv->backoff) {
|
|
|
ba46c7 |
+ backoff_delete(&prp_priv->backoff);
|
|
|
ba46c7 |
+ }
|
|
|
ba46c7 |
/* First, stop the protocol if it isn't already stopped */
|
|
|
ba46c7 |
if (!(*prpp)->stopped) {
|
|
|
ba46c7 |
(*prpp)->stopped = 1;
|
|
|
ba46c7 |
@@ -837,6 +842,10 @@ repl5_inc_run(Private_Repl_Protocol *prp)
|
|
|
ba46c7 |
state2name(current_state));
|
|
|
ba46c7 |
} else {
|
|
|
ba46c7 |
/* Set up the backoff timer to wake us up at the appropriate time */
|
|
|
ba46c7 |
+ /* if previous backoff set up, delete it. */
|
|
|
ba46c7 |
+ if (prp_priv->backoff) {
|
|
|
ba46c7 |
+ backoff_delete(&prp_priv->backoff);
|
|
|
ba46c7 |
+ }
|
|
|
ba46c7 |
if (use_busy_backoff_timer){
|
|
|
ba46c7 |
/* we received a busy signal from the consumer, wait for a while */
|
|
|
ba46c7 |
if (!busywaittime){
|
|
|
ba46c7 |
--
|
|
|
ba46c7 |
1.8.1.4
|
|
|
ba46c7 |
|