summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-28 17:20:36 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-28 17:20:36 +0100
commita5f5648f75d01aaea3ec8c07c55d80ad86579ed2 (patch)
treed27660f07d04bb4dfc5e4a3a41226b83b93210d7 /runtime/msg.c
parent54a58d6f2343c1e6ca5a00b5c6d11eb9b81a74eb (diff)
downloadrsyslog-a5f5648f75d01aaea3ec8c07c55d80ad86579ed2.tar.gz
rsyslog-a5f5648f75d01aaea3ec8c07c55d80ad86579ed2.tar.bz2
rsyslog-a5f5648f75d01aaea3ec8c07c55d80ad86579ed2.zip
refactor: simplify localHostName property handling
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 9f5bcde2..f795242f 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 MsgSetRcvFromWithoutAddRef(msg_t *pThis, prop_t *new)
+void MsgSetRcvFrom(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 */
- MsgSetRcvFromWithoutAddRef(pMsg, localName);
+ MsgSetRcvFrom(pMsg, localName);
MsgSetRcvFromIPWithoutAddRef(pMsg, ip);
}
}
@@ -2263,19 +2263,6 @@ 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