summaryrefslogtreecommitdiffstats
path: root/tcpsrv.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-11 10:51:46 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-11 10:51:46 +0100
commit471801ef4e96bd3d3fc5a468ca0feb8837f08268 (patch)
tree6fca4ee9f2d2b9ec9d435c0e134d1c9c7c590f86 /tcpsrv.c
parentb24ea47ea2b9b889c94139d70f1e6dd402b22c3d (diff)
downloadrsyslog-471801ef4e96bd3d3fc5a468ca0feb8837f08268.tar.gz
rsyslog-471801ef4e96bd3d3fc5a468ca0feb8837f08268.tar.xz
rsyslog-471801ef4e96bd3d3fc5a468ca0feb8837f08268.zip
added a bit of doc and improved an error message
Diffstat (limited to 'tcpsrv.c')
-rw-r--r--tcpsrv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tcpsrv.c b/tcpsrv.c
index 7d3a5848..ef453f3a 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -473,6 +473,7 @@ doReceive(tcpsrv_t *pThis, tcps_sess_t **ppSess)
{
char buf[128*1024]; /* reception buffer - may hold a partial or multiple messages */
ssize_t iRcvd;
+ rsRetVal localRet;
DEFiRet;
ISOBJ_TYPE_assert(pThis, tcpsrv);
@@ -498,11 +499,11 @@ doReceive(tcpsrv_t *pThis, tcps_sess_t **ppSess)
break;
case RS_RET_OK:
/* valid data received, process it! */
- if(tcps_sess.DataRcvd(*ppSess, buf, iRcvd) != RS_RET_OK) {
+ if((localRet = tcps_sess.DataRcvd(*ppSess, buf, iRcvd)) != RS_RET_OK) {
/* in this case, something went awfully wrong.
* We are instructed to terminate the session.
*/
- errmsg.LogError(0, NO_ERRCODE, "Tearing down TCP Session - see "
+ errmsg.LogError(0, localRet, "Tearing down TCP Session - see "
"previous messages for reason(s)\n");
pThis->pOnErrClose(*ppSess);
tcps_sess.Destruct(ppSess);