summaryrefslogtreecommitdiffstats
path: root/tcps_sess.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-08-05 08:40:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-08-05 08:40:18 +0200
commitebba229db9d89e69b60e542e3c49f25ed9ebc6fc (patch)
treeaaba2a10abbd8c2e4210c6441e79c33d9362ae48 /tcps_sess.c
parent676939f61671f96e80323cf929ee506f3844fcfc (diff)
parentae2d1c6fcb25867f2c6aa8e342a24afb43442e6a (diff)
downloadrsyslog-ebba229db9d89e69b60e542e3c49f25ed9ebc6fc.zip
rsyslog-ebba229db9d89e69b60e542e3c49f25ed9ebc6fc.tar.gz
rsyslog-ebba229db9d89e69b60e542e3c49f25ed9ebc6fc.tar.xz
Merge branch 'v4-devel' into master
Conflicts: ChangeLog
Diffstat (limited to 'tcps_sess.c')
-rw-r--r--tcps_sess.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tcps_sess.c b/tcps_sess.c
index 1ae065f..99af0cb 100644
--- a/tcps_sess.c
+++ b/tcps_sess.c
@@ -239,6 +239,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;