diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2011-08-05 14:30:30 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2011-08-05 14:30:30 +0200 |
commit | 0bf454aba2b62618ab6c2a7c4b17641c0bce297b (patch) | |
tree | dfad92a5d03cdac5d4609ce94257c95dad9bc059 /runtime | |
parent | b04a5b89e4c730f861a4e21479d9f2c69b28828f (diff) | |
parent | ece1cb640926848d0d155f29b01a6406af441cb0 (diff) | |
download | rsyslog-0bf454aba2b62618ab6c2a7c4b17641c0bce297b.tar.gz rsyslog-0bf454aba2b62618ab6c2a7c4b17641c0bce297b.tar.xz rsyslog-0bf454aba2b62618ab6c2a7c4b17641c0bce297b.zip |
Merge branch 'beta'
Conflicts:
ChangeLog
configure.ac
doc/manual.html
runtime/rsyslog.h
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/msg.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index 0a79bec2..fdc2174f 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2900,6 +2900,7 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, } } +dbgprintf("prop repl 4, pRes='%s', len %d\n", pRes, bufLen); /* Take care of spurious characters to make the property safe * for a path definition */ @@ -2977,7 +2978,13 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, } /* check for "." and ".." (note the parenthesis in the if condition!) */ - if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) { + if(*pRes == '\0') { + if(*pbMustBeFreed == 1) + free(pRes); + pRes = UCHAR_CONSTANT("_"); + bufLen = 1; + *pbMustBeFreed = 0; + } else if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) { uchar *pTmp = pRes; if(*(pRes + 1) == '\0') @@ -2987,12 +2994,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, if(*pbMustBeFreed == 1) free(pTmp); *pbMustBeFreed = 0; - } else if(*pRes == '\0') { - if(*pbMustBeFreed == 1) - free(pRes); - pRes = UCHAR_CONSTANT("_"); - bufLen = 1; - *pbMustBeFreed = 0; } } @@ -3064,6 +3065,7 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, bufLen = ustrlen(pRes); *pPropLen = bufLen; +dbgprintf("end prop repl, pRes='%s', len %d\n", pRes, bufLen); ENDfunc return(pRes); } |