diff options
author | Michael Biebl <biebl@debian.org> | 2014-06-04 22:22:46 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2014-06-04 22:22:46 +0200 |
commit | daeb0d03d4a65fa118ad25b34958fb9cacbbd6f4 (patch) | |
tree | 0c0d778c5d2f16d8dcc04e89b44a75e02769fa67 /tcps_sess.c | |
parent | f1040389ccb2430b9ab2ba3209aa28a62565b721 (diff) | |
download | rsyslog-daeb0d03d4a65fa118ad25b34958fb9cacbbd6f4.tar.gz |
Imported Upstream version 8.2.2upstream/8.2.2
Diffstat (limited to 'tcps_sess.c')
-rw-r--r-- | tcps_sess.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tcps_sess.c b/tcps_sess.c index 1adf585..4d18b01 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -59,8 +59,6 @@ DEFobjCurrIf(netstrm) DEFobjCurrIf(prop) DEFobjCurrIf(datetime) -static int iMaxLine; /* maximum size of a single message */ - /* forward definitions */ static rsRetVal Close(tcps_sess_t *pThis); @@ -72,7 +70,7 @@ BEGINobjConstruct(tcps_sess) /* be sure to specify the object type also in END m pThis->bAtStrtOfFram = 1; /* indicate frame header expected */ pThis->eFraming = TCP_FRAMING_OCTET_STUFFING; /* just make sure... */ /* now allocate the message reception buffer */ - CHKmalloc(pThis->pMsg = (uchar*) MALLOC(sizeof(uchar) * iMaxLine + 1)); + CHKmalloc(pThis->pMsg = (uchar*) MALLOC(sizeof(uchar) * glbl.GetMaxLine() + 1)); finalize_it: ENDobjConstruct(tcps_sess) @@ -358,6 +356,7 @@ processDataRcvd(tcps_sess_t *pThis, char c, struct syslogTime *stTime, time_t tt { DEFiRet; ISOBJ_TYPE_assert(pThis, tcps_sess); + int iMaxLine = glbl.GetMaxLine(); if(pThis->inputState == eAtStrtFram) { if(pThis->bSuppOctetFram && c >= '0' && c <= '9') { @@ -547,7 +546,6 @@ BEGINObjClassInit(tcps_sess, 1, OBJ_IS_CORE_MODULE) /* class, version - CHANGE c CHKiRet(objUse(prop, CORE_COMPONENT)); CHKiRet(objUse(glbl, CORE_COMPONENT)); - iMaxLine = glbl.GetMaxLine(); /* get maximum size we currently support */ objRelease(glbl, CORE_COMPONENT); /* set our own handlers */ |