diff options
author | Zhuang Yuyao <netone.z@gmail.com> | 2008-09-10 12:18:34 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-10 12:18:34 +0200 |
commit | d65470842d1455fd335fcd62e54aed01628a2af6 (patch) | |
tree | 9199c9c35243a43f08f50fabfc090986157cbe2e /template.c | |
parent | ae425d47c53da7ba669b7c6fbe48381eda83180a (diff) | |
download | rsyslog-d65470842d1455fd335fcd62e54aed01628a2af6.tar.gz rsyslog-d65470842d1455fd335fcd62e54aed01628a2af6.tar.bz2 rsyslog-d65470842d1455fd335fcd62e54aed01628a2af6.zip |
added new capability to property replacer.
Multiple immediately successive field delimiters are treated as
a single one.
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'template.c')
-rw-r--r-- | template.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -603,6 +603,7 @@ static int do_Parameter(unsigned char **pp, struct template *pTpl) /* now we fall through the "regular" FromPos code */ #endif /* #ifdef FEATURE_REGEXP */ if(*p == 'F') { + pTpe->data.field.field_expand = 0; /* we have a field counter, so indicate it in the template */ ++p; /* eat 'F' */ if (*p == ':') { @@ -630,7 +631,11 @@ static int do_Parameter(unsigned char **pp, struct template *pTpl) pTpe->data.field.field_delim = 9; } else { pTpe->data.field.field_delim = iNum; + if (*p == '+') { + pTpe->data.field.field_expand = 1; + p ++; } + } } } else { /* invalid character after F, so we need to reject |