summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-09-26 11:36:44 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-09-26 11:36:44 +0200
commitb26387e6b28630b8e5e3582039141ebf1c7455e3 (patch)
tree2f1128044dec9daac88d8cf3b41db1e1e7decebc
parent6d3cc9e406d3316300eaf537a1aa562e95499d70 (diff)
downloadrsyslog-b26387e6b28630b8e5e3582039141ebf1c7455e3.tar.gz
rsyslog-b26387e6b28630b8e5e3582039141ebf1c7455e3.tar.xz
rsyslog-b26387e6b28630b8e5e3582039141ebf1c7455e3.zip
bugfix: omfile returns fatal error code for things that go really wrong
previously, RS_RET_RESUME was returned, which lead to a loop inside the rule engine as omfile could not really recover.
-rw-r--r--ChangeLog3
-rw-r--r--runtime/msg.c1
-rw-r--r--tools/omfile.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 718d776b..11a75c26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@ Version 5.8.6 [V5-stable] (rgerhards/al), 2011-??-??
- bugfix: imuxsock did no longer ignore message-provided timestamp, if
so configured (the *default*). Lead to no longer sub-second timestamps.
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=281
+- bugfix: omfile returns fatal error code for things that go really wrong
+ previously, RS_RET_RESUME was returned, which lead to a loop inside the
+ rule engine as omfile could not really recover.
- bugfix: rsyslogd -v always said 64 atomics were not present
thanks to mono_matsuko for the patch
---------------------------------------------------------------------------
diff --git a/runtime/msg.c b/runtime/msg.c
index f1de8130..7cc588b7 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1741,7 +1741,6 @@ getTAG(msg_t *pM, uchar **ppBuf, int *piLen)
*piLen = pM->iLenTAG;
}
}
-dbgprintf("getTAG: len %d, buf '%s'\n", *piLen, *ppBuf);
}
diff --git a/tools/omfile.c b/tools/omfile.c
index 6a2d5e24..55801d40 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -663,8 +663,6 @@ finalize_it:
/* in v5, we shall return different states for message-caused failure (but only there!) */
if(pData->strmType == STREAMTYPE_NAMED_PIPE)
iRet = RS_RET_DISABLE_ACTION; /* this is the traditional semantic -- rgerhards, 2010-01-15 */
- else
- iRet = RS_RET_SUSPENDED;
}
RETiRet;
}
@@ -697,7 +695,8 @@ ENDbeginTransaction
BEGINendTransaction
CODESTARTendTransaction
- if(pData->bFlushOnTXEnd) {
+ /* Note: pStrm may be NULL if there was an error opening the stream */
+ if(pData->bFlushOnTXEnd && pData->pStrm != NULL) {
CHKiRet(strm.Flush(pData->pStrm));
}
finalize_it: