summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/syslogd.c7
-rw-r--r--tools/syslogd.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 9ced4562..6b8ce82f 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1071,7 +1071,12 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
break;
case FIOP_REGEX:
if(rsCStrSzStrMatchRegex(f->f_filterData.prop.pCSCompValue,
- (unsigned char*) pszPropVal) == 0)
+ (unsigned char*) pszPropVal, 0) == RS_RET_OK)
+ bRet = 1;
+ break;
+ case FIOP_EREREGEX:
+ if(rsCStrSzStrMatchRegex(f->f_filterData.prop.pCSCompValue,
+ (unsigned char*) pszPropVal, 1) == RS_RET_OK)
bRet = 1;
break;
default:
diff --git a/tools/syslogd.h b/tools/syslogd.h
index e866a16b..f1b11a91 100644
--- a/tools/syslogd.h
+++ b/tools/syslogd.h
@@ -70,7 +70,8 @@ struct filed {
FIOP_CONTAINS = 1, /* contains string? */
FIOP_ISEQUAL = 2, /* is (exactly) equal? */
FIOP_STARTSWITH = 3, /* starts with a string? */
- FIOP_REGEX = 4 /* matches a regular expression? */
+ FIOP_REGEX = 4, /* matches a (BRE) regular expression? */
+ FIOP_EREREGEX = 5 /* matches a ERE regular expression? */
} operation;
cstr_t *pCSCompValue; /* value to "compare" against */
char isNegated; /* actually a boolean ;) */