summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2005-10-18 16:51:43 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2005-10-18 16:51:43 +0000
commit629a7a4fec13ebfa079883d83625cfa6578e931c (patch)
tree8b9805dc87fe7348f37091a5ee084381d1bb85ff /syslogd.c
parent2c7187de39b1e731057b47752e3989a954acffb8 (diff)
downloadrsyslog-629a7a4fec13ebfa079883d83625cfa6578e931c.tar.gz
rsyslog-629a7a4fec13ebfa079883d83625cfa6578e931c.tar.xz
rsyslog-629a7a4fec13ebfa079883d83625cfa6578e931c.zip
mostly finished BSD-style progname block
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c14
1 files changed, 14 insertions, 0 deletions
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) || \