summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-24 08:08:53 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-24 08:08:53 +0000
commit6c1dc3ccbcd05115f3737f2b2db06be2505e68c6 (patch)
tree88ca086f01f57dca3b7534450cd133691bb56021 /syslogd.c
parentcb2fc5f2d664ce48b9e3e8fd6c06e3aa3a9d9f66 (diff)
downloadrsyslog-6c1dc3ccbcd05115f3737f2b2db06be2505e68c6.tar.gz
rsyslog-6c1dc3ccbcd05115f3737f2b2db06be2505e68c6.tar.xz
rsyslog-6c1dc3ccbcd05115f3737f2b2db06be2505e68c6.zip
changed select action config reader to use module interface
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c45
1 files changed, 16 insertions, 29 deletions
diff --git a/syslogd.c b/syslogd.c
index 3c549d7a..aff23708 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -5036,7 +5036,7 @@ static rsRetVal cfline(char *line, register selector_t *f)
{
uchar *p;
rsRetVal iRet;
- modInfo_t pMod;
+ modInfo_t *pMod;
dprintf("cfline(%s)", line);
@@ -5090,35 +5090,22 @@ static rsRetVal cfline(char *line, register selector_t *f)
f->f_type = F_DISCARD;
} else {
/* loop through all modules and see if one picks up the line */
- pMod = modGetNxt(NULL);
+ pMod = omodGetNxt(NULL);
while(pMod != NULL) {
- pMod = modGetNxt(pMod);
- }
-#if 0
- switch (*p)
- {
- case '@':
- parseSelectorActFwd(&p, f);
- break;
- case '$':
- case '?':
- case '|':
- case '/':
- parseSelectorActFile(&p, f);
- break;
- case '*':
- parseSelectorActUsrMsg(&p, f);
- break;
- case '>':
- parseSelectorActMySQL(&p, f);
- break;
- case '^': /* bkalkbrenner 2005-09-20: execute shell command */
- parseSelectorActShell(&p, f);
- break;
- default:
- parseSelectorActUsrMsg(&p, f);
- break;
-#endif
+ iRet = pMod->mod.om.parseSelectorAct(&p , f);
+ if(iRet == RS_RET_CONFLINE_PROCESSED) {
+ dprintf("Module %s processed this config line.\n",
+ modGetName(pMod));
+ break;
+ }
+ else if(iRet != RS_RET_CONFLINE_UNPROCESSED) {
+ /* we ignore any errors that might have occured - we can
+ * not do anything at all, and it would block other modules
+ * from initializing. -- rgerhards, 2007-07-24
+ */
+ dprintf("error %d parsing config line - continuing\n", (int) iRet);
+ }
+ pMod = omodGetNxt(pMod);
}
}