summaryrefslogtreecommitdiffstats
path: root/runtime/rule.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-09 17:19:21 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-09 17:19:21 +0200
commit6fde78cb744b22eb5790d43297acab249ca0e7fa (patch)
tree290dea7d09efc76e92eb18329f05913f1918957e /runtime/rule.c
parentab40107149038898ef24479a6911d9cd7770a56c (diff)
downloadrsyslog-6fde78cb744b22eb5790d43297acab249ca0e7fa.tar.gz
rsyslog-6fde78cb744b22eb5790d43297acab249ca0e7fa.tar.xz
rsyslog-6fde78cb744b22eb5790d43297acab249ca0e7fa.zip
small performance improvement and cleanup
optimized substring processing, should bring a small enhancement when forwarding with the default forwarding templates. Also did some uchar cleanup in msg.c (thus so many changes, in reality they are few...).
Diffstat (limited to 'runtime/rule.c')
-rw-r--r--runtime/rule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/rule.c b/runtime/rule.c
index 3a257a90..182d616a 100644
--- a/runtime/rule.c
+++ b/runtime/rule.c
@@ -39,6 +39,7 @@
#include "vm.h"
#include "var.h"
#include "srUtils.h"
+#include "unicode-helper.h"
#include "dirty.h" /* for getFIOPName */
/* static data */
@@ -104,7 +105,7 @@ shouldProcessThisMessage(rule_t *pRule, msg_t *pMsg, int *bProcessMsg)
{
DEFiRet;
unsigned short pbMustBeFreed;
- char *pszPropVal;
+ uchar *pszPropVal;
int bRet = 0;
size_t propLen;
vm_t *pVM = NULL;
@@ -189,12 +190,12 @@ shouldProcessThisMessage(rule_t *pRule, msg_t *pMsg, int *bProcessMsg)
break;
case FIOP_ISEQUAL:
if(rsCStrSzStrCmp(pRule->f_filterData.prop.pCSCompValue,
- (uchar*) pszPropVal, strlen(pszPropVal)) == 0)
+ pszPropVal, ustrlen(pszPropVal)) == 0)
bRet = 1; /* process message! */
break;
case FIOP_STARTSWITH:
if(rsCStrSzStrStartsWithCStr(pRule->f_filterData.prop.pCSCompValue,
- (uchar*) pszPropVal, strlen(pszPropVal)) == 0)
+ pszPropVal, ustrlen(pszPropVal)) == 0)
bRet = 1; /* process message! */
break;
case FIOP_REGEX: