diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 8 | ||||
-rw-r--r-- | tools/syslogd.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 16f255ea..c7f36b45 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -432,6 +432,8 @@ selectorDestruct(void *pVal) } else if(pThis->f_filter_type == FILTER_EXPR) { if(pThis->f_filterData.f_expr != NULL) expr.Destruct(&pThis->f_filterData.f_expr); + if(pThis->regex_cache != NULL) + rsRegexDestruct(&pThis->regex_cache); } llDestroy(&pThis->llActList); @@ -1075,8 +1077,10 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce bRet = 1; /* process message! */ break; case FIOP_REGEX: - if(rsCStrSzStrMatchRegex(f->f_filterData.prop.pCSCompValue, - (unsigned char*) pszPropVal, 0) == RS_RET_OK) + //TODO REGEX: this needs to be merged with new functionality below + //rgerhards, 2009-04-02 + if(rsCStrSzStrMatchRegexCache(f->f_filterData.prop.pCSCompValue, + (unsigned char*) pszPropVal, &f->regex_cache) == 0) bRet = 1; break; case FIOP_EREREGEX: diff --git a/tools/syslogd.h b/tools/syslogd.h index f1b11a91..ecaaec34 100644 --- a/tools/syslogd.h +++ b/tools/syslogd.h @@ -80,6 +80,7 @@ struct filed { } f_filterData; linkedList_t llActList; /* list of configured actions */ +regex_t *regex_cache; }; |