From 244ae5837c5423bb738d21c67e73ca6efe34c7a9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 19 Oct 2009 14:05:30 +0200 Subject: 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". --- plugins/imudp/imudp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/imudp/imudp.c') 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); -- cgit v1.2.3