diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-08-05 08:37:17 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-08-05 08:37:17 +0200 |
commit | ae2d1c6fcb25867f2c6aa8e342a24afb43442e6a (patch) | |
tree | 604931105a0cc07f66cc84bbfd8ca0c67af8d150 /tcps_sess.c | |
parent | 650f537761c7b8813ef82b0b8343e2f5e100b360 (diff) | |
parent | d51aefc052377a2cee103a4d87c7c8dcf8c74081 (diff) | |
download | rsyslog-ae2d1c6fcb25867f2c6aa8e342a24afb43442e6a.tar.gz rsyslog-ae2d1c6fcb25867f2c6aa8e342a24afb43442e6a.tar.xz rsyslog-ae2d1c6fcb25867f2c6aa8e342a24afb43442e6a.zip |
Merge branch 'v4-stable' into v4-devel
Conflicts:
ChangeLog
configure.ac
doc/manual.html
Diffstat (limited to 'tcps_sess.c')
-rw-r--r-- | tcps_sess.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tcps_sess.c b/tcps_sess.c index dec14b5a..ea9032b3 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -238,6 +238,11 @@ defaultDoSubmitMessage(tcps_sess_t *pThis, struct syslogTime *stTime, time_t ttG ISOBJ_TYPE_assert(pThis, tcps_sess); + if(pThis->iMsg == 0) { + DBGPRINTF("discarding zero-sized message\n"); + FINALIZE; + } + if(pThis->DoSubmitMessage != NULL) { pThis->DoSubmitMessage(pThis, pThis->pMsg, pThis->iMsg); FINALIZE; @@ -477,8 +482,10 @@ DataRcvd(tcps_sess_t *pThis, char *pData, size_t iLen) CHKiRet(processDataRcvd(pThis, *pData++, &stTime, ttGenTime, &multiSub)); } - /* submit anything that was not yet submitted */ - CHKiRet(multiSubmitMsg(&multiSub)); + if(multiSub.nElem > 0) { + /* submit anything that was not yet submitted */ + CHKiRet(multiSubmitMsg(&multiSub)); + } finalize_it: RETiRet; |