From 1b1229cd1e76ee43b8fb75466dd80a2c72b54136 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 26 Jul 2007 09:31:50 +0000 Subject: - changed doAction() interface to include module data pointer - removed references to f_un from omusrmsg.c - changed module template for parseSelectorAct() [code reduction, consitency] --- module-template.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'module-template.h') diff --git a/module-template.h b/module-template.h index 200a48c0..55b8f821 100644 --- a/module-template.h +++ b/module-template.h @@ -89,7 +89,7 @@ static rsRetVal isCompatibleWithFeature(syslogFeature __attribute__((unused)) eF /* doAction() */ #define BEGINdoAction \ -static rsRetVal doAction(selector_t *f)\ +static rsRetVal doAction(selector_t *f, instanceData __attribute__((unused)) *pData)\ {\ rsRetVal iRet = RS_RET_OK; @@ -175,14 +175,20 @@ static rsRetVal getWriteFDForSelect(selector_t *f, void *pModData, short *fd)\ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f, void **ppModData)\ {\ rsRetVal iRet = RS_RET_OK;\ - instanceData *pModData = NULL; + uchar *p;\ + instanceData *pData = NULL; #define CODESTARTparseSelectorAct \ assert(pp != NULL);\ assert(ppModData != NULL);\ - assert(f != NULL); + assert(f != NULL);\ + p = *pp; #define ENDparseSelectorAct \ + if(iRet == RS_RET_OK) {\ + *ppModData = pData;\ + *pp = p;\ + }\ return iRet;\ } -- cgit v1.2.3