summaryrefslogtreecommitdiffstats
path: root/tcps_sess.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-03-19 15:28:25 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-03-19 15:28:25 +0100
commit4fb7ba113c4d4afd485feb2729c5ff67bc8ddd4a (patch)
treee585d52baf5a7e4323da7f3b893027c38e9ca3d2 /tcps_sess.c
parent7d516b0a6c46177c18aea30b4617f1d2712d48fd (diff)
downloadrsyslog-4fb7ba113c4d4afd485feb2729c5ff67bc8ddd4a.tar.gz
rsyslog-4fb7ba113c4d4afd485feb2729c5ff67bc8ddd4a.tar.xz
rsyslog-4fb7ba113c4d4afd485feb2729c5ff67bc8ddd4a.zip
added configuration directive to disable octet-counted framing
... for imtcp, directive is $InputTCPServerSupportOctetCountedFraming
Diffstat (limited to 'tcps_sess.c')
-rw-r--r--tcps_sess.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcps_sess.c b/tcps_sess.c
index 854d3742..87de6c01 100644
--- a/tcps_sess.c
+++ b/tcps_sess.c
@@ -199,6 +199,8 @@ SetLstnInfo(tcps_sess_t *pThis, tcpLstnPortList_t *pLstnInfo)
ISOBJ_TYPE_assert(pThis, tcps_sess);
assert(pLstnInfo != NULL);
pThis->pLstnInfo = pLstnInfo;
+ /* set cached elements */
+ pThis->bSuppOctetFram = pLstnInfo->bSuppOctetFram;
RETiRet;
}
@@ -363,7 +365,7 @@ processDataRcvd(tcps_sess_t *pThis, char c, struct syslogTime *stTime, time_t tt
ISOBJ_TYPE_assert(pThis, tcps_sess);
if(pThis->inputState == eAtStrtFram) {
- if(isdigit((int) c)) {
+ if(pThis->bSuppOctetFram && isdigit((int) c)) {
pThis->inputState = eInOctetCnt;
pThis->iOctetsRemain = 0;
pThis->eFraming = TCP_FRAMING_OCTET_COUNTING;