summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-29 16:22:20 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-29 16:22:20 +0100
commit343df920c9b1b469daefde1688459234e4b29d73 (patch)
treed4cb2f72da036dbe07130b7d42a0e15e5dbf9363 /runtime/msg.c
parent64a4358384699478babd8bd90c724c171b1c549f (diff)
parentffc64138fdc6a40b0ee4dca290900ca4a3965f24 (diff)
downloadrsyslog-343df920c9b1b469daefde1688459234e4b29d73.tar.gz
rsyslog-343df920c9b1b469daefde1688459234e4b29d73.tar.bz2
rsyslog-343df920c9b1b469daefde1688459234e4b29d73.zip
Merge branch 'master' into master-ruleeng
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 21ab18e5..5df4e031 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -359,7 +359,7 @@ MsgSetRcvFromIPWithoutAddRef(msg_t *pThis, prop_t *new)
/* set RcvFrom name in msg object WITHOUT calling AddRef.
* rgerhards, 2013-01-22
*/
-void MsgSetRcvFrom(msg_t *pThis, prop_t *new)
+void MsgSetRcvFromWithoutAddRef(msg_t *pThis, prop_t *new)
{
assert(pThis != NULL);
@@ -401,7 +401,7 @@ resolveDNS(msg_t *pMsg) {
localRet = net.cvthname(pMsg->rcvFrom.pfrominet, &localName, NULL, &ip);
if(localRet == RS_RET_OK) {
/* we pass down the props, so no need for AddRef */
- MsgSetRcvFrom(pMsg, localName);
+ MsgSetRcvFromWithoutAddRef(pMsg, localName);
MsgSetRcvFromIPWithoutAddRef(pMsg, ip);
}
}
@@ -2244,6 +2244,18 @@ finalize_it:
RETiRet;
}
+/* rgerhards 2008-09-10: set RcvFrom name in msg object. This calls AddRef()
+ * on the property, because this must be done in all current cases and there
+ * is no case expected where this may not be necessary.
+ * rgerhards, 2009-06-30
+ */
+void MsgSetRcvFrom(msg_t *pThis, prop_t *new)
+{
+ prop.AddRef(new);
+ MsgSetRcvFromWithoutAddRef(pThis, new);
+}
+
+
/* This is used to set the property via a string. This function should not be
* called if there is a reliable way for a caller to make sure that the
* same name can be used across multiple messages. However, if it can not