diff options
author | Bojan Smojver <bojan@rexursive.com> | 2011-02-23 11:25:43 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-02-23 11:25:43 +0100 |
commit | d1eb6e0edc51a78f3209448e800b25eda50340f2 (patch) | |
tree | 6d81c1de98eb0c77affaa2f112b5a0628f54ebc3 /runtime/module-template.h | |
parent | ee065f1cb55be56da6ed12b35cd0e686abcb3a10 (diff) | |
download | rsyslog-d1eb6e0edc51a78f3209448e800b25eda50340f2.tar.gz rsyslog-d1eb6e0edc51a78f3209448e800b25eda50340f2.tar.xz rsyslog-d1eb6e0edc51a78f3209448e800b25eda50340f2.zip |
added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r-- | runtime/module-template.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h index d05ec23c..c2585e67 100644 --- a/runtime/module-template.h +++ b/runtime/module-template.h @@ -77,6 +77,16 @@ static rsRetVal modGetType(eModType_t *modType) \ DEF_LMOD_STATIC_DATA \ MODULE_TYPE(eMOD_LIB) +/* Macro to define whether the module should be kept dynamically linked. + */ +#define MODULE_KEEP_TYPE(x)\ +static rsRetVal modGetKeepType(eModKeepType_t *modKeepType) \ + { \ + *modKeepType = x; \ + return RS_RET_OK;\ + } +#define MODULE_TYPE_NOKEEP MODULE_KEEP_TYPE(eMOD_NOKEEP) +#define MODULE_TYPE_KEEP MODULE_KEEP_TYPE(eMOD_KEEP) /* macro to define a unique module id. This must be able to fit in a void*. The * module id must be unique inside a running rsyslogd application. It is used to @@ -342,6 +352,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ *pEtryPoint = modGetID;\ } else if(!strcmp((char*) name, "getType")) {\ *pEtryPoint = modGetType;\ + } else if(!strcmp((char*) name, "getKeepType")) {\ + *pEtryPoint = modGetKeepType;\ } /* the following definition is the standard block for queryEtryPt for output |