summaryrefslogtreecommitdiffstats
path: root/ommysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'ommysql.c')
-rw-r--r--ommysql.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/ommysql.c b/ommysql.c
index 37ec0b22..509d5b39 100644
--- a/ommysql.c
+++ b/ommysql.c
@@ -389,6 +389,20 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
return iRet;
}
+
+/* free an instance
+ */
+static rsRetVal freeInstance(selector_t *f)
+{
+ assert(f != NULL);
+ switch (f->f_type) {
+# ifdef WITH_DB
+ closeMySQL(f);
+# endif
+ }
+ return RS_RET_OK;
+}
+
/* query an entry point
*/
static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())
@@ -403,9 +417,9 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())
*pEtryPoint = parseSelectorAct;
} else if(!strcmp((char*) name, "isCompatibleWithFeature")) {
*pEtryPoint = isCompatibleWithFeature;
- } /*else if(!strcmp((char*) name, "freeInstance")) {
- *pEtryPoint = freeInstanceFile;
- }*/
+ } else if(!strcmp((char*) name, "freeInstance")) {
+ *pEtryPoint = freeInstance;
+ }
return(*pEtryPoint == NULL) ? RS_RET_NOT_FOUND : RS_RET_OK;
}