From 75063e54b2a95416c0fd32b2ae1df9b8db776b5c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 24 Jun 2008 18:27:52 +0200 Subject: bugfix: gtls und ptcp netstream driver communicated invalid iRet This was introduced due to recent interface change. --- runtime/nsd_gtls.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'runtime/nsd_gtls.c') diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 2bb8f3d9..8e95eca8 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -1457,11 +1457,13 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) /* now check if we have something in our buffer. If so, we satisfy * the request from buffer contents. */ + if(pThis->lenRcvBuf == -1) { /* no data present, must read */ + CHKiRet(gtlsRecordRecv(pThis)); + } + if(pThis->lenRcvBuf == 0) { /* EOS */ *pLenBuf = 0; - FINALIZE; - } else if(pThis->lenRcvBuf == -1) { /* no data present, must read */ - CHKiRet(gtlsRecordRecv(pThis)); + ABORT_FINALIZE(RS_RET_CLOSED); } /* if we reach this point, data is present in the buffer and must be copied */ -- cgit