summaryrefslogtreecommitdiffstats
path: root/plugins/imudp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-19 14:05:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-19 14:05:30 +0200
commit244ae5837c5423bb738d21c67e73ca6efe34c7a9 (patch)
tree3466174d5f977bc45bc6a6c82047681b973b9b04 /plugins/imudp
parent4ccf24c096073e9ef1681faf8c459474d6e584c2 (diff)
downloadrsyslog-244ae5837c5423bb738d21c67e73ca6efe34c7a9.tar.gz
rsyslog-244ae5837c5423bb738d21c67e73ca6efe34c7a9.tar.xz
rsyslog-244ae5837c5423bb738d21c67e73ca6efe34c7a9.zip
fixed regression in new multi-ruleset imudp code
The new code has not been released so far, so this does not fix any bug known to the "real world".
Diffstat (limited to 'plugins/imudp')
-rw-r--r--plugins/imudp/imudp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 5a1d9e8b..fddee513 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -136,13 +136,13 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal)
} else {
/* ready to copy */
iDst = 1;
- for(iSrc = 1 ; iSrc <= udpLstnSocks[0] ; ++iSrc) {
- tmpSocks[iDst++] = udpLstnSocks[iSrc];
- tmpRulesets[iDst++] = udpRulesets[iSrc];
+ for(iSrc = 1 ; iSrc <= udpLstnSocks[0] ; ++iSrc, ++iDst) {
+ tmpSocks[iDst] = udpLstnSocks[iSrc];
+ tmpRulesets[iDst] = udpRulesets[iSrc];
}
- for(iSrc = 1 ; iSrc <= newSocks[0] ; ++iSrc) {
- tmpSocks[iDst++] = newSocks[iSrc];
- tmpRulesets[iDst++] = pBindRuleset;
+ for(iSrc = 1 ; iSrc <= newSocks[0] ; ++iSrc, ++iDst) {
+ tmpSocks[iDst] = newSocks[iSrc];
+ tmpRulesets[iDst] = pBindRuleset;
}
tmpSocks[0] = udpLstnSocks[0] + newSocks[0];
free(newSocks);