diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-06-27 12:33:26 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-06-27 12:33:26 +0200 |
commit | 8488d8c3c1e65cb4dacb1dddc71c9186ec9f8f37 (patch) | |
tree | 9f612b2808a1590e48cd0f43cb85efca3bb6f83f /plugins/imtcp | |
parent | 2bd4e10a4dc909346d5a010edefb12c65ed77aec (diff) | |
parent | 47729f3b9362f7956c936088ac4bb703633cb33b (diff) | |
download | rsyslog-8488d8c3c1e65cb4dacb1dddc71c9186ec9f8f37.tar.gz rsyslog-8488d8c3c1e65cb4dacb1dddc71c9186ec9f8f37.tar.xz rsyslog-8488d8c3c1e65cb4dacb1dddc71c9186ec9f8f37.zip |
Merge branch 'v5-devel'
Conflicts:
ChangeLog
configure.ac
doc/manual.html
plugins/imfile/imfile.c
plugins/imklog/imklog.c
plugins/imptcp/imptcp.c
plugins/imtcp/imtcp.c
plugins/imuxsock/imuxsock.c
plugins/mmsnmptrapd/mmsnmptrapd.c
tools/omfile.c
Diffstat (limited to 'plugins/imtcp')
-rw-r--r-- | plugins/imtcp/imtcp.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c index 976fbf1f..142f0791 100644 --- a/plugins/imtcp/imtcp.c +++ b/plugins/imtcp/imtcp.c @@ -88,6 +88,7 @@ static struct configSettings_s { int iTCPSessMax; int iTCPLstnMax; int iStrmDrvrMode; + int bKeepAlive; int bEmitMsgOnClose; int iAddtlFrameDelim; int bDisableLFDelim; @@ -112,10 +113,11 @@ struct modConfData_s { int iTCPSessMax; /* max number of sessions */ int iTCPLstnMax; /* max number of sessions */ int iStrmDrvrMode; /* mode for stream driver, driver-dependent (0 mostly means plain tcp) */ - int bEmitMsgOnClose; /* emit an informational message on close by remote peer */ int iAddtlFrameDelim; /* addtl frame delimiter, e.g. for netscreen, default none */ - int bDisableLFDelim; /* disable standard LF delimiter */ - int bUseFlowControl; /* use flow control, what means indicate ourselfs a "light delayable" */ + sbool bDisableLFDelim; /* disable standard LF delimiter */ + sbool bUseFlowControl; /* use flow control, what means indicate ourselfs a "light delayable" */ + sbool bKeepAlive; + sbool bEmitMsgOnClose; /* emit an informational message on close by remote peer */ uchar *pszStrmDrvrAuthMode; /* authentication mode to use */ }; @@ -249,6 +251,7 @@ addListner(modConfData_t *modConf, instanceConf_t *inst) CHKiRet(tcpsrv.SetCBOnRegularClose(pOurTcpsrv, onRegularClose)); CHKiRet(tcpsrv.SetCBOnErrClose(pOurTcpsrv, onErrClose)); /* params */ + CHKiRet(tcpsrv.SetKeepAlive(pOurTcpsrv, modConf->bKeepAlive)); CHKiRet(tcpsrv.SetSessMax(pOurTcpsrv, modConf->iTCPSessMax)); CHKiRet(tcpsrv.SetLstnMax(pOurTcpsrv, modConf->iTCPLstnMax)); CHKiRet(tcpsrv.SetDrvrMode(pOurTcpsrv, modConf->iStrmDrvrMode)); @@ -300,6 +303,7 @@ CODESTARTendCnfLoad pModConf->iAddtlFrameDelim = cs.iAddtlFrameDelim; pModConf->bDisableLFDelim = cs.bDisableLFDelim; pModConf->bUseFlowControl = cs.bUseFlowControl; + pModConf->bKeepAlive = cs.bKeepAlive; if((cs.pszStrmDrvrAuthMode == NULL) || (cs.pszStrmDrvrAuthMode[0] == '\0')) { loadModConf->pszStrmDrvrAuthMode = NULL; free(cs.pszStrmDrvrAuthMode); @@ -409,6 +413,7 @@ resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unus cs.iTCPLstnMax = 20; cs.iStrmDrvrMode = 0; cs.bUseFlowControl = 0; + cs.bKeepAlive = 0; cs.bEmitMsgOnClose = 0; cs.iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; cs.bDisableLFDelim = 0; @@ -446,6 +451,8 @@ CODEmodInit_QueryRegCFSLineHdlr /* register config file handlers */ CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserverrun"), 0, eCmdHdlrGetWord, addInstance, NULL, STD_LOADABLE_MODULE_ID, eConfObjGlobal)); + CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserverkeepalive"), 0, eCmdHdlrBinary, + NULL, &cs.bKeepAlive, STD_LOADABLE_MODULE_ID, eConfObjGlobal)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxsessions"), 0, eCmdHdlrInt, NULL, &cs.iTCPSessMax, STD_LOADABLE_MODULE_ID, eConfObjGlobal)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxlisteners"), 0, eCmdHdlrInt, |