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 /runtime/nsd_gtls.c | |
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 'runtime/nsd_gtls.c')
-rw-r--r-- | runtime/nsd_gtls.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index fad84689..75887913 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -1388,9 +1388,15 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) /* in TLS mode now */ lenRcvd = gnutls_record_recv(pThis->sess, pBuf, *pLenBuf); if(lenRcvd < 0) { - int gnuRet; /* TODO: build a specific function for GnuTLS error reporting */ - *pLenBuf = -1; - CHKgnutls(lenRcvd); /* this will abort the function */ + if(lenRcvd == GNUTLS_E_AGAIN || lenRcvd == GNUTLS_E_INTERRUPTED) { + pThis->rtryCall = gtlsRtry_recv; + dbgprintf("GnuTLS receive requires a retry (this most probably is OK and no error condition)\n"); + iRet = RS_RET_RETRY; + } else { + int gnuRet; /* TODO: build a specific function for GnuTLS error reporting */ + *pLenBuf = -1; + CHKgnutls(lenRcvd); /* this will abort the function */ + } } *pLenBuf = lenRcvd; |