diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-27 10:03:12 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-27 10:03:12 +0200 |
commit | 2ce900aea233b9f8b0447658f2dc3565c3103e78 (patch) | |
tree | c71b7cce47166418ac439c530831df48bfd10c56 /plugins/imfile/imfile.c | |
parent | 71664616132a47c2b951d72432031283ba040f79 (diff) | |
download | rsyslog-2ce900aea233b9f8b0447658f2dc3565c3103e78.tar.gz rsyslog-2ce900aea233b9f8b0447658f2dc3565c3103e78.tar.bz2 rsyslog-2ce900aea233b9f8b0447658f2dc3565c3103e78.zip |
bugfix: config errors did not always cause statement to fail
This could lead to startup with invalid parameters.
Diffstat (limited to 'plugins/imfile/imfile.c')
-rw-r--r-- | plugins/imfile/imfile.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index 83f94296..462a5e78 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -137,7 +137,7 @@ static prop_t *pInputName = NULL; /* there is only one global inputName for all /* module-global parameters */ static struct cnfparamdescr modpdescr[] = { - { "pollinginterval", eCmdHdlrInt, 0 } + { "pollinginterval", eCmdHdlrPositiveInt, 0 } }; static struct cnfparamblk modpblk = { CNFPARAMBLK_VERSION, @@ -543,12 +543,7 @@ CODESTARTsetModCnf if(!pvals[i].bUsed) continue; if(!strcmp(modpblk.descr[i].name, "pollinginterval")) { - if(pvals[i].val.d.n < 1) { - errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS, - "imfile: polling interval cannot be set below 1 - ignored"); - } else { - loadModConf->iPollInterval = (int) pvals[i].val.d.n; - } + loadModConf->iPollInterval = (int) pvals[i].val.d.n; } else { dbgprintf("imfile: program error, non-handled " "param '%s' in beginCnfLoad\n", modpblk.descr[i].name); |