From cb2fc5f2d664ce48b9e3e8fd6c06e3aa3a9d9f66 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 24 Jul 2007 07:35:13 +0000 Subject: fixed wrong credits - last patch was by mildew -- sorry for that ;) --- ommysql.c | 78 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) (limited to 'ommysql.c') diff --git a/ommysql.c b/ommysql.c index fc7075f1..1c5537e7 100644 --- a/ommysql.c +++ b/ommysql.c @@ -269,49 +269,12 @@ int doActionMySQL(selector_t *f) return 0; } -/* query an entry point - */ -static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)()) -{ - if((name == NULL) || (pEtryPoint == NULL)) - return RS_RET_PARAM_ERROR; - - *pEtryPoint = NULL; - if(!strcmp((char*) name, "doAction")) { - *pEtryPoint = doActionMySQL; - } /*else if(!strcmp((char*) name, "freeInstance")) { - *pEtryPoint = freeInstanceFile; - }*/ - - return(*pEtryPoint == NULL) ? RS_RET_NOT_FOUND : RS_RET_OK; -} - -/* initialize the module - * - * Later, much more must be done. So far, we only return a pointer - * to the queryEtryPt() function - * TODO: do interface version checking & handshaking - * iIfVersRequeted is the version of the interface specification that the - * caller would like to see being used. ipIFVersProvided is what we - * decide to provide. - */ -rsRetVal modInitMySQL(int iIFVersRequested __attribute__((unused)), int *ipIFVersProvided, rsRetVal (**pQueryEtryPt)()) -{ - if((pQueryEtryPt == NULL) || (ipIFVersProvided == NULL)) - return RS_RET_PARAM_ERROR; - - *ipIFVersProvided = 1; /* so far, we only support the initial definition */ - - *pQueryEtryPt = queryEtryPt; - return RS_RET_OK; -} - /* try to process a selector action line. Checks if the action * applies to this module and, if so, processed it. If not, it * is left untouched. The driver will then call another module */ -rsRetVal parseSelectorActMySQL(uchar **pp, selector_t *f) +static rsRetVal parseSelectorAct(uchar **pp, selector_t *f) { uchar *p; rsRetVal iRet = RS_RET_CONFLINE_PROCESSED; @@ -417,6 +380,45 @@ rsRetVal parseSelectorActMySQL(uchar **pp, selector_t *f) return iRet; } +/* query an entry point + */ +static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)()) +{ + if((name == NULL) || (pEtryPoint == NULL)) + return RS_RET_PARAM_ERROR; + + *pEtryPoint = NULL; + if(!strcmp((char*) name, "doAction")) { + *pEtryPoint = doActionMySQL; + } else if(!strcmp((char*) name, "parseSelectorAct")) { + *pEtryPoint = parseSelectorAct; + } /*else if(!strcmp((char*) name, "freeInstance")) { + *pEtryPoint = freeInstanceFile; + }*/ + + return(*pEtryPoint == NULL) ? RS_RET_NOT_FOUND : RS_RET_OK; +} + +/* initialize the module + * + * Later, much more must be done. So far, we only return a pointer + * to the queryEtryPt() function + * TODO: do interface version checking & handshaking + * iIfVersRequeted is the version of the interface specification that the + * caller would like to see being used. ipIFVersProvided is what we + * decide to provide. + */ +rsRetVal modInitMySQL(int iIFVersRequested __attribute__((unused)), int *ipIFVersProvided, rsRetVal (**pQueryEtryPt)()) +{ + if((pQueryEtryPt == NULL) || (ipIFVersProvided == NULL)) + return RS_RET_PARAM_ERROR; + + *ipIFVersProvided = 1; /* so far, we only support the initial definition */ + + *pQueryEtryPt = queryEtryPt; + return RS_RET_OK; +} + #endif /* #ifdef WITH_DB */ /* * vi:set ai: -- cgit