summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorKaiwang Chen <kaiwang.chen@gmail.com>2012-01-09 14:32:52 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-01-09 14:32:52 +0100
commit791b16ce06d75944e338a6e5fa14c0394bde6f1d (patch)
treee9faf829c29f5010280ff090a09ba5e675336807 /runtime
parent74722b23317d556e86ad7fb77913c4c864c239c4 (diff)
downloadrsyslog-791b16ce06d75944e338a6e5fa14c0394bde6f1d.tar.gz
rsyslog-791b16ce06d75944e338a6e5fa14c0394bde6f1d.tar.xz
rsyslog-791b16ce06d75944e338a6e5fa14c0394bde6f1d.zip
bugfix: instabilities when using RFC5424 header fields
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 0744edd5..31863b2d 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -7,7 +7,7 @@
* of the "old" message code without any modifications. However, it
* helps to have things at the right place one we go to the meat of it.
*
- * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2012 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -1609,7 +1609,7 @@ char *getPROCID(msg_t *pM, sbool bLockMutex)
ISOBJ_TYPE_assert(pM, msg);
if(bLockMutex == LOCK_MUTEX)
- MsgUnlock(pM);
+ MsgLock(pM);
preparePROCID(pM, MUTEX_ALREADY_LOCKED);
if(pM->pCSPROCID == NULL)
pszRet = UCHAR_CONSTANT("");
@@ -1846,7 +1846,7 @@ static inline char *getStructuredData(msg_t *pM)
{
uchar *pszRet;
- MsgUnlock(pM);
+ MsgLock(pM);
if(pM->pCSStrucData == NULL)
pszRet = UCHAR_CONSTANT("-");
else
@@ -1894,7 +1894,7 @@ uchar *getProgramName(msg_t *pM, sbool bLockMutex)
uchar *pszRet;
if(bLockMutex == LOCK_MUTEX)
- MsgUnlock(pM);
+ MsgLock(pM);
prepareProgramName(pM, MUTEX_ALREADY_LOCKED);
if(pM->pCSProgName == NULL)
pszRet = UCHAR_CONSTANT("");
@@ -1952,7 +1952,7 @@ char *getAPPNAME(msg_t *pM, sbool bLockMutex)
assert(pM != NULL);
if(bLockMutex == LOCK_MUTEX)
- MsgUnlock(pM);
+ MsgLock(pM);
prepareAPPNAME(pM, MUTEX_ALREADY_LOCKED);
if(pM->pCSAPPNAME == NULL)
pszRet = UCHAR_CONSTANT("");