summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorMichael Terry <mike@bongo.(none)>2009-06-29 11:18:55 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-29 11:18:55 +0200
commite747478051f4f81a872c791710933881c9564d64 (patch)
tree0cee09881a46977aa17c979296d60258ab7f7dd5 /runtime
parentba4806a70439dd24dc98bd707893b1319dd5e3ef (diff)
downloadrsyslog-e747478051f4f81a872c791710933881c9564d64.tar.gz
rsyslog-e747478051f4f81a872c791710933881c9564d64.tar.xz
rsyslog-e747478051f4f81a872c791710933881c9564d64.zip
separate willRun and runInput calls for input modules
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/modules.c1
-rw-r--r--runtime/modules.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/runtime/modules.c b/runtime/modules.c
index 32ae659f..bd201252 100644
--- a/runtime/modules.c
+++ b/runtime/modules.c
@@ -399,6 +399,7 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"runInput", &pNew->mod.im.runInput));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"willRun", &pNew->mod.im.willRun));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"afterRun", &pNew->mod.im.afterRun));
+ pNew->mod.im.bCanRun = 0;
break;
case eMOD_OUT:
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"freeInstance", &pNew->freeInstance));
diff --git a/runtime/modules.h b/runtime/modules.h
index 372529ee..4d874019 100644
--- a/runtime/modules.h
+++ b/runtime/modules.h
@@ -106,6 +106,7 @@ typedef struct modInfo_s {
rsRetVal (*runInput)(thrdInfo_t*); /* function to gather input and submit to queue */
rsRetVal (*willRun)(void); /* function to gather input and submit to queue */
rsRetVal (*afterRun)(thrdInfo_t*); /* function to gather input and submit to queue */
+ int bCanRun; /* cached value of whether willRun() succeeded */
} im;
struct {/* data for output modules */
/* below: perform the configured action