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

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