> http://lists.adiscon.net/pipermail/rsyslog/2012-July/015259.html
>
> which seems to be a better solution.
but that's terminates tcp server because of goto in chkiret ;(
diff -rua a/tcpsrv.c rsyslog.addiscon/tcpsrv.c
--- a/tcpsrv.c 2012-08-09 11:17:37.000000000 +0200
+++ b/tcpsrv.c 2012-08-09 11:20:29.664620491 +0200
@@ -695,9 +695,12 @@
if(pUsr == pThis->ppLstn) {
DBGPRINTF("New connect on NSD %p.\n", pThis->ppLstn[i]);
- SessAccept(pThis, pThis->ppLstnPort[i], &pNewSess,
pThis->ppLstn[i]);
- CHKiRet(nspoll.Ctl(pPoll, pNewSess->pStrm, 0, pNewSess,
NSDPOLL_IN, NSDPOLL_ADD));
- DBGPRINTF("New session created with NSD %p.\n",
pNewSess);
+ if( SessAccept(pThis, pThis->ppLstnPort[i], &pNewSess,
pThis->ppLstn[i]) == RS_RET_OK) {
+ DBGPRINTF("New session created with NSD %p.\n",
pNewSess);
+ CHKiRet(nspoll.Ctl(pPoll, pNewSess->pStrm, 0,
pNewSess, NSDPOLL_IN, NSDPOLL_ADD));
+ } else {
+ DBGPRINTF("Failed to establish a new session with
NSD %p.\n", pNewSess);
+ }
} else {
pNewSess = (tcps_sess_t*) pUsr;
doReceive(pThis, &pNewSess, pPoll);
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards