summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-05-02 12:18:49 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-05-02 12:18:49 +0200
commit82818fe15c6da23e4a790618b2fdda53d0ed66e3 (patch)
tree22b1be451e30d7254a4f479ce52434235092f07e
parent24b62834801043bf2d9560b0cca3967e5762bea1 (diff)
parentd13ec67f9ab9c59a88952af6aec372fd082401ca (diff)
downloadrsyslog-82818fe15c6da23e4a790618b2fdda53d0ed66e3.tar.gz
rsyslog-82818fe15c6da23e4a790618b2fdda53d0ed66e3.tar.xz
rsyslog-82818fe15c6da23e4a790618b2fdda53d0ed66e3.zip
Merge branch 'v4-stable' into v5-stable
Conflicts: tcpsrv.c
-rw-r--r--ChangeLog2
-rw-r--r--runtime/strmsrv.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 48b58a9c..3100fcb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -829,6 +829,8 @@ Version 4.6.6 [v4-stable] (rgerhards), 2010-11-??
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=221
- bugfix: omlibdbi did not use password from rsyslog.con
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=203
+- bugfix: a slightly more informative error message when a TCP
+ connections is aborted
- some improvements thanks to clang's static code analyzer
o overall cleanup (mostly unnecessary writes and otherwise unused stuff)
o bugfix: fixed a very remote problem in msg.c which could occur when
diff --git a/runtime/strmsrv.c b/runtime/strmsrv.c
index e66ad717..f448cd4f 100644
--- a/runtime/strmsrv.c
+++ b/runtime/strmsrv.c
@@ -521,6 +521,7 @@ Run(strmsrv_t *pThis)
strms_sess_t *pNewSess;
nssel_t *pSel;
ssize_t iRcvd;
+ rsRetVal localRet;
ISOBJ_TYPE_assert(pThis, strmsrv);
@@ -580,11 +581,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]);