summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-06 13:30:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-06 13:30:45 +0200
commit7fdeac0bdcaad3525f203ae5dc1fa7636078e37f (patch)
tree1fdd47cc8af80c1f8f3886b323f2eb2bc18babf9 /runtime
parentda933a7e105acf814d5e7955d39d29eab3a96613 (diff)
downloadrsyslog-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.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c18
1 files changed, 12 insertions, 6 deletions
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;