summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--action.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 88125377..54f6ccdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ Version 3.12.0 (rgerhards), 2008-02-??
- general code cleanup and further modularization
- $MainMessageQueueDiscardSeverity can now also handle textual severities
(previously only integers)
+- bugfix: message object was not properly synchronized when the
+ main queue had a single thread and non-direct action queues were used
---------------------------------------------------------------------------
Version 3.11.3 (rgerhards), 2008-02-18
- fixed a bug in imklog which lead to duplicate message content in
diff --git a/action.c b/action.c
index 938aefaf..36eb94df 100644
--- a/action.c
+++ b/action.c
@@ -187,6 +187,14 @@ actionConstructFinalize(action_t *pThis)
/* find a name for our queue */
snprintf((char*) pszQName, sizeof(pszQName)/sizeof(uchar), "action %d queue", iActionNbr);
+ /* we need to make a safety check: if the queue is NOT in direct mode, a single
+ * message object may be accessed by multiple threads. As such, we need to enable
+ * msg object thread safety in this case (this costs a bit performance and thus
+ * is not enabled by default. -- rgerhards, 2008-02-20
+ */
+ if(ActionQueType != QUEUETYPE_DIRECT)
+ MsgEnableThreadSafety();
+
/* create queue */
/* action queues always (for now) have just one worker. This may change when
* we begin to implement an interface the enable output modules to request