summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-30 18:53:21 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-30 18:53:21 +0200
commitda889001432c7a9242d8a6ef947fe6887dc366f3 (patch)
treeac25db9964e73292a06c0a5cbe99b106889eb32e /plugins
parent7350595761d32b93c6ae0e2d31cbcb880371fd9c (diff)
downloadrsyslog-da889001432c7a9242d8a6ef947fe6887dc366f3.tar.gz
rsyslog-da889001432c7a9242d8a6ef947fe6887dc366f3.tar.xz
rsyslog-da889001432c7a9242d8a6ef947fe6887dc366f3.zip
added $InputTCPServerStreamDriverMode config directive
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imtcp/imtcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index a9924365..1bf30493 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -62,6 +62,7 @@ static tcpsrv_t *pOurTcpsrv = NULL; /* our TCP server(listener) TODO: change fo
/* config settings */
static int iTCPSessMax = 200; /* max number of sessions */
+static int iStrmDrvrMode = 0; /* mode for stream driver, driver-dependent (0 mostly means plain tcp) */
/* callbacks */
@@ -131,6 +132,7 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa
CHKiRet(tcpsrv.SetCBOpenLstnSocks(pOurTcpsrv, doOpenLstnSocks));
CHKiRet(tcpsrv.SetCBOnRegularClose(pOurTcpsrv, onRegularClose));
CHKiRet(tcpsrv.SetCBOnErrClose(pOurTcpsrv, onErrClose));
+ CHKiRet(tcpsrv.SetDrvrMode(pOurTcpsrv, iStrmDrvrMode));
tcpsrv.configureTCPListen(pOurTcpsrv, (char *) pNewVal);
CHKiRet(tcpsrv.ConstructFinalize(pOurTcpsrv));
}
@@ -194,6 +196,7 @@ static rsRetVal
resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
{
iTCPSessMax = 200;
+ iStrmDrvrMode = 0;
return RS_RET_OK;
}
@@ -222,6 +225,8 @@ CODEmodInit_QueryRegCFSLineHdlr
addTCPListener, NULL, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"inputtcpmaxsessions", 0, eCmdHdlrInt,
NULL, &iTCPSessMax, STD_LOADABLE_MODULE_ID));
+ CHKiRet(regCfSysLineHdlr((uchar *)"inputtcpserverstreamdrivermode", 0,
+ eCmdHdlrInt, NULL, &iStrmDrvrMode, NULL));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler,
resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID));
ENDmodInit