diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-24 17:44:16 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-24 17:44:16 +0200 |
commit | dd3e2cae9d3df243ed68c0bed1523a3b891eb893 (patch) | |
tree | a733f9f7e37199661c36710e07b07ebd6ff7d6f8 | |
parent | b5d8f5d96aeff3e95cac135f9250da6e9d799382 (diff) | |
download | rsyslog-dd3e2cae9d3df243ed68c0bed1523a3b891eb893.tar.gz rsyslog-dd3e2cae9d3df243ed68c0bed1523a3b891eb893.tar.xz rsyslog-dd3e2cae9d3df243ed68c0bed1523a3b891eb893.zip |
improved gtls error reporting
-rw-r--r-- | runtime/nsd_gtls.c | 4 | ||||
-rw-r--r-- | tcpsrv.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 5646c2cf..2bb8f3d9 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -498,7 +498,9 @@ gtlsRecordRecv(nsd_gtls_t *pThis) int gnuRet; /* TODO: build a specific function for GnuTLS error reporting */ CHKgnutls(lenRcvd); /* this will abort the function */ } + finalize_it: + dbgprintf("gtlsRecordRecv return. nsd %p, iRet %d, lenRcvd %d, lenRcvBuf %d, ptrRcvBuf %d\n", pThis, iRet, lenRcvd, pThis->lenRcvBuf, pThis->ptrRcvBuf); RETiRet; } @@ -1128,7 +1130,6 @@ gtlsSetTransportPtr(nsd_gtls_t *pThis, int sock) BEGINobjConstruct(nsd_gtls) /* be sure to specify the object type also in END macro! */ iRet = nsd_ptcp.Construct(&pThis->pTcp); pThis->bReportAuthErr = 1; -//pThis->lenRcvBuf = -1; /* important: -1 means not read, 0 means connection close! */ CHKiRet(gtlsAddOurCert()); finalize_it: ENDobjConstruct(nsd_gtls) @@ -1476,6 +1477,7 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) *pLenBuf = iBytesCopy; finalize_it: + dbgprintf("gtlsRcv return. nsd %p, iRet %d, lenRcvBuf %d, ptrRcvBuf %d\n", pThis, iRet, pThis->lenRcvBuf, pThis->ptrRcvBuf); RETiRet; } @@ -478,8 +478,8 @@ Run(tcpsrv_t *pThis) break; default: errno = 0; - errmsg.LogError(NO_ERRCODE, "netstream session %p will be closed due to error\n", - pThis->pSessions[iTCPSess]->pStrm); + errmsg.LogError(NO_ERRCODE, "netstream session %p will be closed due to error [%d]\n", + pThis->pSessions[iTCPSess]->pStrm, iRet); pThis->pOnErrClose(pThis->pSessions[iTCPSess]); tcps_sess.Destruct(&pThis->pSessions[iTCPSess]); break; |