summaryrefslogtreecommitdiffstats
path: root/tcps_sess.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-22 17:23:08 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-22 17:23:08 +0200
commit0fa5486a4ace7a9be82b37979cf4693aff237340 (patch)
tree6c1b10bca2629acc171c1bb8719ef9fe6202a5c0 /tcps_sess.c
parent737614054caadf8340b638b368d43f55b7bb3741 (diff)
parentaba90e82484118f3568ec51c01de5ba845da589a (diff)
downloadrsyslog-0fa5486a4ace7a9be82b37979cf4693aff237340.tar.gz
rsyslog-0fa5486a4ace7a9be82b37979cf4693aff237340.tar.bz2
rsyslog-0fa5486a4ace7a9be82b37979cf4693aff237340.zip
Merge branch 'master' into ultra-reliable
Conflicts: runtime/rsyslog.h tests/Makefile.am tools/syslogd.c
Diffstat (limited to 'tcps_sess.c')
-rw-r--r--tcps_sess.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/tcps_sess.c b/tcps_sess.c
index ceb6142f..c564caea 100644
--- a/tcps_sess.c
+++ b/tcps_sess.c
@@ -185,6 +185,18 @@ SetTcpsrv(tcps_sess_t *pThis, tcpsrv_t *pSrv)
}
+/* set our parent listener info*/
+static rsRetVal
+SetLstnInfo(tcps_sess_t *pThis, tcpLstnPortList_t *pLstnInfo)
+{
+ DEFiRet;
+ ISOBJ_TYPE_assert(pThis, tcps_sess);
+ assert(pLstnInfo != NULL);
+ pThis->pLstnInfo = pLstnInfo;
+ RETiRet;
+}
+
+
static rsRetVal
SetUsrP(tcps_sess_t *pThis, void *pUsr)
{
@@ -223,11 +235,11 @@ doSubmitMessage(tcps_sess_t *pThis)
CHKmalloc(pMsg->pszRawMsg = malloc(sizeof(uchar) * pThis->iMsg));
memcpy(pMsg->pszRawMsg, pThis->pMsg, pThis->iMsg);
pMsg->iLenRawMsg = pThis->iMsg;
- MsgSetInputName(pMsg, (char*)pThis->pSrv->pszInputName);
+ MsgSetInputName(pMsg, pThis->pLstnInfo->pszInputName);
MsgSetFlowControlType(pMsg, eFLOWCTL_LIGHT_DELAY);
pMsg->msgFlags = NEEDS_PARSING | PARSE_HOSTNAME;
pMsg->bParseHOSTNAME = 1;
- MsgSetRcvFrom(pMsg, (char*)pThis->fromHost);
+ MsgSetRcvFrom(pMsg, pThis->fromHost);
CHKiRet(MsgSetRcvFromIP(pMsg, pThis->fromHostIP));
CHKiRet(submitMsg(pMsg));
@@ -457,6 +469,7 @@ CODESTARTobjQueryInterface(tcps_sess)
pIf->SetUsrP = SetUsrP;
pIf->SetTcpsrv = SetTcpsrv;
+ pIf->SetLstnInfo = SetLstnInfo;
pIf->SetHost = SetHost;
pIf->SetHostIP = SetHostIP;
pIf->SetStrm = SetStrm;