Blame SOURCES/rsyslog-8.2102.0-rhbz1984616-imuxsock-ratelimit.patch

216606
diff -up rsyslog-8.2102.0/runtime/ratelimit.c.orig rsyslog-8.2102.0/runtime/ratelimit.c
216606
--- rsyslog-8.2102.0/runtime/ratelimit.c.orig	2021-07-27 10:37:50.972903104 +0200
216606
+++ rsyslog-8.2102.0/runtime/ratelimit.c	2021-07-27 10:38:26.141002988 +0200
216606
@@ -235,7 +235,6 @@ ratelimitMsg(ratelimit_t *__restrict__ c
216606
 {
216606
 	DEFiRet;
216606
 	rsRetVal localRet;
216606
-	int severity = 0;
216606
 
216606
 	*ppRepMsg = NULL;
216606
 
216606
@@ -246,13 +245,12 @@ ratelimitMsg(ratelimit_t *__restrict__ c
216606
 				DBGPRINTF("Message discarded, parsing error %d\n", localRet);
216606
 				ABORT_FINALIZE(RS_RET_DISCARDMSG);
216606
 			}
216606
-			severity = pMsg->iSeverity;
216606
 		}
216606
 	}
216606
 
216606
 	/* Only the messages having severity level at or below the
216606
 	 * treshold (the value is >=) are subject to ratelimiting. */
216606
-	if(ratelimit->interval && (severity >= ratelimit->severity)) {
216606
+	if(ratelimit->interval && (pMsg->iSeverity >= ratelimit->severity)) {
216606
 		char namebuf[512]; /* 256 for FGDN adn 256 for APPNAME should be enough */
216606
 		snprintf(namebuf, sizeof namebuf, "%s:%s", getHOSTNAME(pMsg),
216606
 			getAPPNAME(pMsg, 0));