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_ptcp.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/nsd_ptcp.c') diff --git a/runtime/nsd_ptcp.c b/runtime/nsd_ptcp.c index ff85619a..93be8081 100644 --- a/runtime/nsd_ptcp.c +++ b/runtime/nsd_ptcp.c @@ -535,6 +535,13 @@ Rcv(nsd_t *pNsd, uchar *pRcvBuf, ssize_t *pLenBuf) *pLenBuf = recv(pThis->sock, pRcvBuf, *pLenBuf, MSG_DONTWAIT); + if(*pLenBuf == 0) { + ABORT_FINALIZE(RS_RET_CLOSED); + } else if (*pLenBuf < 0) { + ABORT_FINALIZE(RS_RET_ERR); + } + +finalize_it: RETiRet; } -- cgit