summaryrefslogtreecommitdiffstats
path: root/tcpsyslog.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-18 08:03:10 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-18 08:03:10 +0000
commit37dc5101883283ff2628e899449384154bcb8fcd (patch)
tree9c90c1b0bcdb2c3a1dfd914ed6daf6ca43653794 /tcpsyslog.c
parent8550278ca48b2953db359e6bb00df562db6961a1 (diff)
downloadrsyslog-37dc5101883283ff2628e899449384154bcb8fcd.tar.gz
rsyslog-37dc5101883283ff2628e899449384154bcb8fcd.tar.xz
rsyslog-37dc5101883283ff2628e899449384154bcb8fcd.zip
- changed interface "printchopped()" so that it looks more like a generic
message submission interface. Part of the ongoing modularization effort. - bugfix: invalid kernel log format -- see bug http://bugzilla.adiscon.com/show_bug.cgi?id=1
Diffstat (limited to 'tcpsyslog.c')
-rw-r--r--tcpsyslog.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tcpsyslog.c b/tcpsyslog.c
index f8620e38..c02d44fc 100644
--- a/tcpsyslog.c
+++ b/tcpsyslog.c
@@ -564,8 +564,8 @@ void TCPSessPrepareClose(int iTCPSess)
* this case.
*/
dbgprintf("Extra data at end of stream in legacy syslog/tcp message - processing\n");
- printchopped(pTCPSessions[iTCPSess].fromHost, pTCPSessions[iTCPSess].msg,
- pTCPSessions[iTCPSess].iMsg, pTCPSessions[iTCPSess].sock, 1);
+ parseAndSubmitMessage(pTCPSessions[iTCPSess].fromHost, pTCPSessions[iTCPSess].msg,
+ pTCPSessions[iTCPSess].iMsg, MSG_PARSE_HOSTNAME);
pTCPSessions[iTCPSess].bAtStrtOfFram = 1;
}
}
@@ -703,8 +703,7 @@ int TCPSessDataRcvd(int iTCPSess, char *pData, int iLen)
/* emergency, we now need to flush, no matter if
* we are at end of message or not...
*/
- printchopped(pTCPSessions[iTCPSess].fromHost, pMsg, iMsg,
- pTCPSessions[iTCPSess].sock, 1);
+ parseAndSubmitMessage(pTCPSessions[iTCPSess].fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME);
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
@@ -715,8 +714,7 @@ int TCPSessDataRcvd(int iTCPSess, char *pData, int iLen)
if(*pData == '\n' &&
pTCPSessions[iTCPSess].eFraming == TCP_FRAMING_OCTET_STUFFING) { /* record delemiter? */
- printchopped(pTCPSessions[iTCPSess].fromHost, pMsg, iMsg,
- pTCPSessions[iTCPSess].sock, 1);
+ parseAndSubmitMessage(pTCPSessions[iTCPSess].fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME);
iMsg = 0;
pTCPSessions[iTCPSess].bAtStrtOfFram = 1;
++pData;
@@ -730,8 +728,7 @@ int TCPSessDataRcvd(int iTCPSess, char *pData, int iLen)
pTCPSessions[iTCPSess].iOctetsRemain--;
if(pTCPSessions[iTCPSess].iOctetsRemain < 1) {
/* we have end of frame! */
- printchopped(pTCPSessions[iTCPSess].fromHost, pMsg, iMsg,
- pTCPSessions[iTCPSess].sock, 1);
+ parseAndSubmitMessage(pTCPSessions[iTCPSess].fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME);
iMsg = 0;
pTCPSessions[iTCPSess].bAtStrtOfFram = 1;
}