summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog2
-rw-r--r--runtime/msg.c18
2 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e5e3296..3a17f28e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;