mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 00:30:41 +01:00
Merge branch 'v5-stable'
Conflicts: tools/syslogd.c
This commit is contained in:
commit
5930014cdd
@ -184,6 +184,11 @@ Version 5.9.0 [V5-DEVEL] (rgerhards), 2011-03-??
|
||||
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=236
|
||||
---------------------------------------------------------------------------
|
||||
Version 5.8.1 [V5-stable] (rgerhards), 2011-04-??
|
||||
- bugfix: rate-limiting inside imuxsock did not work 100% correct
|
||||
reason was that a global config variable was invalidly accessed where a
|
||||
listener variable should have been used.
|
||||
Also performance-improved the case when rate limiting is turned off (this
|
||||
is a very unintrusive change, thus done directly to the stable version).
|
||||
- bugfix: $myhostname not available in RainerScript (and no error message)
|
||||
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=233
|
||||
- bugfix: doc for impstats had wrong config statements
|
||||
@ -194,6 +199,7 @@ Version 5.8.1 [V5-stable] (rgerhards), 2011-04-??
|
||||
- bugfix: IPv6-address could not be specified in omrelp
|
||||
this was due to improper parsing of ":"
|
||||
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=250
|
||||
- bugfix(minor): improper template function call in syslogd.c
|
||||
---------------------------------------------------------------------------
|
||||
Version 5.8.0 [V5-stable] (rgerhards), 2011-04-12
|
||||
|
||||
|
||||
@ -432,7 +432,8 @@ finalize_it:
|
||||
|
||||
/* find ratelimiter to use for this message. Currently, we use the
|
||||
* pid, but may change to cgroup later (probably via a config switch).
|
||||
* Returns NULL if not found.
|
||||
* Returns NULL if not found or rate-limiting not activated for this
|
||||
* listener (the latter being a performance enhancement).
|
||||
*/
|
||||
static inline rsRetVal
|
||||
findRatelimiter(lstn_t *pLstn, struct ucred *cred, rs_ratelimit_state_t **prl)
|
||||
@ -444,6 +445,10 @@ findRatelimiter(lstn_t *pLstn, struct ucred *cred, rs_ratelimit_state_t **prl)
|
||||
|
||||
if(cred == NULL)
|
||||
FINALIZE;
|
||||
if(pLstn->ratelimitInterval == 0) {
|
||||
*prl = NULL;
|
||||
FINALIZE;
|
||||
}
|
||||
|
||||
rl = hashtable_search(pLstn->ht, &cred->pid);
|
||||
if(rl == NULL) {
|
||||
@ -454,7 +459,7 @@ findRatelimiter(lstn_t *pLstn, struct ucred *cred, rs_ratelimit_state_t **prl)
|
||||
CHKmalloc(rl = malloc(sizeof(rs_ratelimit_state_t)));
|
||||
CHKmalloc(keybuf = malloc(sizeof(pid_t)));
|
||||
*keybuf = cred->pid;
|
||||
initRatelimitState(rl, ratelimitInterval, pLstn->ratelimitBurst);
|
||||
initRatelimitState(rl, pLstn->ratelimitInterval, pLstn->ratelimitBurst);
|
||||
r = hashtable_insert(pLstn->ht, keybuf, rl);
|
||||
if(r == 0)
|
||||
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user