diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-17 14:34:22 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-17 14:34:22 +0000 |
commit | 653ec62b23346eaab4f2f3830eeb7f1634a924c5 (patch) | |
tree | bea302747c51827905f2c8fc7eb8e4e243474149 /module-template.h | |
parent | 8132d66186c8c08c44bb3504cb91e2e12bee11c1 (diff) | |
download | rsyslog-653ec62b23346eaab4f2f3830eeb7f1634a924c5.tar.gz rsyslog-653ec62b23346eaab4f2f3830eeb7f1634a924c5.tar.xz rsyslog-653ec62b23346eaab4f2f3830eeb7f1634a924c5.zip |
- implemented afterRun input module interface function
- implemented $klogSymbolsTwice config directive
Diffstat (limited to 'module-template.h')
-rw-r--r-- | module-template.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/module-template.h b/module-template.h index 96af4d83..ec727a45 100644 --- a/module-template.h +++ b/module-template.h @@ -385,6 +385,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ *pEtryPoint = modGetTermSyncType;\ } else if(!strcmp((char*) name, "willRun")) {\ *pEtryPoint = willRun;\ + } else if(!strcmp((char*) name, "afterRun")) {\ + *pEtryPoint = afterRun;\ } /* modInit() @@ -497,6 +499,25 @@ static rsRetVal willRun(void)\ } +/* afterRun() + * This function is called after an input module has been run and its thread has + * been terminated. It shall do any necessary cleanup. + * This is expected to evolve into a freeInstance type of call once the input module + * interface evolves to support multiple instances. + * rgerhards, 2007-12-17 + */ +#define BEGINafterRun \ +static rsRetVal afterRun(void)\ +{\ + DEFiRet; + +#define CODESTARTafterRun + +#define ENDafterRun \ + return iRet;\ +} + + /* method to return which termination sync method is used by this module. */ #define TERM_SYNC_TYPE(x) \ |