summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-09-19 18:57:37 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-19 18:57:37 +0200
commit1b1b2a16514014b246760636623d273d74116754 (patch)
treef73dd5842c8d6f20898d3d58145bbc5b6c09a591
parent80fb1eb77a0fd6eee3ec1628ea0a3a5ff51bef42 (diff)
parenta85784a480304d213af33d3f3ade7d98635c85dd (diff)
downloadrsyslog-1b1b2a16514014b246760636623d273d74116754.tar.gz
rsyslog-1b1b2a16514014b246760636623d273d74116754.tar.bz2
rsyslog-1b1b2a16514014b246760636623d273d74116754.zip
Merge branch 'v6-devel'
-rw-r--r--ChangeLog2
-rw-r--r--action.c17
-rw-r--r--action.h2
3 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index dda47501..7a4eea8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -95,6 +95,8 @@ Version 6.5.0 [devel] 2012-08-28
http://bugzilla.adiscon.com/show_bug.cgi?id=353
---------------------------------------------------------------------------
Version 6.4.2 [V6-STABLE] 2012-09-??
+- bugfix: potential abort, if action queue could not be properly started
+ This most importantly could happen due to configuration errors.
- bugfix: remove invalid socket option call from imuxsock
Thanks to Cristian Ionescu-Idbohrn and Jonny Törnbom
- bugfix: missing support for escape sequences in RainerScript
diff --git a/action.c b/action.c
index a87f8839..6997f46d 100644
--- a/action.c
+++ b/action.c
@@ -1379,12 +1379,18 @@ doSubmitToActionQ(action_t *pAction, msg_t *pMsg)
{
DEFiRet;
+ if(pAction->eState == ACT_STATE_DIED) {
+ DBGPRINTF("action %p died, do NOT execute\n", pAction);
+ FINALIZE;
+ }
+
STATSCOUNTER_INC(pAction->ctrProcessed, pAction->mutCtrProcessed);
if(pAction->pQueue->qType == QUEUETYPE_DIRECT)
iRet = qqueueEnqObjDirect(pAction->pQueue, (void*) MsgAddRef(pMsg));
else
iRet = qqueueEnqObj(pAction->pQueue, eFLOWCTL_NO_DELAY, (void*) MsgAddRef(pMsg));
+finalize_it:
RETiRet;
}
@@ -1589,9 +1595,18 @@ finalize_it:
*/
DEFFUNC_llExecFunc(doActivateActions)
{
+ rsRetVal localRet;
action_t *pThis = (action_t*) pData;
BEGINfunc
- qqueueStart(pThis->pQueue);
+ localRet = qqueueStart(pThis->pQueue);
+ if(localRet != RS_RET_OK) {
+ errmsg.LogError(0, localRet, "error starting up action queue");
+ if(localRet == RS_RET_FILE_PREFIX_MISSING) {
+ errmsg.LogError(0, localRet, "file prefix (work directory?) "
+ "is missing");
+ }
+ actionDisable(pThis);
+ }
DBGPRINTF("Action %p: queue %p started\n", pThis, pThis->pQueue);
ENDfunc
return RS_RET_OK; /* we ignore errors, we can not do anything either way */
diff --git a/action.h b/action.h
index 0e704ddf..bce36b4c 100644
--- a/action.h
+++ b/action.h
@@ -36,7 +36,7 @@ extern int glbliActionResumeRetryCount;
typedef enum {
- ACT_STATE_DIED = 0, /* action permanently failed and now disabled - MUST BE ZEO! */
+ ACT_STATE_DIED = 0, /* action permanently failed and now disabled - MUST BE ZERO! */
ACT_STATE_RDY = 1, /* action ready, waiting for new transaction */
ACT_STATE_ITX = 2, /* transaction active, waiting for new data or commit */
ACT_STATE_COMM = 3, /* transaction finished (a transient state) */