diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-02-01 22:58:30 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-02-01 22:58:30 +0100 |
commit | bea499dcb2747d1f5b42eae4978cfe86a37dc957 (patch) | |
tree | f10f76b45621bf081572aa76641b308c564aebce /tcpsrv.c | |
parent | fd256a09ffa109120304d293cf6faf808c5a1a21 (diff) | |
download | rsyslog-bea499dcb2747d1f5b42eae4978cfe86a37dc957.tar.gz rsyslog-bea499dcb2747d1f5b42eae4978cfe86a37dc957.tar.xz rsyslog-bea499dcb2747d1f5b42eae4978cfe86a37dc957.zip |
(somewhat) improved TLS subsystem
- improved TLS error reporting
- improved TLS startup (Diffie-Hellman bits do not need to be generated,
as we do not support full anon key exchange -- we always need certs)
Diffstat (limited to 'tcpsrv.c')
-rw-r--r-- | tcpsrv.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -577,10 +577,14 @@ processWorksetItem(tcpsrv_t *pThis, nspoll_t *pPoll, int idx, void *pUsr) if(pUsr == pThis->ppLstn) { //printf("work item %p: connect\n", pUsr); DBGPRINTF("New connect on NSD %p.\n", pThis->ppLstn[idx]); - SessAccept(pThis, pThis->ppLstnPort[idx], &pNewSess, pThis->ppLstn[idx]); - if(pPoll != NULL) - CHKiRet(nspoll.Ctl(pPoll, pNewSess->pStrm, 0, pNewSess, NSDPOLL_IN, NSDPOLL_ADD)); - DBGPRINTF("New session created with NSD %p.\n", pNewSess); + iRet = SessAccept(pThis, pThis->ppLstnPort[idx], &pNewSess, pThis->ppLstn[idx]); + if(iRet == RS_RET_OK) { + if(pPoll != NULL) + CHKiRet(nspoll.Ctl(pPoll, pNewSess->pStrm, 0, pNewSess, NSDPOLL_IN, NSDPOLL_ADD)); + DBGPRINTF("New session created with NSD %p.\n", pNewSess); + } else { + DBGPRINTF("tcpsrv: error %d during accept\n", iRet); + } } else { //printf("work item %p: receive\n", pUsr); pNewSess = (tcps_sess_t*) pUsr; |