From b9151f6a1708b2fb7e9518e73fcf42d86b0364a9 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 25 Nov 2010 15:44:49 +0100 Subject: bugfix: atomic increment for msg object may not work correct on all platforms. Signed-off-by: Rainer Gerhards --- ChangeLog | 4 ++++ runtime/msg.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a266aafd..bbf900fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ --------------------------------------------------------------------------- +Version 4.7.4 [v4-???] (rgerhards), 2010-11-?? +- bugfix: atomic increment for msg object may not work correct on all + platforms. Thanks to Chris Metcalf for the patch +--------------------------------------------------------------------------- Version 4.7.3 [v4-devel] (rgerhards), 2010-11-25 - bugfix(important): problem in TLS handling could cause rsyslog to loop in a tight loop, effectively disabling functionality and bearing the diff --git a/runtime/msg.h b/runtime/msg.h index cda206fc..a6923d52 100644 --- a/runtime/msg.h +++ b/runtime/msg.h @@ -60,9 +60,9 @@ struct msg { flowControl_t flowCtlType; /**< type of flow control we can apply, for enqueueing, needs not to be persisted because once data has entered the queue, this property is no longer needed. */ pthread_mutex_t mut; + int iRefCount; /* reference counter (0 = unused) */ bool bDoLock; /* use the mutex? */ bool bParseHOSTNAME; /* should the hostname be parsed from the message? */ - short iRefCount; /* reference counter (0 = unused) */ /* background: the hostname is not present on "regular" messages * received via UNIX domain sockets from the same machine. However, * it is available when we have a forwarder (e.g. rfc3195d) using local -- cgit