diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-10 15:59:53 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-10 15:59:53 +0200 |
commit | 262f61d869b95f63b393ae48d683b13e70322478 (patch) | |
tree | 8f8a5346df5bd50af7c4b0b71347481287ea0921 /tcps_sess.c | |
parent | 1d97cb00bdb349e3d7b275607f3d31a61abdf02e (diff) | |
download | rsyslog-262f61d869b95f63b393ae48d683b13e70322478.tar.gz rsyslog-262f61d869b95f63b393ae48d683b13e70322478.tar.bz2 rsyslog-262f61d869b95f63b393ae48d683b13e70322478.zip |
added properties "inputname" and "$myhostname"
- added message property "inputname", which contains the name of the
input (module) that generated it. Presence is depending on suport in
each input module (else it is blank).
- added system property "$myhostname", which contains the name of the
local host as it knows itself.
Diffstat (limited to 'tcps_sess.c')
-rw-r--r-- | tcps_sess.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tcps_sess.c b/tcps_sess.c index 0cb23fd0..f5420fc0 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -229,7 +229,8 @@ PrepareClose(tcps_sess_t *pThis) * this case. */ dbgprintf("Extra data at end of stream in legacy syslog/tcp message - processing\n"); - parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY); + parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, MSG_PARSE_HOSTNAME, + NOFLAG, eFLOWCTL_LIGHT_DELAY, NULL); /* TODO: add real InputName */ pThis->bAtStrtOfFram = 1; } @@ -311,7 +312,8 @@ processDataRcvd(tcps_sess_t *pThis, char c) if(pThis->iMsg >= iMaxLine) { /* emergency, we now need to flush, no matter if we are at end of message or not... */ dbgprintf("error: message received is larger than max msg size, we split it\n"); - parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY); + parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, + MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY, NULL); /* TODO: add real InputName */ pThis->iMsg = 0; /* we might think if it is better to ignore the rest of the * message than to treat it as a new one. Maybe this is a good @@ -321,7 +323,8 @@ processDataRcvd(tcps_sess_t *pThis, char c) } if(c == '\n' && pThis->eFraming == TCP_FRAMING_OCTET_STUFFING) { /* record delemiter? */ - parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY); + parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, + MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY, NULL); /* TODO: add real InputName */ pThis->iMsg = 0; pThis->inputState = eAtStrtFram; } else { @@ -339,7 +342,8 @@ processDataRcvd(tcps_sess_t *pThis, char c) pThis->iOctetsRemain--; if(pThis->iOctetsRemain < 1) { /* we have end of frame! */ - parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY); + parseAndSubmitMessage(pThis->fromHost, pThis->fromHostIP, pThis->pMsg, pThis->iMsg, + MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY, NULL); /* TODO: add real InputName */ pThis->iMsg = 0; pThis->inputState = eAtStrtFram; } |