summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-05-02 11:57:29 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-05-02 11:57:29 +0200
commit579c61e579d9452682da51ec5e4b547684573807 (patch)
tree3a35286a2e79affa5b664b1df94f282f4ffe280e /runtime
parentd4539663f685910db1e8d7816508298b940c8590 (diff)
downloadrsyslog-579c61e579d9452682da51ec5e4b547684573807.tar.gz
rsyslog-579c61e579d9452682da51ec5e4b547684573807.tar.xz
rsyslog-579c61e579d9452682da51ec5e4b547684573807.zip
bugfix: a slightly more informative error message when a TCP
connections is aborted
Diffstat (limited to 'runtime')
-rw-r--r--runtime/strmsrv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/strmsrv.c b/runtime/strmsrv.c
index 3dc53a97..8cebf810 100644
--- a/runtime/strmsrv.c
+++ b/runtime/strmsrv.c
@@ -520,6 +520,7 @@ Run(strmsrv_t *pThis)
strms_sess_t *pNewSess;
nssel_t *pSel;
ssize_t iRcvd;
+ rsRetVal localRet;
ISOBJ_TYPE_assert(pThis, strmsrv);
@@ -579,11 +580,12 @@ Run(strmsrv_t *pThis)
break;
case RS_RET_OK:
/* valid data received, process it! */
- if(strms_sess.DataRcvd(pThis->pSessions[iSTRMSess], buf, iRcvd) != RS_RET_OK) {
+ localRet = strms_sess.DataRcvd(pThis->pSessions[iSTRMSess], buf, iRcvd);
+ if(localRet != RS_RET_OK) {
/* in this case, something went awfully wrong.
* We are instructed to terminate the session.
*/
- errmsg.LogError(0, NO_ERRCODE, "Tearing down STRM Session %d - see "
+ errmsg.LogError(0, localRet, "Tearing down STRM Session %d - see "
"previous messages for reason(s)\n", iSTRMSess);
pThis->pOnErrClose(pThis->pSessions[iSTRMSess]);
strms_sess.Destruct(&pThis->pSessions[iSTRMSess]);