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