From 8d606ea26d5fc79b845bafbc08d979ecc2ba0529 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 21 Nov 2007 10:52:19 +0000 Subject: added an identifier to command handler table - need to identify which command handler entries need to be removed when module is unloaded --- cfsysline.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cfsysline.h') 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); -- cgit