summaryrefslogtreecommitdiffstats
path: root/plugins/imtcp/imtcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-03-19 18:10:20 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-03-19 18:10:20 +0100
commit2ee2cff538edd5e2b70a03fcef76e25b2072e432 (patch)
tree43724318361efc2ebb6cbe037295e09d4796a815 /plugins/imtcp/imtcp.c
parent1d0dec9b0cf1203dec0cacc0c6eb38d2ac9271ea (diff)
parent4fb7ba113c4d4afd485feb2729c5ff67bc8ddd4a (diff)
downloadrsyslog-2ee2cff538edd5e2b70a03fcef76e25b2072e432.tar.gz
rsyslog-2ee2cff538edd5e2b70a03fcef76e25b2072e432.tar.bz2
rsyslog-2ee2cff538edd5e2b70a03fcef76e25b2072e432.zip
Merge branch 'v5-stable-newstats' into v5-devel
Conflicts: ChangeLog plugins/imtcp/imtcp.c tcpsrv.h
Diffstat (limited to 'plugins/imtcp/imtcp.c')
-rw-r--r--plugins/imtcp/imtcp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index e9961af7..59dbd449 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -84,6 +84,7 @@ static permittedPeers_t *pPermPeersRoot = NULL;
/* config settings */
static int bKeepAlive = 0; /* support keep-alive packets */
static int iTCPSessMax = 200; /* max number of sessions */
+static int bSuppOctetFram = 1; /* octet counted TCP framing supported? */
static int iTCPLstnMax = 20; /* max number of sessions */
static int iStrmDrvrMode = 0; /* mode for stream driver, driver-dependent (0 mostly means plain tcp) */
static int bEmitMsgOnClose = 0; /* emit an informational message on close by remote peer */
@@ -219,7 +220,7 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa
CHKiRet(tcpsrv.SetRuleset(pOurTcpsrv, pBindRuleset));
CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, pszInputName == NULL ?
UCHAR_CONSTANT("imtcp") : pszInputName));
- tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal);
+ tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, bSuppOctetFram);
finalize_it:
if(iRet != RS_RET_OK) {
@@ -292,6 +293,7 @@ resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unus
{
iTCPSessMax = 200;
bKeepAlive = 0;
+ bSuppOctetFram = 1;
iTCPLstnMax = 20;
iStrmDrvrMode = 0;
bUseFlowControl = 0;
@@ -332,6 +334,8 @@ CODEmodInit_QueryRegCFSLineHdlr
addTCPListener, NULL, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserverkeepalive"), 0, eCmdHdlrBinary,
NULL, &bKeepAlive, STD_LOADABLE_MODULE_ID));
+ CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserversupportoctetcountedframing"), 0, eCmdHdlrBinary,
+ NULL, &bSuppOctetFram, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxsessions"), 0, eCmdHdlrInt,
NULL, &iTCPSessMax, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxlisteners"), 0, eCmdHdlrInt,