diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-18 16:20:06 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-18 16:20:06 +0200 |
commit | df9012f755a305ef48037f10fcc9413406894e66 (patch) | |
tree | 1aed124ca0396ace409a5550bf39c8432ec5f15c /runtime/rule.c | |
parent | f18c0ffb9a6de737d2b86b3df164ead22ac5ef58 (diff) | |
download | rsyslog-df9012f755a305ef48037f10fcc9413406894e66.tar.gz rsyslog-df9012f755a305ef48037f10fcc9413406894e66.tar.xz rsyslog-df9012f755a305ef48037f10fcc9413406894e66.zip |
slight optimization of template generation
Diffstat (limited to 'runtime/rule.c')
-rw-r--r-- | runtime/rule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/rule.c b/runtime/rule.c index f17c524e..12494543 100644 --- a/runtime/rule.c +++ b/runtime/rule.c @@ -106,6 +106,7 @@ shouldProcessThisMessage(rule_t *pRule, msg_t *pMsg, int *bProcessMsg) unsigned short pbMustBeFreed; char *pszPropVal; int bRet = 0; + size_t propLen; vm_t *pVM = NULL; var_t *pResult = NULL; @@ -177,7 +178,8 @@ shouldProcessThisMessage(rule_t *pRule, msg_t *pMsg, int *bProcessMsg) bRet = (pResult->val.num) ? 1 : 0; } else { assert(pRule->f_filter_type == FILTER_PROP); /* assert() just in case... */ - pszPropVal = MsgGetProp(pMsg, NULL, pRule->f_filterData.prop.pCSPropName, &pbMustBeFreed); + pszPropVal = MsgGetProp(pMsg, NULL, pRule->f_filterData.prop.pCSPropName, &propLen, &pbMustBeFreed); + // TODO: optimize, we now have the length of the property! /* Now do the compares (short list currently ;)) */ switch(pRule->f_filterData.prop.operation ) { |