summaryrefslogtreecommitdiffstats
path: root/cfsysline.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-11-21 10:52:19 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-11-21 10:52:19 +0000
commit8d606ea26d5fc79b845bafbc08d979ecc2ba0529 (patch)
treef17916ff1579340b723b9253cdab6d117697ab37 /cfsysline.h
parent214c7bd7f8552f0a07a15373b4a222da6e9e6ba6 (diff)
downloadrsyslog-8d606ea26d5fc79b845bafbc08d979ecc2ba0529.tar.gz
rsyslog-8d606ea26d5fc79b845bafbc08d979ecc2ba0529.tar.xz
rsyslog-8d606ea26d5fc79b845bafbc08d979ecc2ba0529.zip
added an identifier to command handler table - need to identify which
command handler entries need to be removed when module is unloaded
Diffstat (limited to 'cfsysline.h')
-rw-r--r--cfsysline.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cfsysline.h b/cfsysline.h
index 607ac40e..a7fad234 100644
--- a/cfsysline.h
+++ b/cfsysline.h
@@ -46,6 +46,10 @@ struct cslCmdHdlr_s { /* config file sysline parse entry */
ecslCmdHdrlType eType; /* which type of handler is this? */
rsRetVal (*cslCmdHdlr)(); /* function pointer to use with handler (params depending on eType) */
void *pData; /* user-supplied data pointer */
+ void *pOwnerCookie; /* a pointer to the owner of this handler. This is important if
+ * the handler for a specifc owner needs to be removed. Most often, this
+ * is an actual pointer to a module - may be anything, but must be unique.
+ */
};
typedef struct cslCmdHdlr_s cslCmdHdlr_t;
@@ -61,7 +65,7 @@ struct cslCmd_s { /* config file sysline parse entry */
typedef struct cslCmd_s cslCmd_t;
/* prototypes */
-rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData);
+rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData, void *pOwnerCookie);
rsRetVal unregCfSysLineHdlrs(void);
rsRetVal processCfSysLineCommand(uchar *pCmd, uchar **p);
rsRetVal cfsyslineInit(void);