summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ratelimit.c7
-rw-r--r--runtime/ratelimit.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/runtime/ratelimit.c b/runtime/ratelimit.c
index 22e785a8..24152e8d 100644
--- a/runtime/ratelimit.c
+++ b/runtime/ratelimit.c
@@ -193,7 +193,7 @@ ratelimitMsg(ratelimit_t *ratelimit, msg_t *pMsg, msg_t **ppRepMsg)
DEFiRet;
*ppRepMsg = NULL;
- if(ratelimit->bLinuxLike) {
+ if(ratelimit->interval) {
if(withinRatelimit(ratelimit, pMsg->ttGenTime) == 0)
ABORT_FINALIZE(RS_RET_DISCARDMSG);
}
@@ -208,7 +208,7 @@ finalize_it:
int
ratelimitChecked(ratelimit_t *ratelimit)
{
- return ratelimit->bLinuxLike || ratelimit->bReduceRepeatMsgs;
+ return ratelimit->interval || ratelimit->bReduceRepeatMsgs;
}
@@ -274,8 +274,6 @@ ratelimitNew(ratelimit_t **ppThis, char *modname, char *dynname)
pThis->name = strdup(namebuf);
}
pThis->bReduceRepeatMsgs = runConf->globals.bReduceRepeatMsgs;
- if(pThis->bReduceRepeatMsgs)
- pThis->bActive = 1;
*ppThis = pThis;
finalize_it:
RETiRet;
@@ -291,7 +289,6 @@ ratelimitSetLinuxLike(ratelimit_t *ratelimit, unsigned short interval, unsigned
ratelimit->done = 0;
ratelimit->missed = 0;
ratelimit->begin = 0;
- ratelimit->bLinuxLike = 1;
}
diff --git a/runtime/ratelimit.h b/runtime/ratelimit.h
index a7959dfe..820817bc 100644
--- a/runtime/ratelimit.h
+++ b/runtime/ratelimit.h
@@ -22,10 +22,8 @@
#define INCLUDED_RATELIMIT_H
struct ratelimit_s {
- int bActive; /**< any rate-limiting at all desired? */
char *name; /**< rate limiter name, e.g. for user messages */
/* support for Linux kernel-type ratelimiting */
- int bLinuxLike; /**< Linux-like rate limiting enabled? */
unsigned short interval;
unsigned short burst;
unsigned done;