summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/glbl.c1
-rw-r--r--runtime/msg.c16
-rw-r--r--runtime/ruleset.c6
3 files changed, 17 insertions, 6 deletions
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 17ae0451..e1d4e92d 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -447,7 +447,6 @@ finalize_it:
static prop_t*
GetLocalHostNameProp(void)
{
- prop.AddRef(propLocalHostName);
return(propLocalHostName);
}
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
diff --git a/runtime/ruleset.c b/runtime/ruleset.c
index 3e5223f9..db253d28 100644
--- a/runtime/ruleset.c
+++ b/runtime/ruleset.c
@@ -446,9 +446,9 @@ evalPROPFILT(struct cnfstmt *stmt, msg_t *pMsg)
} else if(stmt->d.s_propfilt.prop.id == PROP_LOCAL_VAR) {
DBGPRINTF("Filter: check for local var '%s' (value '%s') ",
stmt->d.s_propfilt.prop.name, pszPropVal);
- //} else if(stmt->d.s_propfilt.propID == PROP_GLOBAL_VAR) {
- //DBGPRINTF("Filter: check for global var '%s' (value '%s') ",
- //stmt->d.s_propfilt.propName, pszPropVal);
+ } else if(stmt->d.s_propfilt.prop.id == PROP_GLOBAL_VAR) {
+ DBGPRINTF("Filter: check for global var '%s' (value '%s') ",
+ stmt->d.s_propfilt.prop.name, pszPropVal);
} else {
DBGPRINTF("Filter: check for property '%s' (value '%s') ",
propIDToName(stmt->d.s_propfilt.prop.id), pszPropVal);