From 27112b22416a603c6afe05e343359e1cf752b8a3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 16 Oct 2013 14:33:31 +0200 Subject: undo "localhostname property handling simplification", which broke things in v7.5, this is not a simplification but actually complicates things. While we could fix the effects by patching other places, the end result would be anything else but simpler. So we undid that change. --- runtime/msg.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'runtime/msg.c') diff --git a/runtime/msg.c b/runtime/msg.c index f795242f..fefe8648 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); } } @@ -2263,6 +2263,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 -- cgit v1.2.3