From 629a7a4fec13ebfa079883d83625cfa6578e931c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 18 Oct 2005 16:51:43 +0000 Subject: mostly finished BSD-style progname block --- syslogd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/syslogd.c b/syslogd.c index 01fbf458..22eaf7c7 100644 --- a/syslogd.c +++ b/syslogd.c @@ -3550,6 +3550,20 @@ int shouldProcessThisMessage(struct filed *f, struct msg *pMsg) assert(f != NULL); assert(pMsg != NULL); + /* we first have a look at the global, BSD-style block filters (for tag + * and host). Only if they match, we evaluate the actual filter. + * rgerhards, 2005-10-18 + */ + if(f->pCSTagComp != NULL){ + /* TODO: make access to pMSg through methods, only (below) */ + if(rsCStrSzStrCmp(f->pCSTagComp, getTAG(pMsg), pMsg->iLenTAG)) { + /* not equal, so we are already done... */ + dprintf("tag filter '%s' does not match '%s'\n", + rsCStrGetSzStr(f->pCSTagComp), getTAG(pMsg)); + return 0; + } + } + if(f->f_filter_type == FILTER_PRI) { /* skip messages that are incorrect priority */ if ( (f->f_filterData.f_pmask[pMsg->iFacility] == TABLE_NOPRI) || \ -- cgit