summaryrefslogtreecommitdiffstats
path: root/plugins/imfile/imfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-09-27 10:03:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-27 10:03:12 +0200
commit2ce900aea233b9f8b0447658f2dc3565c3103e78 (patch)
treec71b7cce47166418ac439c530831df48bfd10c56 /plugins/imfile/imfile.c
parent71664616132a47c2b951d72432031283ba040f79 (diff)
downloadrsyslog-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.c9
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);