summaryrefslogtreecommitdiffstats
path: root/runtime/nsd_ptcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-06-24 18:27:52 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-06-24 18:27:52 +0200
commit75063e54b2a95416c0fd32b2ae1df9b8db776b5c (patch)
treecd4b0105a50585619be814a197c69723de3a9fa7 /runtime/nsd_ptcp.c
parentdd3e2cae9d3df243ed68c0bed1523a3b891eb893 (diff)
downloadrsyslog-75063e54b2a95416c0fd32b2ae1df9b8db776b5c.tar.gz
rsyslog-75063e54b2a95416c0fd32b2ae1df9b8db776b5c.tar.xz
rsyslog-75063e54b2a95416c0fd32b2ae1df9b8db776b5c.zip
bugfix: gtls und ptcp netstream driver communicated invalid iRet
This was introduced due to recent interface change.
Diffstat (limited to 'runtime/nsd_ptcp.c')
-rw-r--r--runtime/nsd_ptcp.c7
1 files changed, 7 insertions, 0 deletions
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;
}