diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2005-10-18 16:51:43 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2005-10-18 16:51:43 +0000 |
commit | 629a7a4fec13ebfa079883d83625cfa6578e931c (patch) | |
tree | 8b9805dc87fe7348f37091a5ee084381d1bb85ff | |
parent | 2c7187de39b1e731057b47752e3989a954acffb8 (diff) | |
download | rsyslog-629a7a4fec13ebfa079883d83625cfa6578e931c.tar.gz rsyslog-629a7a4fec13ebfa079883d83625cfa6578e931c.tar.xz rsyslog-629a7a4fec13ebfa079883d83625cfa6578e931c.zip |
mostly finished BSD-style progname block
-rw-r--r-- | syslogd.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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) || \ |