summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-19 18:02:46 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-19 18:02:46 +0200
commit2deec9a12944129c9dce9ee237d04e0a1a8b082b (patch)
tree87cdc4798b1637504fe88672b6868b6e67781a61
parent0ca6000d3a0dda2279e199b776c683200c5e48d9 (diff)
downloadrsyslog-2deec9a12944129c9dce9ee237d04e0a1a8b082b.tar.gz
rsyslog-2deec9a12944129c9dce9ee237d04e0a1a8b082b.tar.xz
rsyslog-2deec9a12944129c9dce9ee237d04e0a1a8b082b.zip
bugfix: first UDP listener was incorrectly assigned its ruleset
this was a regression of the recent imudp multi-ruleset enhancement bug was not in any released version
-rw-r--r--plugins/imudp/imudp.c3
-rw-r--r--runtime/conf.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index fddee513..6ce8039f 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -117,8 +117,9 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal)
if(udpLstnSocks == NULL) {
/* esay, we can just replace it */
udpLstnSocks = newSocks;
+RUNLOG_VAR("%d", newSocks[0]);
CHKmalloc(udpRulesets = (ruleset_t**) malloc(sizeof(ruleset_t*) * (newSocks[0] + 1)));
- for(iDst = 1 ; iDst < newSocks[0] ; ++iDst)
+ for(iDst = 1 ; iDst <= newSocks[0] ; ++iDst)
udpRulesets[iDst] = pBindRuleset;
} else {
/* we need to add them */
diff --git a/runtime/conf.c b/runtime/conf.c
index d1b14793..d6e6ccf6 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -1037,7 +1037,7 @@ static rsRetVal cflineDoFilter(uchar **pp, rule_t *f)
DEFiRet;
ASSERT(pp != NULL);
- ASSERT(f != NULL);
+ ISOBJ_TYPE_assert(f, rule);
/* check which filter we need to pull... */
switch(**pp) {
@@ -1059,6 +1059,7 @@ static rsRetVal cflineDoFilter(uchar **pp, rule_t *f)
* and, if so, we copy them over. rgerhards, 2005-10-18
*/
if(pDfltProgNameCmp != NULL) {
+RUNLOG_STR("dflt ProgNameCmp != NULL, setting opCSProgNameComp");
CHKiRet(rsCStrConstructFromCStr(&(f->pCSProgNameComp), pDfltProgNameCmp));
}