diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-24 08:08:53 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-24 08:08:53 +0000 |
commit | 6c1dc3ccbcd05115f3737f2b2db06be2505e68c6 (patch) | |
tree | 88ca086f01f57dca3b7534450cd133691bb56021 /syslogd.c | |
parent | cb2fc5f2d664ce48b9e3e8fd6c06e3aa3a9d9f66 (diff) | |
download | rsyslog-6c1dc3ccbcd05115f3737f2b2db06be2505e68c6.tar.gz rsyslog-6c1dc3ccbcd05115f3737f2b2db06be2505e68c6.tar.bz2 rsyslog-6c1dc3ccbcd05115f3737f2b2db06be2505e68c6.zip |
changed select action config reader to use module interface
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 45 |
1 files changed, 16 insertions, 29 deletions
@@ -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); } } |