From c1ac395b0b6010938827225739d1861c2b1fa63a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 9 Jan 2012 09:36:15 +0100 Subject: imudp refactor: regression fix --- plugins/imudp/imudp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index f5a8a08d..7068af0b 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -233,11 +233,11 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal) newnLstn = nLstn + newSocks[0]; CHKmalloc(newlcnfinfo = (struct cnfinfo_s*) MALLOC(sizeof(struct cnfinfo_s) * newnLstn)); /* ready to copy */ - iDst = 0; + iDst = nLstn; memcpy(newlcnfinfo, lcnfinfo, nLstn * sizeof(struct cnfinfo_s)); for(iSrc = 1 ; iSrc <= newSocks[0] ; ++iSrc, ++iDst) { - lcnfinfo[iDst].udpLstnSocks = newSocks[iSrc]; - lcnfinfo[iDst].udpRulesets = pBindRuleset; + newlcnfinfo[iDst].udpLstnSocks = newSocks[iSrc]; + newlcnfinfo[iDst].udpRulesets = pBindRuleset; } free(lcnfinfo); lcnfinfo = newlcnfinfo; -- cgit v1.2.3