diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-06 13:30:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-06 13:30:45 +0200 |
commit | 7fdeac0bdcaad3525f203ae5dc1fa7636078e37f (patch) | |
tree | 1fdd47cc8af80c1f8f3886b323f2eb2bc18babf9 | |
parent | da933a7e105acf814d5e7955d39d29eab3a96613 (diff) | |
download | rsyslog-7fdeac0bdcaad3525f203ae5dc1fa7636078e37f.tar.gz rsyslog-7fdeac0bdcaad3525f203ae5dc1fa7636078e37f.tar.xz rsyslog-7fdeac0bdcaad3525f203ae5dc1fa7636078e37f.zip |
bugfix: abort condition when RecvFrom was not set and message reduction was on
Happend e.g. with imuxsock.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | runtime/msg.c | 18 |
2 files changed, 14 insertions, 6 deletions
@@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 4.5.1 [DEVEL] (rgerhards), 2009-07-?? +- bugfix: abort condition when RecvFrom was not set and message reduction + was on. Happend e.g. with imuxsock. - added $klogConsoleLogLevel directive which permits to set a new console log level while rsyslog is active --------------------------------------------------------------------------- diff --git a/runtime/msg.c b/runtime/msg.c index 6c272d1f..0ce84f35 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -864,12 +864,18 @@ msg_t* MsgDup(msg_t* pOld) pNew->iProtocolVersion = pOld->iProtocolVersion; pNew->ttGenTime = pOld->ttGenTime; pNew->offMSG = pOld->offMSG; - pNew->pRcvFrom = pOld->pRcvFrom; - prop.AddRef(pNew->pRcvFrom); - pNew->pRcvFromIP = pOld->pRcvFromIP; - prop.AddRef(pNew->pRcvFromIP); - pNew->pInputName = pOld->pInputName; - prop.AddRef(pNew->pInputName); + if(pOld->pRcvFrom != NULL) { + pNew->pRcvFrom = pOld->pRcvFrom; + prop.AddRef(pNew->pRcvFrom); + } + if(pOld->pRcvFromIP != NULL) { + pNew->pRcvFromIP = pOld->pRcvFromIP; + prop.AddRef(pNew->pRcvFromIP); /* XXX */ + } + if(pOld->pInputName != NULL) { + pNew->pInputName = pOld->pInputName; + prop.AddRef(pNew->pInputName); + } /* enable this, if someone actually uses UxTradMsg, delete after some time has * passed and nobody complained -- rgerhards, 2009-06-16 pNew->offAfterPRI = pOld->offAfterPRI; |