diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-11-21 16:34:48 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-11-21 16:34:48 +0000 |
commit | 3bb7ad8246bca95c89d68a8b0402b8482489c877 (patch) | |
tree | 798656b4722649346cbd43a0a328041832666237 /module-template.h | |
parent | bb6bfca3dfa6a5d3500e51459b38bb6d0ca6a4b2 (diff) | |
download | rsyslog-3bb7ad8246bca95c89d68a8b0402b8482489c877.tar.gz rsyslog-3bb7ad8246bca95c89d68a8b0402b8482489c877.tar.xz rsyslog-3bb7ad8246bca95c89d68a8b0402b8482489c877.zip |
- added an identifier to command handler table - need to identify which
command handler entries need to be removed when module is unloaded
- added support so that linkedlist key can be used for owner handle
- enhanced llExecFunc to support deletion of list elements (on behalf of
user function being called, slight interface change)
- enhanced linkedlist class so that list elements can now be deleted based
on the key value they have
- created entry point so that CfSysLine handlers are removed on modExit()
Diffstat (limited to 'module-template.h')
-rw-r--r-- | module-template.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/module-template.h b/module-template.h index 9521d08f..13ae4b86 100644 --- a/module-template.h +++ b/module-template.h @@ -44,6 +44,16 @@ #define STD_LOADABLE_MODULE_ID ((void*) modExit) +/* macro to implement the "modGetID()" interface function + * rgerhards 2007-11-21 + */ +#define DEFmodGetID \ +static rsRetVal modGetID(void **pID) \ + { \ + *pID = STD_LOADABLE_MODULE_ID;\ + return RS_RET_OK;\ + } + /* to following macros are used to generate function headers and standard * functionality. It works as follows (described on the sample case of * createInstance()): @@ -284,6 +294,7 @@ static rsRetVal tryResume(instanceData __attribute__((unused)) *pData)\ /* queryEtryPt() */ #define BEGINqueryEtryPt \ +DEFmodGetID \ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ {\ DEFiRet; @@ -324,6 +335,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ *pEtryPoint = needUDPSocket;\ } else if(!strcmp((char*) name, "tryResume")) {\ *pEtryPoint = tryResume;\ + } else if(!strcmp((char*) name, "modGetID")) {\ + *pEtryPoint = modGetID;\ } |