diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-23 10:29:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-23 10:29:15 +0200 |
commit | 7b1a570d54ac4c82325aeeee70d7a8871ecd688a (patch) | |
tree | 68b2ab1fc7f85f7eca8d9d0d8270074c6cfb6bce /plugins/imtcp | |
parent | 716ab25446cd45ec8117264e51b5018f9a813d4e (diff) | |
download | rsyslog-7b1a570d54ac4c82325aeeee70d7a8871ecd688a.tar.gz rsyslog-7b1a570d54ac4c82325aeeee70d7a8871ecd688a.tar.xz rsyslog-7b1a570d54ac4c82325aeeee70d7a8871ecd688a.zip |
changed Rcv-Interface in tcpsrv subsystem
It is now iRet based. This enables us to communicate
more in-depth information to the upper peers. This is needed
to handle the EGAIN case on rcv (not yet implemented)
Diffstat (limited to 'plugins/imtcp')
-rw-r--r-- | plugins/imtcp/imtcp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c index d50d80e9..4d31744d 100644 --- a/plugins/imtcp/imtcp.c +++ b/plugins/imtcp/imtcp.c @@ -101,16 +101,17 @@ doOpenLstnSocks(tcpsrv_t *pSrv) } -static int -doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf) +static rsRetVal +doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) { - ssize_t state; + DEFiRet; assert(pSess != NULL); + assert(piLenRcvd != NULL); - state = lenBuf; - if(netstrm.Rcv(pSess->pStrm, (uchar*) buf, &state) != RS_RET_OK) - state = -1; // TODO: move this function to an iRet interface! 2008-04-23 - return state; + *piLenRcvd = lenBuf; + CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd) != RS_RET_OK); +finalize_it: + RETiRet; } static rsRetVal @@ -167,7 +168,6 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa CHKiRet(tcpsrv.SetDrvrMode(pOurTcpsrv, iStrmDrvrMode)); /* now set optional params, but only if they were actually configured */ if(pszStrmDrvrAuthMode != NULL) { -RUNLOG_VAR("%s", pszStrmDrvrAuthMode); CHKiRet(tcpsrv.SetDrvrAuthMode(pOurTcpsrv, pszStrmDrvrAuthMode)); } if(pPermPeersRoot != NULL) { |