diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-24 11:33:39 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-24 11:33:39 +0000 |
commit | 5cbb54ed6ad1934875b080286b9933400c817e85 (patch) | |
tree | 8c45cde2e6fe16df01a63f45b2a8ef82645308ef /omfwd.c | |
parent | f1e14aefde8c295a2cbd93b9118d32961b6c373f (diff) | |
download | rsyslog-5cbb54ed6ad1934875b080286b9933400c817e85.tar.gz rsyslog-5cbb54ed6ad1934875b080286b9933400c817e85.tar.xz rsyslog-5cbb54ed6ad1934875b080286b9933400c817e85.zip |
major task: made sure no selector_t is created for selector lines that can
not be successfully loaded. That forced me to change a lot of code,
with potential for trouble.
Diffstat (limited to 'omfwd.c')
-rw-r--r-- | omfwd.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -414,14 +414,8 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f) f->f_un.f_forw.f_addr = res; } - /* then try to find the template and re-set f_type to UNUSED - * if it can not be found. */ - cflineSetTemplateAndIOV(f, szTemplateName); - if(f->f_type == F_UNUSED) - /* safety measure to make sure we have a valid - * selector line before we continue down below. - * rgerhards 2005-07-29 - */ + /* then try to find the template */ + if((iRet = cflineSetTemplateAndIOV(f, szTemplateName)) != RS_RET_OK) break; dprintf("forwarding host: '%s:%s/%s' template '%s'\n", q, getFwdSyslogPt(f), @@ -439,6 +433,9 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f) break; } + if(iRet == RS_RET_OK) + iRet = RS_RET_CONFLINE_PROCESSED; + if(iRet == RS_RET_CONFLINE_PROCESSED) *pp = p; return iRet; |