summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-12-01 17:28:36 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-12-01 17:28:36 +0100
commit48877c8ef41787d59a062ab07f5b6ee37eba7ce1 (patch)
treed94876c7521bdd81f0028fe7824bad228b67a5fd /parse.c
parentb030fe7b1f8fb26dad24ce23243f11603b5c9d4e (diff)
downloadrsyslog-48877c8ef41787d59a062ab07f5b6ee37eba7ce1.tar.gz
rsyslog-48877c8ef41787d59a062ab07f5b6ee37eba7ce1.tar.xz
rsyslog-48877c8ef41787d59a062ab07f5b6ee37eba7ce1.zip
milestone: added support for CEE-properties in property-based filters
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/parse.c b/parse.c
index e335d423..a156b317 100644
--- a/parse.c
+++ b/parse.c
@@ -231,7 +231,8 @@ rsRetVal parsSkipWhitespace(rsParsObj *pThis)
/* Parse string up to a delimiter.
*
* Input:
- * cDelim - the delimiter
+ * cDelim - the delimiter. Note that SP within a value always is a delimiter,
+ * so cDelim is actually an *additional* delimiter.
* The following two are for whitespace stripping,
* 0 means "no", 1 "yes"
* - bTrimLeading
@@ -256,13 +257,13 @@ rsRetVal parsDelimCStr(rsParsObj *pThis, cstr_t **ppCStr, char cDelim, int bTrim
pC = rsCStrGetBufBeg(pThis->pCStr) + pThis->iCurrPos;
- while(pThis->iCurrPos < rsCStrLen(pThis->pCStr) && *pC != cDelim) {
+ while(pThis->iCurrPos < rsCStrLen(pThis->pCStr) && *pC != cDelim && *pC != ' ') {
CHKiRet(cstrAppendChar(pCStr, bConvLower ? tolower(*pC) : *pC));
++pThis->iCurrPos;
++pC;
}
- if(*pC == cDelim) {
+ if(pThis->iCurrPos < cstrLen(pThis->pCStr)) { //BUGFIX!!
++pThis->iCurrPos; /* eat delimiter */
}