From b26387e6b28630b8e5e3582039141ebf1c7455e3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 26 Sep 2011 11:36:44 +0200 Subject: 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. --- tools/omfile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/omfile.c') 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: -- cgit