Blame SOURCES/rsyslog-8.24.0-rhbz1505103-omrelp-rebindinterval.patch

af6c5a
From cc09e7a6e893157a4d7a173c78f4b0a0496e8fbd Mon Sep 17 00:00:00 2001
af6c5a
From: Rainer Gerhards <rgerhards@adiscon.com>
af6c5a
Date: Thu, 28 Sep 2017 19:08:35 +0200
af6c5a
Subject: [PATCH] omrelp bugfix: segfault if rebindinterval config param is
af6c5a
 used
af6c5a
af6c5a
closes https://github.com/rsyslog/rsyslog/issues/120
af6c5a
---
af6c5a
 plugins/omrelp/omrelp.c | 6 ++++--
af6c5a
 1 file changed, 4 insertions(+), 2 deletions(-)
af6c5a
af6c5a
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
af6c5a
index 3df062e0e..d32a66e07 100644
af6c5a
--- a/plugins/omrelp/omrelp.c
af6c5a
+++ b/plugins/omrelp/omrelp.c
af6c5a
@@ -566,8 +566,10 @@ ENDdoAction
af6c5a
af6c5a
 BEGINendTransaction
af6c5a
 CODESTARTendTransaction
af6c5a
-	dbgprintf("omrelp: endTransaction\n");
af6c5a
-	relpCltHintBurstEnd(pWrkrData->pRelpClt);
af6c5a
+	DBGPRINTF("omrelp: endTransaction, connected %d\n", pWrkrData->bIsConnected);
af6c5a
+	if(pWrkrData->bIsConnected) {
af6c5a
+		relpCltHintBurstEnd(pWrkrData->pRelpClt);
af6c5a
+	}
af6c5a
 ENDendTransaction
af6c5a
af6c5a
 BEGINparseSelectorAct